Code

Node tool: special case node duplication for endnodes - select new endnode
[inkscape.git] / src / knotholder.h
index bd57776dbfd4066650b2d9e4f8f8743e6efe5e23..76142ed9826b14b8c9433b9d303a28c35df3ac85 100644 (file)
@@ -21,6 +21,7 @@
 #include "knot-enums.h"
 #include "forward.h"
 #include "libnr/nr-forward.h"
+#include <2geom/forward.h>
 #include "knot-holder-entity.h"
 #include <list>
 
@@ -30,12 +31,6 @@ class Node;
 }
 }
 
-
-typedef void (* SPKnotHolderSetFunc) (SPItem *item, NR::Point const &p, NR::Point const &origin, guint state);
-typedef NR::Point (* SPKnotHolderGetFunc) (SPItem *item);
-/* fixme: Think how to make callbacks most sensitive (Lauris) */
-typedef void (* SPKnotHolderReleasedFunc) (SPItem *item);
-
 class KnotHolder {
 public:
     KnotHolder() {} // do nothing in the default constructor
@@ -44,7 +39,7 @@ public:
 
     void update_knots();
 
-    void knot_moved_handler(SPKnot *knot, NR::Point const *p, guint state);
+    void knot_moved_handler(SPKnot *knot, Geom::Point const &p, guint state);
     void knot_clicked_handler(SPKnot *knot, guint state);
     void knot_ungrabbed_handler(SPKnot *knot);
 
@@ -54,6 +49,8 @@ public:
 
     const SPItem *getItem() { return item; }
 
+    bool knot_mouseover();
+
     friend class ShapeEditor;
 
 protected:
@@ -65,11 +62,13 @@ protected:
     SPKnotHolderReleasedFunc released;
 
     gboolean local_change; ///< if true, no need to recreate knotholder if repr was changed.
+
+    bool dragging;
 };
 
 /**
 void knot_clicked_handler(SPKnot *knot, guint state, gpointer data);
-void knot_moved_handler(SPKnot *knot, NR::Point const *p, guint state, gpointer data);
+void knot_moved_handler(SPKnot *knot, Geom::Point const *p, guint state, gpointer data);
 void knot_ungrabbed_handler(SPKnot *knot, unsigned int state, KnotHolder *kh);
 **/
 
@@ -84,4 +83,4 @@ void knot_ungrabbed_handler(SPKnot *knot, unsigned int state, KnotHolder *kh);
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :