Code

fix shift+middle button zoom area when there are other modifiers in the mask; safe...
[inkscape.git] / src / live_effects / parameter / parameter.h
index 23faffc308c7506f38eb85f686bfbacdcc4676c2..61c151b0e9e8398546aed9725df9846a730bfea8 100644 (file)
  */
 
 #include <glibmm/ustring.h>
-#include <2geom/point.h>
-#include <2geom/path.h>
+#include <2geom/forward.h>
+#include <2geom/pathvector.h>
 
+class KnotHolder;
+class SPLPEItem;
 struct SPDesktop;
 struct SPItem;
 
@@ -47,8 +49,9 @@ public:
     virtual ~Parameter() {};
 
     virtual bool param_readSVGValue(const gchar * strvalue) = 0;   // returns true if new value is valid / accepted.
-    virtual gchar * param_writeSVGValue() const = 0;
-
+    virtual gchar * param_getSVGValue() const = 0;
+    void write_to_SVG() { param_write_to_repr(param_getSVGValue()); }
     virtual void param_set_default() = 0;
 
     // This creates a new widget (newed with Gtk::manage(new ...);)
@@ -56,6 +59,11 @@ public:
 
     virtual Glib::ustring * param_getTooltip() { return &param_tooltip; };
 
+    // overload these for your particular parameter to make it provide knotholder handles or canvas helperpaths
+    virtual bool providesKnotHolderEntities() { return false; }
+    virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPDesktop */*desktop*/, SPItem */*item*/) {};
+    virtual void addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {};
+
     virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {};
     virtual void param_setup_nodepath(Inkscape::NodePath::Path */*np*/) {};
 
@@ -66,6 +74,7 @@ public:
     Glib::ustring param_label;
 
     bool oncanvas_editable;
+    bool widget_is_visible;
 
 protected:
     Glib::ustring param_tooltip;
@@ -91,7 +100,7 @@ public:
     virtual ~ScalarParam();
 
     virtual bool param_readSVGValue(const gchar * strvalue);
-    virtual gchar * param_writeSVGValue() const;
+    virtual gchar * param_getSVGValue() const;
 
     virtual void param_set_default();
     void param_set_value(gdouble val);