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;
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 ...);)
virtual Glib::ustring * param_getTooltip() { return ¶m_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*/) {};
Glib::ustring param_label;
bool oncanvas_editable;
+ bool widget_is_visible;
protected:
Glib::ustring param_tooltip;
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);