Code

Implement selection linear grow
[inkscape.git] / src / node-context.h
index a9b4beb07614b37402a188dafff64d787230d65a..2345ffc7e798d7359aab7bc8eed6b3f8e37979b7 100644 (file)
  * This code is in public domain
  */
 
+#include <gtk/gtktypeutils.h>
 #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; }
 
 #define SP_TYPE_NODE_CONTEXT            (sp_node_context_get_type ())
@@ -24,16 +25,19 @@ 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;
 
 struct SPNodeContext {
+        // FIXME: shouldn't this be a pointer???
        SPEventContext event_context;
 
        guint drag : 1;
 
-       Inkscape::NodePath::Path *nodepath;
-
        gboolean leftalt;
        gboolean rightalt;
        gboolean leftctrl;
@@ -46,14 +50,16 @@ 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;
+       SPCanvasItem *grabbed;
+    Inkscape::Display::TemporaryItem * flash_tempitem;
+    int remove_flash_counter;
 };
 
 struct SPNodeContextClass {
@@ -65,5 +71,17 @@ struct SPNodeContextClass {
 GtkType sp_node_context_get_type (void);
 
 void sp_node_context_selection_changed (Inkscape::Selection * selection, gpointer data);
+void sp_node_context_selection_modified (Inkscape::Selection * selection, guint flags, gpointer data);
 
 #endif
+
+/*
+  Local Variables:
+  mode:c++
+  c-file-style:"stroustrup"
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+  indent-tabs-mode:nil
+  fill-column:99
+  End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :