From 1d8f1753cd8cab38d19fcc26a4ad70ba2e794ac8 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 9 Apr 2013 22:12:07 +0200 Subject: Added constructors to EventContext tree / some missing virtual pads. (bzr r11608.1.90) --- src/draw-context.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/draw-context.cpp') 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); -- cgit v1.2.3