Code

add breton win32 installer translation
[inkscape.git] / src / node-context.h
1 #ifndef __SP_NODE_CONTEXT_H__
2 #define __SP_NODE_CONTEXT_H__
4 /*
5  * Node editing context
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   bulia byak <buliabyak@users.sf.net>
10  *
11  * This code is in public domain
12  */
14 #include <sigc++/sigc++.h>
15 #include "event-context.h"
16 #include "forward.h"
17 #include "display/display-forward.h"
18 #include "nodepath.h"
19 struct SPKnotHolder;
20 namespace Inkscape { class Selection; }
22 #define SP_TYPE_NODE_CONTEXT            (sp_node_context_get_type ())
23 #define SP_NODE_CONTEXT(obj)            (GTK_CHECK_CAST ((obj), SP_TYPE_NODE_CONTEXT, SPNodeContext))
24 #define SP_NODE_CONTEXT_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_NODE_CONTEXT, SPNodeContextClass))
25 #define SP_IS_NODE_CONTEXT(obj)         (GTK_CHECK_TYPE ((obj), SP_TYPE_NODE_CONTEXT))
26 #define SP_IS_NODE_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_NODE_CONTEXT))
28 enum { SP_NODE_CONTEXT_INACTIVE,
29        SP_NODE_CONTEXT_NODE_DRAGGING,
30        SP_NODE_CONTEXT_RUBBERBAND_DRAGGING };
32 class SPNodeContext;
33 class SPNodeContextClass;
35 struct SPNodeContext {
36         SPEventContext event_context;
38         guint drag : 1;
40         ShapeEditor* shape_editor;
42         gboolean leftalt;
43         gboolean rightalt;
44         gboolean leftctrl;
45         gboolean rightctrl;
47       /// If true, rubberband was cancelled by esc, so the next button release should not deselect.
48         bool rb_escaped;
50         sigc::connection sel_changed_connection;
52         Inkscape::MessageContext *_node_message_context;
54         bool cursor_drag;
56     bool added_node;
57   
58     unsigned int current_state;
59  
60     SPItem * flashed_item;
61     Inkscape::Display::TemporaryItem * flash_tempitem;
62     int remove_flash_counter;
63 };
65 struct SPNodeContextClass {
66         SPEventContextClass parent_class;
67 };
69 /* Standard Gtk function */
71 GtkType sp_node_context_get_type (void);
73 void sp_node_context_selection_changed (Inkscape::Selection * selection, gpointer data);
75 #endif