diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-04-05 17:42:32 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-04-05 17:42:32 +0000 |
| commit | 19d00efa85cfc42ccae9bd17ef575602f0d22c50 (patch) | |
| tree | cab58b197a09a98c23b0a22ba9492207e7c14071 /src/sp-text.h | |
| parent | Merged Group and subclasses. (diff) | |
| download | inkscape-19d00efa85cfc42ccae9bd17ef575602f0d22c50.tar.gz inkscape-19d00efa85cfc42ccae9bd17ef575602f0d22c50.zip | |
Merged more classes.
(bzr r11608.1.78)
Diffstat (limited to 'src/sp-text.h')
| -rw-r--r-- | src/sp-text.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/sp-text.h b/src/sp-text.h index 6ed069f6b..f3113e59f 100644 --- a/src/sp-text.h +++ b/src/sp-text.h @@ -21,23 +21,19 @@ #include "text-tag-attributes.h" #include "libnrtype/Layout-TNG.h" - -#define SP_TYPE_TEXT (sp_text_get_type()) #define SP_TEXT(obj) ((SPText*)obj) -#define SP_IS_TEXT(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPText))) +#define SP_IS_TEXT(obj) (dynamic_cast<const SPText*>((SPObject*)obj)) /* Text specific flags */ #define SP_TEXT_CONTENT_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A #define SP_TEXT_LAYOUT_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A -class CText; /* SPText */ - -class SPText : public SPItem { +class SPText : public SPItem, public CItem { public: SPText(); - CText* ctext; + virtual ~SPText(); /** Converts the text object to its component curves */ SPCurve *getNormalizedBpath() const @@ -69,18 +65,8 @@ private: breaks and makes sure both that they are assigned the correct SPObject and that we don't get a spurious extra one at the end of the flow. */ unsigned _buildLayoutInput(SPObject *root, Inkscape::Text::Layout::OptionalTextTagAttrs const &parent_optional_attrs, unsigned parent_attrs_offset, bool in_textpath); -}; - -struct SPTextClass { - SPItemClass parent_class; -}; - -class CText : public CItem { public: - CText(SPText* text); - virtual ~CText(); - virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); virtual void release(); virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); @@ -97,14 +83,8 @@ public: virtual void hide(unsigned int key); virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); virtual Geom::Affine set_transform(Geom::Affine const &transform); - -protected: - SPText* sptext; }; - -GType sp_text_get_type(); - #endif /* |
