Code

Filter effects dialog:
[inkscape.git] / src / nodepath.h
index 0216af730952a00c19527a35e89ffdacda4acf07..7e4066769b9f0c4c90a638c290a3bd28cd9d38bd 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 */
@@ -136,6 +134,11 @@ class Path {
 
        /// 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;
 };
 
 
@@ -263,30 +266,30 @@ void sp_nodepath_selected_align(Inkscape::NodePath::Path *nodepath, NR::Dim2 axi
 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 */
 
-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_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(bool show);
+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);
 
 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