index c4e58c8d5d21ae3d5d3cb82ef055a9dfca7f483d..ff878e717ac1f8daaef18c206fabdc15f124d78b 100644 (file)
#include <glibmm/ustring.h>
#include <2geom/forward.h>
+#include <2geom/pathvector.h>
+class KnotHolder;
+class SPLPEItem;
struct SPDesktop;
struct SPItem;
class Effect;
-enum ParamType {
- GENERAL_PARAM,
- SCALAR_PARAM,
- BOOL_PARAM,
- PATH_PARAM,
- POINT_PARAM,
- RANDOM_PARAM,
- ENUM_PARAM,
- INVALID_PARAM
-};
-
class Parameter {
public:
Parameter( const Glib::ustring& label,
virtual void param_set_default() = 0;
- void printTypeName();
- virtual ParamType paramType() { return GENERAL_PARAM; }
-
// This creates a new widget (newed with Gtk::manage(new ...);)
virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips) = 0;
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;
gdouble default_value = 1.0);
virtual ~ScalarParam();
- virtual ParamType paramType() { return SCALAR_PARAM; }
-
virtual bool param_readSVGValue(const gchar * strvalue);
virtual gchar * param_getSVGValue() const;
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :