Code

A little bit of refactoring of constrained object snapping
[inkscape.git] / src / node-context.h
index a4086da2b7c09d1c6ed9d5636291642a5828f0d9..3e42b74b931bff515fdb791cf4d04734ae91346a 100644 (file)
@@ -14,6 +14,7 @@
 #include <sigc++/sigc++.h>
 #include "event-context.h"
 #include "forward.h"
+#include "display/display-forward.h"
 #include "nodepath.h"
 struct SPKnotHolder;
 namespace Inkscape { class Selection; }
@@ -24,6 +25,10 @@ namespace Inkscape { class Selection; }
 #define SP_IS_NODE_CONTEXT(obj)         (GTK_CHECK_TYPE ((obj), SP_TYPE_NODE_CONTEXT))
 #define SP_IS_NODE_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_NODE_CONTEXT))
 
+enum { SP_NODE_CONTEXT_INACTIVE,
+       SP_NODE_CONTEXT_NODE_DRAGGING,
+       SP_NODE_CONTEXT_RUBBERBAND_DRAGGING };
+
 class SPNodeContext;
 class SPNodeContextClass;
 
@@ -32,12 +37,12 @@ struct SPNodeContext {
 
        guint drag : 1;
 
-       Inkscape::NodePath::Path *nodepath;
+       ShapeEditor* shape_editor;
 
-       bool leftalt;
-       bool rightalt;
-       bool leftctrl;
-       bool rightctrl;
+       gboolean leftalt;
+       gboolean rightalt;
+       gboolean leftctrl;
+       gboolean rightctrl;
 
       /// If true, rubberband was cancelled by esc, so the next button release should not deselect.
        bool rb_escaped;
@@ -46,14 +51,15 @@ struct SPNodeContext {
 
        Inkscape::MessageContext *_node_message_context;
 
-       double grab_t;
-       Inkscape::NodePath::Node * grab_node;
-       bool hit;
-       NR::Point curvepoint_event; // int coords from event
-       NR::Point curvepoint_doc; // same, in doc coords
        bool cursor_drag;
 
-       bool added_node;
+    bool added_node;
+  
+    unsigned int current_state;
+    SPItem * flashed_item;
+    Inkscape::Display::TemporaryItem * flash_tempitem;
+    int remove_flash_counter;
 };
 
 struct SPNodeContextClass {