/*
5 * Authors: see git history
7 * Copyright (C) 2018 Authors
8 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
10#ifndef SEEN_SP_ITEM_FLOWTEXT_H
11#define SEEN_SP_ITEM_FLOWTEXT_H
35 int tag()
const override {
return tag_of<
decltype(*this)>; }
74 SPObject **pending_line_break_object);
90 void update(
SPCtx* ctx,
unsigned int flags)
override;
91 void modified(
unsigned int flags)
override;
98 const char*
typeName()
const override;
102 void hide(
unsigned int key)
override;
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
3x3 matrix representing an affine transformation.
Axis-aligned rectangle that can be empty.
Two-dimensional point that doubles as a vector.
SVG drawing item for display.
Storing of snapping preferences.
Generates the layout for either wrapped or non-wrapped text and stores the result.
Interface for refcounted XML nodes.
To do: update description of desktop.
Typed SVG document implementation.
void modified(unsigned int flags) override
std::optional< Geom::Point > getBaselinePoint() const
Get the position of the baseline point for this text object.
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
Inkscape::DrawingItem * show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) override
char * description() const override
Inkscape::Text::Layout layout
const char * displayName() const override
The item's type name as a translated human string.
std::unique_ptr< Shape > _buildExclusionShape() const
calculates the union of all the <flowregionexclude> children of this flowroot.
void _clearFlow(Inkscape::DrawingGroup *in_arena)
discards the drawing objects representing this text.
bool has_internal_frame() const
void fix_overflow_flowregion(bool inverse)
Geom::PathVector getNormalizedBpath() const
Converts the text object to its component curves.
const char * typeName() const override
The item's type name, not node tag name.
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Inkscape::XML::Node * getAsText()
Converts the flowroot in into a <text> tree, keeping all the formatting and positioning,...
void hide(unsigned int key) override
void _buildLayoutInput(SPObject *root, std::unique_ptr< Shape > exclusion_shape, SPObject **pending_line_break_object)
Recursively walks the xml tree adding tags and their contents.
void optimizeScaledText()
Optimize scaled flow text on next set_transform.
void snappoints(std::vector< Inkscape::SnapCandidatePoint > &p, Inkscape::SnapPreferences const *snapprefs) const override
void remove_child(Inkscape::XML::Node *child) override
std::unordered_map< unsigned, Inkscape::Text::StyleAttachments > view_style_attachments
void print(SPPrintContext *ctx) override
void rebuildLayout()
Completely recalculates the layout.
Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const override
void update(SPCtx *ctx, unsigned int flags) override
Geom::Affine set_transform(Geom::Affine const &xform) override
SPItem * get_frame(SPItem const *after)
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags) override
Base class for visual SVG elements.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
Editable view implementation.
Contains forward declarations of 2geom types.
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
SPItem * create_flowtext_with_internal_frame(SPDesktop *desktop, Geom::Point p1, Geom::Point p2)
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.
Interface for XML documents.
Creates and maintains display tree needed for text styling.