00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_STUDIO_DIALOG_COLOR_H
00026 #define __SYNFIG_STUDIO_DIALOG_COLOR_H
00027
00028
00029
00030 #include <gtk/gtk.h>
00031 #include <gtkmm/dialog.h>
00032 #include <gtkmm/tooltips.h>
00033 #include <sigc++/functors/slot.h>
00034
00035 #include "widget_coloredit.h"
00036 #include "dialogsettings.h"
00037
00038
00039
00040
00041
00042
00043
00044 namespace studio {
00045
00046 class Widget_Color;
00047
00048 class Dialog_Color : public Gtk::Dialog
00049 {
00050 DialogSettings dialog_settings;
00051 Gtk::Tooltips tooltips;
00052
00053 Widget_ColorEdit* color_edit_widget;
00054
00055 sigc::signal<void,synfig::Color> signal_edited_;
00056
00057 bool busy_;
00058
00059 void create_color_edit_widget();
00060 void create_set_color_button(const char *stock_id,
00061 const Glib::ustring& tip_text, int index,
00062 const sigc::slot0<void>& callback);
00063 void create_close_button();
00064
00065 void on_color_changed();
00066 void on_set_oc_pressed();
00067 void on_set_fc_pressed();
00068 bool on_close_pressed();
00069
00070 public:
00071 Dialog_Color();
00072 ~Dialog_Color();
00073
00074 sigc::signal<void,synfig::Color>& signal_edited() { return signal_edited_; }
00075
00076 void set_color(const synfig::Color& x) { color_edit_widget->set_value(x); }
00077 synfig::Color get_color() const { return color_edit_widget->get_value(); }
00078 void reset();
00079
00080 bool busy() const { return busy_; }
00081
00082 };
00083
00084 };
00085
00086
00087
00088 #endif