summaryrefslogtreecommitdiffstats
path: root/src/draw-context.cpp
diff options
context:
space:
mode:
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);