summaryrefslogtreecommitdiffstats
path: root/src/text-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/text-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/text-context.cpp')
-rw-r--r--src/text-context.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 72fcd6319..f268e8f67 100644
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -88,22 +88,26 @@ static void sp_text_context_class_init(SPTextContextClass *klass)
object_class->dispose = sp_text_context_dispose;
- event_context_class->setup = sp_text_context_setup;
- event_context_class->finish = sp_text_context_finish;
- event_context_class->root_handler = sp_text_context_root_handler;
- event_context_class->item_handler = sp_text_context_item_handler;
+// event_context_class->setup = sp_text_context_setup;
+// event_context_class->finish = sp_text_context_finish;
+// event_context_class->root_handler = sp_text_context_root_handler;
+// event_context_class->item_handler = sp_text_context_item_handler;
}
CTextContext::CTextContext(SPTextContext* textcontext) : CEventContext(textcontext) {
this->sptextcontext = textcontext;
}
-static void sp_text_context_init(SPTextContext *tc)
-{
+SPTextContext::SPTextContext() : SPEventContext() {
+ SPTextContext* tc = this;
+
tc->ctextcontext = new CTextContext(tc);
delete tc->ceventcontext;
tc->ceventcontext = tc->ctextcontext;
+ tc->preedit_string = 0;
+ tc->unipos = 0;
+
SPEventContext *event_context = SP_EVENT_CONTEXT(tc);
event_context->cursor_shape = cursor_text_xpm;
@@ -143,6 +147,11 @@ static void sp_text_context_init(SPTextContext *tc)
new (&tc->style_query_connection) sigc::connection();
}
+static void sp_text_context_init(SPTextContext *tc)
+{
+ new (tc) SPTextContext();
+}
+
static void sp_text_context_dispose(GObject *obj)
{
SPTextContext *tc = SP_TEXT_CONTEXT(obj);