summaryrefslogtreecommitdiffstats
path: root/src/sp-root.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-root.h')
-rw-r--r--src/sp-root.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/sp-root.h b/src/sp-root.h
index e2bad917b..a9f64a53b 100644
--- a/src/sp-root.h
+++ b/src/sp-root.h
@@ -19,16 +19,17 @@
#include "enums.h"
#include "sp-item-group.h"
-#define SP_TYPE_ROOT (sp_root_get_type())
-#define SP_ROOT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_ROOT, SPRoot))
-#define SP_ROOT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SP_TYPE_ROOT, SPRootClass))
-#define SP_IS_ROOT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_ROOT))
-#define SP_IS_ROOT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_ROOT))
+#define SP_ROOT(obj) (dynamic_cast<SPRoot*>((SPObject*)obj))
+#define SP_IS_ROOT(obj) (dynamic_cast<const SPRoot*>((SPObject*)obj) != NULL)
class SPDefs;
/** \<svg\> element */
-struct SPRoot : public SPGroup {
+class SPRoot : public SPGroup {
+public:
+ SPRoot();
+ virtual ~SPRoot();
+
struct {
Inkscape::Version svg;
Inkscape::Version inkscape;
@@ -60,14 +61,20 @@ struct SPRoot : public SPGroup {
* this \<svg\> element: see writers of this member in sp-root.cpp.
*/
SPDefs *defs;
-};
-struct SPRootClass {
- SPGroupClass parent_class;
-};
+ virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
+ virtual void release();
+ virtual void set(unsigned int key, gchar const* value);
+ virtual void update(SPCtx *ctx, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
-GType sp_root_get_type();
+ virtual void modified(unsigned int flags);
+ virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
+ virtual void remove_child(Inkscape::XML::Node* child);
+ virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
+ virtual void print(SPPrintContext *ctx);
+};
#endif /* !SP_ROOT_H_SEEN */