Code

NR::Maybe => boost::optional
[inkscape.git] / src / nodepath.h
index 22cf316a4dc735e760eeaa87589d084cdc91046d..b330ff96415b9ca8a75f8b2f9e7e324e77ed24df 100644 (file)
@@ -30,11 +30,16 @@ class SPKnot;
 class LivePathEffectObject;
 
 namespace Inkscape {
-namespace XML {
-class Node;
-}
+  namespace XML {
+    class Node;
+  }
+
+  namespace LivePathEffect {
+    class Effect;
+  }
 }
 
+typedef std::map<Inkscape::LivePathEffect::Effect *, std::vector<SPCanvasItem *> > HelperPathList;
 
 /**
  * Radial objects are represented by an angle and a distance from
@@ -243,6 +248,9 @@ class Path {
     guint32 helperpath_rgba;
     gdouble helperpath_width;
 
+    // the helperpaths provided by all LPEs (and their paramaters) of the current item
+    HelperPathList* helper_path_vec;
+
       /// 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;
 
@@ -303,14 +311,16 @@ void sp_node_selected_set_type (Inkscape::NodePath::Path *nodepath, Inkscape::No
 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_node_selected_move_absolute (Inkscape::NodePath::Path *nodepath, NR::Coord val, NR::Dim2 axis);
-NR::Rect sp_node_selected_bbox (Inkscape::NodePath::Path *nodepath);
-NR::Maybe<NR::Coord> sp_node_selected_common_coord (Inkscape::NodePath::Path *nodepath, NR::Dim2 axis);
+void sp_node_selected_move_absolute (Inkscape::NodePath::Path *nodepath, Geom::Coord val, Geom::Dim2 axis);
+Geom::Rect sp_node_selected_bbox (Inkscape::NodePath::Path *nodepath);
+boost::optional<Geom::Coord> sp_node_selected_common_coord (Inkscape::NodePath::Path *nodepath, Geom::Dim2 axis);
 
 void sp_nodepath_show_handles(Inkscape::NodePath::Path *nodepath, bool show);
-SPCanvasItem *sp_nodepath_generate_helperpath(SPDesktop *desktop, SPCurve *curve, const SPItem *item, guint32 color);
-SPCanvasItem *sp_nodepath_generate_helperpath(SPDesktop *desktop, SPPath *path);
+//SPCanvasItem *sp_nodepath_generate_helperpath(SPDesktop *desktop, SPCurve *curve, const SPItem *item, guint32 color);
+//SPCanvasItem *sp_nodepath_generate_helperpath(SPDesktop *desktop, SPPath *path);
+SPCanvasItem *sp_nodepath_helperpath_from_path(SPDesktop *desktop, SPPath *path);
 void sp_nodepath_show_helperpath(Inkscape::NodePath::Path *nodepath, bool show);
+void sp_nodepath_update_helperpaths(Inkscape::NodePath::Path *np);
 void sp_nodepath_make_straight_path(Inkscape::NodePath::Path *np);
 
 void sp_nodepath_selected_nodes_rotate (Inkscape::NodePath::Path * nodepath, gdouble angle, int which, bool screen);
@@ -318,6 +328,6 @@ void sp_nodepath_selected_nodes_rotate (Inkscape::NodePath::Path * nodepath, gdo
 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, NR::Maybe<NR::Point> center);
+void sp_nodepath_flip (Inkscape::NodePath::Path *nodepath, NR::Dim2 axis, boost::optional<NR::Point> center);
 
 #endif