summaryrefslogtreecommitdiffstats
path: root/src/node-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/node-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/node-context.cpp')
-rw-r--r--src/node-context.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/node-context.cpp b/src/node-context.cpp
index d7848e3bb..c689f9244 100644
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
@@ -26,9 +26,11 @@
#include "desktop-handles.h"
#include "selection.h"
#include "pixmaps/cursor-node.xpm"
+#include "pixmaps/cursor-node.pixbuf"
#include "message-context.h"
#include "node-context.h"
#include "pixmaps/cursor-node-d.xpm"
+#include "pixmaps/cursor-node-d.pixbuf"
#include "prefs-utils.h"
#include "xml/node-event-vector.h"
#include "style.h"
@@ -98,6 +100,11 @@ sp_node_context_init(SPNodeContext *node_context)
SPEventContext *event_context = SP_EVENT_CONTEXT(node_context);
event_context->cursor_shape = cursor_node_xpm;
+ event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline(
+ -1,
+ cursor_node_pixbuf,
+ FALSE,
+ NULL);
event_context->hot_x = 1;
event_context->hot_y = 1;
@@ -584,12 +591,22 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event)
if (nc->cursor_drag && !over_stroke) {
event_context->cursor_shape = cursor_node_xpm;
+ event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline(
+ -1,
+ cursor_node_pixbuf,
+ FALSE,
+ NULL);
event_context->hot_x = 1;
event_context->hot_y = 1;
sp_event_context_update_cursor(event_context);
nc->cursor_drag = false;
} else if (!nc->cursor_drag && over_stroke) {
event_context->cursor_shape = cursor_node_d_xpm;
+ event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline(
+ -1,
+ cursor_node_d_pixbuf,
+ FALSE,
+ NULL);
event_context->hot_x = 1;
event_context->hot_y = 1;
sp_event_context_update_cursor(event_context);