Code

RegisteredScalar subclassed from RegisteredWidget<Scalar> instead of old RegisteredWdg
[inkscape.git] / src / ui / widget / selected-style.h
index 807d4ea949b67c6cb45ef78b39aba0dde40c49ed..cd67abfc563e708adc3faf17efb2cfd2613fb1d9 100644 (file)
@@ -30,6 +30,7 @@
 #include <desktop.h>
 
 #include "button.h"
+#include "rotateable.h"
 
 class SPUnit;
 
@@ -53,6 +54,31 @@ enum {
     SS_STROKE
 };
 
+class SelectedStyle;
+
+class RotateableSwatch: public Rotateable 
+{
+public:
+    RotateableSwatch(guint mode);
+    ~RotateableSwatch();
+
+    guint fillstroke;
+
+    SelectedStyle *parent;
+
+    guint32 startcolor;
+    bool startcolor_set;
+
+    gchar *undokey;
+
+    GdkCursor *cr;
+    bool cr_set;
+
+    double color_adjust (float *hsl, double by, guint32 cc, guint state);
+    virtual void do_motion (double by, guint state);
+    virtual void do_release (double by, guint state);
+};
+
 class SelectedStyle : public Gtk::HBox
 {
 public:
@@ -61,8 +87,14 @@ public:
     ~SelectedStyle();
 
     void setDesktop(SPDesktop *desktop);
+    SPDesktop *getDesktop() {return _desktop;}
     void update();
 
+    guint32 _lastselected[2];
+    guint32 _thisselected[2];
+
+    guint _mode[2];
+
 protected:
     SPDesktop *_desktop;
 
@@ -72,8 +104,8 @@ protected:
     Gtk::Label _stroke_label;
     Gtk::Label _opacity_label;
 
-    Gtk::EventBox _fill_place;
-    Gtk::EventBox _stroke_place;
+    RotateableSwatch _fill_place;
+    RotateableSwatch _stroke_place;
 
     Gtk::EventBox _fill_flag_place;
     Gtk::EventBox _stroke_flag_place;
@@ -94,9 +126,15 @@ protected:
     Gtk::Label _lgradient[2];
     Glib::ustring __lgradient[2];
 
+    GtkWidget *_gradient_preview_l[2];
+    Gtk::HBox _gradient_box_l[2];
+
     Gtk::Label _rgradient[2];
     Glib::ustring __rgradient[2];
 
+    GtkWidget *_gradient_preview_r[2];
+    Gtk::HBox _gradient_box_r[2];
+
     Gtk::Label _many[2];
     Glib::ustring __many[2];
 
@@ -115,12 +153,8 @@ protected:
     Gtk::EventBox _stroke_width_place;
     Gtk::Label _stroke_width;
 
-    guint32 _lastselected[2];
-    guint32 _thisselected[2];
     Glib::ustring _paintserver_id[2];
 
-    guint _mode[2];
-
     sigc::connection *selection_changed_connection;
     sigc::connection *selection_modified_connection;
     sigc::connection *subselection_changed_connection;
@@ -200,8 +234,8 @@ protected:
 
     Gtk::Tooltips _tooltips;
 
-    void *_dropF;
-    void *_dropS;
+    void *_drop[2];
+    bool _dropEnabled[2];
 };