summaryrefslogtreecommitdiffstats
path: root/src/text-context.cpp
diff options
context:
space:
mode:
authorJosh Andler <scislac@gmail.com>2006-06-19 02:23:07 +0000
committerscislac <scislac@users.sourceforge.net>2006-06-19 02:23:07 +0000
commitbb05f0d4bf3818eec40efbf0ca30ae4bd21a65b4 (patch)
tree9b288ae8f76ae6ca2ed6ae4f4bc4fce0f7df6ab5 /src/text-context.cpp
parentadded vietnamese as translation package (diff)
downloadinkscape-bb05f0d4bf3818eec40efbf0ca30ae4bd21a65b4.tar.gz
inkscape-bb05f0d4bf3818eec40efbf0ca30ae4bd21a65b4.zip
initial color cursor implementation (reads from pixbufs, will work on reading from svg instead)
(bzr r1227)
Diffstat (limited to 'src/text-context.cpp')
-rw-r--r--src/text-context.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp
index e48d715c4..945813f1b 100644
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -39,7 +39,9 @@
#include "message-stack.h"
#include "message-context.h"
#include "pixmaps/cursor-text.xpm"
+#include "pixmaps/cursor-text.pixbuf"
#include "pixmaps/cursor-text-insert.xpm"
+#include "pixmaps/cursor-text-insert.pixbuf"
#include <glibmm/i18n.h>
#include "object-edit.h"
#include "xml/repr.h"
@@ -122,6 +124,11 @@ sp_text_context_init(SPTextContext *tc)
SPEventContext *event_context = SP_EVENT_CONTEXT(tc);
event_context->cursor_shape = cursor_text_xpm;
+ event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline(
+ -1,
+ cursor_text_pixbuf,
+ FALSE,
+ NULL);
event_context->hot_x = 7;
event_context->hot_y = 7;
@@ -438,6 +445,11 @@ sp_text_context_item_handler(SPEventContext *ec, SPItem *item, GdkEvent *event)
SP_CTRLRECT(tc->indicator)->setRectangle(sp_item_bbox_desktop(item_ungrouped));
ec->cursor_shape = cursor_text_insert_xpm;
+ ec->cursor_pixbuf = gdk_pixbuf_new_from_inline(
+ -1,
+ cursor_text_insert_pixbuf,
+ FALSE,
+ NULL);
ec->hot_x = 7;
ec->hot_y = 10;
sp_event_context_update_cursor(ec);
@@ -624,6 +636,11 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
tc->over_text = 0;
// update cursor and statusbar: we are not over a text object now
ec->cursor_shape = cursor_text_xpm;
+ ec->cursor_pixbuf = gdk_pixbuf_new_from_inline(
+ -1,
+ cursor_text_pixbuf,
+ FALSE,
+ NULL);
ec->hot_x = 7;
ec->hot_y = 7;
sp_event_context_update_cursor(ec);