diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-04-02 17:14:36 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-04-02 17:14:36 +0000 |
| commit | d1af3566872dfff2aeec84859c87f1f8d13f79df (patch) | |
| tree | f52de634baaf9cce333012b29437979881c7ac22 /src/box3d.cpp | |
| parent | Added new factory for SPObject tree objects. (diff) | |
| download | inkscape-d1af3566872dfff2aeec84859c87f1f8d13f79df.tar.gz inkscape-d1af3566872dfff2aeec84859c87f1f8d13f79df.zip | |
Registered classes with new factory. Hkern, Vkern and FeFuncX have to be rewritten, as they aren't real classes.
(bzr r11608.1.69)
Diffstat (limited to 'src/box3d.cpp')
| -rw-r--r-- | src/box3d.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/box3d.cpp b/src/box3d.cpp index 8f7c20c49..c3f6a1dbb 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -43,6 +43,16 @@ static void box3d_ref_changed(SPObject *old_ref, SPObject *ref, SPBox3D *box); static gint counter = 0; +#include "sp-factory.h" + +namespace { + SPObject* createBox3D() { + return new SPBox3D(); + } + + bool box3DRegistered = SPFactory::instance().registerObject("inkscape:box3d", createBox3D); +} + G_DEFINE_TYPE(SPBox3D, box3d, G_TYPE_OBJECT); static void box3d_class_init(SPBox3DClass *klass) |
