Code

add document to action events
[inkscape.git] / src / nodepath.h
index 2b6131684cb1ce8c27730780ab804fe4ad1852b6..967650818764710eb0d6089b5b616a0c18206db4 100644 (file)
@@ -73,8 +73,7 @@ operator NR::Point() const
 
 };
 
-/** defined in node-context.h */
-class SPNodeContext;
+class ShapeEditor;
 
 namespace Inkscape {
 namespace NodePath {
@@ -96,7 +95,6 @@ class NodeSide;
  */
 class Node;
 
-
 /**
  *  This is a collection of subpaths which contain nodes
  *
@@ -115,7 +113,7 @@ class Path {
 /**  The parent path of this nodepath */
        SPPath * path;
 /**  The context which created this nodepath.  Important if this nodepath is deleted */
-       SPNodeContext * nodeContext;
+       ShapeEditor *shape_editor;
 /**  The subpaths which comprise this NodePath */
        GList * subpaths;
 /**  A list of nodes which are currently selected */
@@ -133,6 +131,14 @@ class 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;
+
+       /// true if we're showing selected nodes' handles
+       bool show_handles;
+
+       /// 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
+       static Node *active_node;
 };
 
 
@@ -225,14 +231,24 @@ class Node {
 
        /** The pointer to the nodeside which we are dragging out with Shift */
        NodeSide *dragging_out;
+  
+  /** Boolean.  Am I being dragged? */
+  guint is_dragging : 1;
 };
 
 }  // namespace NodePath
 }  // namespace Inkscape
 
+enum {
+  SCULPT_PROFILE_LINEAR,
+  SCULPT_PROFILE_BELL,
+  SCULPT_PROFILE_ELLIPTIC
+};
+
 // Do function documentation in nodepath.cpp
-Inkscape::NodePath::Path * sp_nodepath_new (SPDesktop * desktop, SPItem * item);
+Inkscape::NodePath::Path * sp_nodepath_new (SPDesktop * desktop, SPItem * item, bool show_handles);
 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);
 void sp_nodepath_select_all (Inkscape::NodePath::Path *nodepath, bool invert);
 void sp_nodepath_select_all_from_subpath(Inkscape::NodePath::Path *nodepath, bool invert);
@@ -244,13 +260,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_repr(Inkscape::NodePath::Path *np, const gchar *annotation);
 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(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);
+void sp_nodepath_curve_drag(int node, double t, NR::Point delta);
 Inkscape::NodePath::Node * sp_nodepath_get_node_by_index(int index);
 /* possibly private functions */
 
@@ -267,11 +283,13 @@ 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_nodepath_selected_nodes_rotate (Inkscape::NodePath::Path * nodepath, gdouble angle, int which, bool screen);
 
 void sp_nodepath_selected_nodes_scale (Inkscape::NodePath::Path * nodepath, gdouble grow, int which);
 void sp_nodepath_selected_nodes_scale_screen (Inkscape::NodePath::Path * nodepath, gdouble grow, int which);
 
-void sp_nodepath_flip (Inkscape::NodePath::Path *nodepath, NR::Dim2 axis);
+void sp_nodepath_flip (Inkscape::NodePath::Path *nodepath, NR::Dim2 axis, NR::Maybe<NR::Point> center);
 
 #endif