25 #ifndef __SYNFIG_STUDIO_WIDGET_COLOREDIT_H
26 #define __SYNFIG_STUDIO_WIDGET_COLOREDIT_H
30 #include <gtkmm/box.h>
31 #include <gtkmm/table.h>
32 #include <gtkmm/spinbutton.h>
33 #include <gtkmm/adjustment.h>
34 #include <gtkmm/drawingarea.h>
35 #include <gtkmm/colorselection.h>
36 #include <synfig/color.h>
37 #include <synfig/gamma.h>
72 sigc::signal<void,Type,float> signal_slider_moved_;
73 sigc::signal<void> signal_activated_;
76 synfig::Color color_, orig_color;
101 typedef void (*slider_color_func)(synfig::Color &,float);
103 static void slider_color_TYPE_R(synfig::Color &color,
float amount);
104 static void slider_color_TYPE_G(synfig::Color &color,
float amount);
105 static void slider_color_TYPE_B(synfig::Color &color,
float amount);
106 static void slider_color_TYPE_Y(synfig::Color &color,
float amount);
107 static void slider_color_TYPE_U(synfig::Color &color,
float amount);
108 static void slider_color_TYPE_V(synfig::Color &color,
float amount);
109 static void slider_color_TYPE_HUE(synfig::Color &color,
float amount);
110 static void slider_color_TYPE_SAT(synfig::Color &color,
float amount);
111 static void slider_color_TYPE_A(synfig::Color &color,
float amount);
113 bool on_draw(
const Cairo::RefPtr<Cairo::Context> &cr);
114 bool on_event(GdkEvent *event);
118 const Cairo::RefPtr<Cairo::Context> &cr,
120 double width,
double height,
128 sigc::signal<void> signal_activated_;
129 sigc::signal<void> signal_value_changed_;
134 Gtk::Label *hex_color_label;
135 Gtk::Entry *hex_color;
150 Gtk::SpinButton *spinbutton_R;
151 Gtk::SpinButton *spinbutton_G;
152 Gtk::SpinButton *spinbutton_B;
153 Gtk::SpinButton *spinbutton_A;
155 Gtk::ColorSelection * hvsColorWidget;
157 Glib::RefPtr<Gtk::Adjustment> R_adjustment;
158 Glib::RefPtr<Gtk::Adjustment> G_adjustment;
159 Glib::RefPtr<Gtk::Adjustment> B_adjustment;
160 Glib::RefPtr<Gtk::Adjustment> A_adjustment;
164 Gtk::Notebook* notebook;
166 static synfig::Gamma hvs_gamma;
167 static synfig::Gamma hvs_gamma_in;
191 void set_value(
const synfig::Color &data);
200 bool colorHVSChanged;
202 void setHVSColor(synfig::Color color);
204 void SliderRow(
int i,
ColorSlider * n,
char * l, Pango::AttrList & attr_list, Gtk::Table* table);
206 void AttachSpinButton(
int i, Gtk::SpinButton * n, Gtk::Table * table);