Code

r11516@tres: ted | 2006-04-26 21:30:18 -0700
[inkscape.git] / src / nodepath.h
index 84c83be53881c8f523701f5c3871cd8fb955440f..c9315470fa3f082105491c609422cef9573b7976 100644 (file)
@@ -16,6 +16,7 @@
 //#include "sp-path.h"
 //#include "desktop-handles.h"
 #include "libnr/nr-path-code.h"
+#include "livarot/Path.h"
 
 #include <list>
 
@@ -30,7 +31,7 @@ class Node;
 }
 
 
-/** 
+/**
  * Radial objects are represented by an angle and a distance from
  * 0,0.  0,0 is represented by a == big_num.
  */
@@ -126,6 +127,12 @@ class Path {
        Inkscape::XML::Node *repr;
        //STL compliant method to get the selected nodes
        void selection(std::list<Node *> &l);
+
+      /// livarot library is used for "point on path" and "nearest position on path", so we need to maintain its path representation as well
+       ::Path *livarot_path;
+
+      /// true if we changed repr, to tell this change from an external one such as from undo, simplify, or another desktop
+       unsigned int local_change;
 };
 
 
@@ -235,12 +242,13 @@ void restore_nodepath_selection (Inkscape::NodePath::Path *nodepath, GList *r);
 gboolean nodepath_repr_d_changed (Inkscape::NodePath::Path * np, const char *newd);
 gboolean nodepath_repr_typestr_changed (Inkscape::NodePath::Path * np, const char *newtypestr);
 gboolean node_key (GdkEvent * event);
+void sp_nodepath_update_repr(Inkscape::NodePath::Path *np);
 void sp_nodepath_update_statusbar (Inkscape::NodePath::Path *nodepath);
 void sp_nodepath_selected_align(Inkscape::NodePath::Path *nodepath, NR::Dim2 axis);
 void sp_nodepath_selected_distribute(Inkscape::NodePath::Path *nodepath, NR::Dim2 axis);
-void sp_nodepath_select_segment_near_point(SPItem * item, NR::Point p, bool toggle);
-void sp_nodepath_add_node_near_point(SPItem * item, NR::Point p);
-void sp_nodepath_curve_drag(Inkscape::NodePath::Node * e, double t, NR::Point delta, char * key);
+void sp_nodepath_select_segment_near_point(Inkscape::NodePath::Path *nodepath, NR::Point p, bool toggle);
+void sp_nodepath_add_node_near_point(Inkscape::NodePath::Path *nodepath, NR::Point p);
+void sp_nodepath_curve_drag(Inkscape::NodePath::Node * e, double t, NR::Point delta);
 Inkscape::NodePath::Node * sp_nodepath_get_node_by_index(int index);
 /* possibly private functions */
 
@@ -249,6 +257,7 @@ void sp_node_selected_break (void);
 void sp_node_selected_duplicate (void);
 void sp_node_selected_join (void);
 void sp_node_selected_join_segment (void);
+void sp_node_delete_preserve (GList *nodes_to_delete);
 void sp_node_selected_delete (void);
 void sp_node_selected_delete_segment (void);
 void sp_node_selected_set_type (Inkscape::NodePath::NodeType type);