summaryrefslogtreecommitdiffstats
path: root/src/sp-tref.h
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-05 17:42:32 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-05 17:42:32 +0000
commit19d00efa85cfc42ccae9bd17ef575602f0d22c50 (patch)
treecab58b197a09a98c23b0a22ba9492207e7c14071 /src/sp-tref.h
parentMerged Group and subclasses. (diff)
downloadinkscape-19d00efa85cfc42ccae9bd17ef575602f0d22c50.tar.gz
inkscape-19d00efa85cfc42ccae9bd17ef575602f0d22c50.zip
Merged more classes.
(bzr r11608.1.78)
Diffstat (limited to 'src/sp-tref.h')
-rw-r--r--src/sp-tref.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/sp-tref.h b/src/sp-tref.h
index f4271bf61..29183047b 100644
--- a/src/sp-tref.h
+++ b/src/sp-tref.h
@@ -22,16 +22,13 @@
/* tref base class */
-#define SP_TYPE_TREF (sp_tref_get_type())
#define SP_TREF(obj) ((SPTRef*)obj)
-#define SP_IS_TREF(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPTRef)))
+#define SP_IS_TREF(obj) (dynamic_cast<const SPTRef*>((SPObject*)obj))
-class CTRef;
-
-class SPTRef : public SPItem {
+class SPTRef : public SPItem, public CItem {
public:
SPTRef();
- CTRef* ctref;
+ virtual ~SPTRef();
// Attributes that are used in the same way they would be in a tspan
TextTagAttributes attributes;
@@ -52,17 +49,6 @@ public:
sigc::connection _changed_connection;
SPObject * getObjectReferredTo();
-};
-
-struct SPTRefClass {
- SPItemClass parent_class;
-};
-
-
-class CTRef : public CItem {
-public:
- CTRef(SPTRef* tref);
- virtual ~CTRef();
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
@@ -73,14 +59,8 @@ public:
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type);
virtual gchar* description();
-
-protected:
- SPTRef* sptref;
};
-
-GType sp_tref_get_type();
-
void sp_tref_update_text(SPTRef *tref);
bool sp_tref_reference_allowed(SPTRef *tref, SPObject *possible_ref);
bool sp_tref_fully_contained(SPObject *start_item, Glib::ustring::iterator &start,