summaryrefslogtreecommitdiffstats
path: root/src/text-context.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2012-05-04 09:35:59 +0000
committerJon A. Cruz <jon@joncruz.org>2012-05-04 09:35:59 +0000
commit3b72e337ab1a812319a9557adcd8fc40c2f36bb7 (patch)
treea64394c27307b434b03a1d09701df516b7150e97 /src/text-context.cpp
parentSyntax of null pointer dereference checking (diff)
downloadinkscape-3b72e337ab1a812319a9557adcd8fc40c2f36bb7.tar.gz
inkscape-3b72e337ab1a812319a9557adcd8fc40c2f36bb7.zip
C++ification of SPCtrlLine in preparation of visibility improvements.
(bzr r11321)
Diffstat (limited to 'src/text-context.cpp')
-rw-r--r--src/text-context.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 94e25069b..2bf172f43 100644
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -200,9 +200,9 @@ static void sp_text_context_setup(SPEventContext *ec)
timeout /= 2;
}
- tc->cursor = sp_canvas_item_new(sp_desktop_controls(desktop), SP_TYPE_CTRLLINE, NULL);
- sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), 100, 0, 100, 100);
- sp_ctrlline_set_rgba32(SP_CTRLLINE(tc->cursor), 0x000000ff);
+ tc->cursor = SP_CTRLLINE(sp_canvas_item_new(sp_desktop_controls(desktop), SP_TYPE_CTRLLINE, NULL));
+ tc->cursor->setCoords(100, 0, 100, 100);
+ tc->cursor->setRgba32(0x000000ff);
sp_canvas_item_hide(tc->cursor);
tc->indicator = sp_canvas_item_new(sp_desktop_controls(desktop), SP_TYPE_CTRLRECT, NULL);
@@ -302,7 +302,7 @@ static void sp_text_context_finish(SPEventContext *ec)
}
if (tc->cursor) {
- gtk_object_destroy(GTK_OBJECT(tc->cursor));
+ gtk_object_destroy(tc->cursor);
tc->cursor = NULL;
}
@@ -708,7 +708,7 @@ static gint sp_text_context_root_handler(SPEventContext *const event_context, Gd
// Cursor height is defined by the new text object's font size; it needs to be set
// artificially here, for the text object does not exist yet:
double cursor_height = sp_desktop_get_font_size_tool(desktop);
- sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), p1, p1 + Geom::Point(0, cursor_height));
+ tc->cursor->setCoords(p1, p1 + Geom::Point(0, cursor_height));
if (tc->imc) {
GdkRectangle im_cursor;
Geom::Point const top_left = SP_EVENT_CONTEXT(tc)->desktop->get_display_area().corner(3);
@@ -1608,7 +1608,7 @@ static void sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see
}
sp_canvas_item_show(tc->cursor);
- sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), d0, d1);
+ tc->cursor->setCoords(d0, d1);
/* fixme: ... need another transformation to get canvas widget coordinate space? */
if (tc->imc) {
@@ -1699,10 +1699,10 @@ static gint sp_text_context_timeout(SPTextContext *tc)
sp_canvas_item_show(tc->cursor);
if (tc->phase) {
tc->phase = 0;
- sp_ctrlline_set_rgba32(SP_CTRLLINE(tc->cursor), 0x000000ff);
+ tc->cursor->setRgba32(0x000000ff);
} else {
tc->phase = 1;
- sp_ctrlline_set_rgba32(SP_CTRLLINE(tc->cursor), 0xffffffff);
+ tc->cursor->setRgba32(0xffffffff);
}
}