summaryrefslogtreecommitdiffstats
path: root/src/eraser-context.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-09 20:12:07 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-09 20:12:07 +0000
commit1d8f1753cd8cab38d19fcc26a4ad70ba2e794ac8 (patch)
treeb010ac32dcfd9923c2ec38dff3b70955242dfa70 /src/eraser-context.cpp
parentStarted conversion of SPEventContext tree; added virtual pads to all classes. (diff)
downloadinkscape-1d8f1753cd8cab38d19fcc26a4ad70ba2e794ac8.tar.gz
inkscape-1d8f1753cd8cab38d19fcc26a4ad70ba2e794ac8.zip
Added constructors to EventContext tree / some missing virtual pads.
(bzr r11608.1.90)
Diffstat (limited to 'src/eraser-context.cpp')
-rw-r--r--src/eraser-context.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp
index 59cce31bd..01d3adcf6 100644
--- a/src/eraser-context.cpp
+++ b/src/eraser-context.cpp
@@ -111,18 +111,18 @@ sp_eraser_context_class_init(SPEraserContextClass *klass)
object_class->dispose = sp_eraser_context_dispose;
- event_context_class->setup = sp_eraser_context_setup;
- event_context_class->set = sp_eraser_context_set;
- event_context_class->root_handler = sp_eraser_context_root_handler;
+// event_context_class->setup = sp_eraser_context_setup;
+// event_context_class->set = sp_eraser_context_set;
+// event_context_class->root_handler = sp_eraser_context_root_handler;
}
CEraserContext::CEraserContext(SPEraserContext* erasercontext) : CCommonContext(erasercontext) {
this->sperasercontext = erasercontext;
}
-static void
-sp_eraser_context_init(SPEraserContext *erc)
-{
+SPEraserContext::SPEraserContext() : SPCommonContext() {
+ SPEraserContext* erc = this;
+
erc->cerasercontext = new CEraserContext(erc);
delete erc->ccommoncontext;
erc->ccommoncontext = erc->cerasercontext;
@@ -134,6 +134,12 @@ sp_eraser_context_init(SPEraserContext *erc)
}
static void
+sp_eraser_context_init(SPEraserContext *erc)
+{
+ new (erc) SPEraserContext();
+}
+
+static void
sp_eraser_context_dispose(GObject *object)
{
G_OBJECT_CLASS(sp_eraser_context_parent_class)->dispose(object);