Code

cmake: EOL of cmakelists.txt in subdirs
[inkscape.git] / src / live_effects / parameter / parameter.h
index 08af7f928b6c2f4f99c38123d55a824f58e8d75b..23faffc308c7506f38eb85f686bfbacdcc4676c2 100644 (file)
 #include <2geom/point.h>
 #include <2geom/path.h>
 
-#include "ui/widget/registry.h"
-#include "ui/widget/registered-widget.h"
-
 struct SPDesktop;
 struct SPItem;
 
 namespace Gtk {
     class Widget;
+    class Tooltips;
 }
 
 namespace Inkscape {
@@ -29,6 +27,12 @@ namespace NodePath {
     class Path ;
 }
 
+namespace UI {
+namespace Widget {
+    class Registry;
+}
+}
+
 namespace LivePathEffect {
 
 class Effect;
@@ -47,9 +51,9 @@ public:
 
     virtual void param_set_default() = 0;
 
-    // This returns pointer to the parameter's widget to be put in the live-effects dialog. Must also create the
-    // necessary widget if it does not exist yet.
-    virtual Gtk::Widget * param_getWidget() = 0;
+    // 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 &param_tooltip; };
 
     virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {};
@@ -68,6 +72,8 @@ protected:
 
     Effect* param_effect;
 
+    void param_write_to_repr(const char * svgd);
+
 private:
     Parameter(const Parameter&);
     Parameter& operator=(const Parameter&);
@@ -94,7 +100,7 @@ public:
     void param_set_digits(unsigned digits);
     void param_set_increments(double step, double page);
 
-    virtual Gtk::Widget * param_getWidget();
+    virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
 
     inline operator gdouble()
         { return value; };
@@ -105,7 +111,6 @@ protected:
     gdouble max;
     bool integer;
     gdouble defvalue;
-    Inkscape::UI::Widget::RegisteredScalar * rsu;
     unsigned digits;
     double inc_step;
     double inc_page;