summaryrefslogtreecommitdiffstats
path: root/src/draw-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/draw-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/draw-context.cpp')
-rw-r--r--src/draw-context.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 647a9c192..cdb0aeeaa 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -86,22 +86,27 @@ static void sp_draw_context_class_init(SPDrawContextClass *klass)
object_class->dispose = sp_draw_context_dispose;
- ec_class->setup = sp_draw_context_setup;
- ec_class->set = sp_draw_context_set;
- ec_class->finish = sp_draw_context_finish;
- ec_class->root_handler = sp_draw_context_root_handler;
+// ec_class->setup = sp_draw_context_setup;
+// ec_class->set = sp_draw_context_set;
+// ec_class->finish = sp_draw_context_finish;
+// ec_class->root_handler = sp_draw_context_root_handler;
}
CDrawContext::CDrawContext(SPDrawContext* drawcontext) : CEventContext(drawcontext) {
this->spdrawcontext = drawcontext;
}
-static void sp_draw_context_init(SPDrawContext *dc)
-{
+SPDrawContext::SPDrawContext() : SPEventContext() {
+ SPDrawContext* dc = this;
+
dc->cdrawcontext = new CDrawContext(dc);
delete dc->ceventcontext;
dc->ceventcontext = dc->cdrawcontext;
+ dc->selection = 0;
+ dc->grab = 0;
+ dc->anchor_statusbar = false;
+
dc->attach = FALSE;
dc->red_color = 0xff00007f;
@@ -133,6 +138,11 @@ static void sp_draw_context_init(SPDrawContext *dc)
new (&dc->sel_modified_connection) sigc::connection();
}
+static void sp_draw_context_init(SPDrawContext *dc)
+{
+ new (dc) SPDrawContext();
+}
+
static void sp_draw_context_dispose(GObject *object)
{
SPDrawContext *dc = SP_DRAW_CONTEXT(object);