diff --git a/src/nodepath.h b/src/nodepath.h
index 967650818764710eb0d6089b5b616a0c18206db4..29d34addd774cbbf02ccc193873701615a35f118 100644 (file)
--- a/src/nodepath.h
+++ b/src/nodepath.h
//#include "desktop-handles.h"
#include "libnr/nr-path-code.h"
#include "livarot/Path.h"
+#include <glibmm/ustring.h>
#include <list>
/** Pointer to the current desktop, for reporting purposes */
SPDesktop * desktop;
/** The parent path of this nodepath */
- SPPath * path;
+ SPObject * object;
/** The context which created this nodepath. Important if this nodepath is deleted */
ShapeEditor *shape_editor;
/** The subpaths which comprise this NodePath */
njh: I'd be guessing that these are item <-> desktop transforms.*/
NR::Matrix i2d, d2i;
/** The DOM node which describes this NodePath */
- Inkscape::XML::Node *repr;
+ Inkscape::XML::Node *repr;
+ gchar *repr_key;
+ gchar *repr_nodetypes_key;
//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;
+
+ /// draw a "sketch" of the path by using these variables
+ SPCanvasItem *helper_path;
+ SPCurve *curve;
+ bool show_helperpath;
/// 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;
/// true if we're showing selected nodes' handles
bool show_handles;
+ /// true if the path cannot contain curves, just straight lines
+ bool straight_path;
+
/// active_node points to the node that is currently mouseovered (= NULL if
/// there isn't any); we also consider the node mouseovered if it is covered
/// by one of its handles and the latter is mouseovered
};
// Do function documentation in nodepath.cpp
-Inkscape::NodePath::Path * sp_nodepath_new (SPDesktop * desktop, SPItem * item, bool show_handles);
+Inkscape::NodePath::Path * sp_nodepath_new (SPDesktop * desktop, SPObject *object, bool show_handles, const char * repr_key = NULL);
void sp_nodepath_destroy (Inkscape::NodePath::Path * nodepath);
void sp_nodepath_ensure_livarot_path(Inkscape::NodePath::Path *np);
void sp_nodepath_deselect (Inkscape::NodePath::Path *nodepath);
Inkscape::NodePath::Node * sp_nodepath_get_node_by_index(int index);
/* possibly private functions */
-void sp_node_selected_add_node (void);
-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_selected_add_node (Inkscape::NodePath::Path *nodepath);
+void sp_node_selected_break (Inkscape::NodePath::Path *nodepath);
+void sp_node_selected_duplicate (Inkscape::NodePath::Path *nodepath);
+void sp_node_selected_join (Inkscape::NodePath::Path *nodepath);
+void sp_node_selected_join_segment (Inkscape::NodePath::Path *nodepath);
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);
-void sp_node_selected_set_line_type (NRPathcode code);
-void sp_node_selected_move (gdouble dx, gdouble dy);
-void sp_node_selected_move_screen (gdouble dx, gdouble dy);
-
-void sp_nodepath_show_handles(bool show);
+void sp_node_selected_delete (Inkscape::NodePath::Path *nodepath);
+void sp_node_selected_delete_segment (Inkscape::NodePath::Path *nodepath);
+void sp_node_selected_set_type (Inkscape::NodePath::Path *nodepath, Inkscape::NodePath::NodeType type);
+void sp_node_selected_set_line_type (Inkscape::NodePath::Path *nodepath, NRPathcode code);
+void sp_node_selected_move (Inkscape::NodePath::Path *nodepath, gdouble dx, gdouble dy);
+void sp_node_selected_move_screen (Inkscape::NodePath::Path *nodepath, gdouble dx, gdouble dy);
+
+void sp_nodepath_show_handles(Inkscape::NodePath::Path *nodepath, bool show);
void sp_nodepath_selected_nodes_rotate (Inkscape::NodePath::Path * nodepath, gdouble angle, int which, bool screen);