summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/parameter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/parameter/parameter.h')
-rw-r--r--src/live_effects/parameter/parameter.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h
index 0ef28650a..7ab7e30dd 100644
--- a/src/live_effects/parameter/parameter.h
+++ b/src/live_effects/parameter/parameter.h
@@ -12,6 +12,7 @@
#include <glibmm/ustring.h>
#include <2geom/forward.h>
#include <2geom/pathvector.h>
+#include "ui/widget/registered-widget.h"
// In gtk2, this wasn't an issue; we could toss around
// G_MAXDOUBLE and not worry about size allocations. But
@@ -56,10 +57,11 @@ public:
virtual bool param_readSVGValue(const gchar * strvalue) = 0; // returns true if new value is valid / accepted.
virtual gchar * param_getSVGValue() const = 0;
+ virtual void param_widget_is_visible(bool is_visible) {widget_is_visible = is_visible;}
void write_to_SVG();
virtual void param_set_default() = 0;
-
+ virtual void param_update_default(const gchar * default_value) = 0;
// This creates a new widget (newed with Gtk::manage(new ...);)
virtual Gtk::Widget * param_newWidget() = 0;
@@ -67,7 +69,7 @@ public:
// overload these for your particular parameter to make it provide knotholder handles or canvas helperpaths
virtual bool providesKnotHolderEntities() const { return false; }
- virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPDesktop */*desktop*/, SPItem */*item*/) {};
+ virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPItem */*item*/) {};
virtual void addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {};
virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {};
@@ -76,6 +78,7 @@ public:
virtual void param_transform_multiply(Geom::Affine const& /*postmul*/, bool /*set*/) {};
Glib::ustring param_key;
+ Glib::ustring param_tooltip;
Inkscape::UI::Widget::Registry * param_wr;
Glib::ustring param_label;
@@ -83,7 +86,6 @@ public:
bool widget_is_visible;
protected:
- Glib::ustring param_tooltip;
Effect* param_effect;
@@ -102,23 +104,24 @@ public:
const Glib::ustring& key,
Inkscape::UI::Widget::Registry* wr,
Effect* effect,
- gdouble default_value = 1.0,
- bool no_widget = false);
+ gdouble default_value = 1.0);
virtual ~ScalarParam();
virtual bool param_readSVGValue(const gchar * strvalue);
virtual gchar * param_getSVGValue() const;
virtual void param_set_default();
+ void param_update_default(gdouble default_value);
+ virtual void param_update_default(const gchar * default_value);
void param_set_value(gdouble val);
void param_make_integer(bool yes = true);
void param_set_range(gdouble min, gdouble max);
void param_set_digits(unsigned digits);
void param_set_increments(double step, double page);
-
void addSlider(bool add_slider_widget) { add_slider = add_slider_widget; };
-
- void param_overwrite_widget(bool overwrite_widget);
+ double param_get_max() { return max; };
+ double param_get_min() { return min; };
+ void param_set_undo(bool set_undo);
virtual Gtk::Widget * param_newWidget();
inline operator gdouble() const { return value; };
@@ -133,8 +136,7 @@ protected:
double inc_step;
double inc_page;
bool add_slider;
- bool overwrite_widget;
- bool hide_widget;
+ bool _set_undo;
private:
ScalarParam(const ScalarParam&);