1 /* === S Y N F I G ========================================================= */
2 /*! \file dialog_color.h
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_STUDIO_DIALOG_COLOR_H
26 #define __SYNFIG_STUDIO_DIALOG_COLOR_H
28 /* === H E A D E R S ======================================================= */
31 #include <gtkmm/colorselection.h>
32 #include <gtkmm/dialog.h>
33 #include <gtkmm/tooltips.h>
34 #include <sigc++/functors/slot.h>
36 #include <synfig/color.h>
38 #include "dialogsettings.h"
40 /* === M A C R O S ========================================================= */
42 /* === T Y P E D E F S ===================================================== */
44 /* === C L A S S E S & S T R U C T S ======================================= */
50 class Dialog_Color : public Gtk::Dialog
52 DialogSettings dialog_settings;
53 Gtk::Tooltips tooltips;
55 Gtk::ColorSelection* color_edit_widget;
57 sigc::signal<void,synfig::Color> signal_edited_;
61 void create_color_edit_widget();
62 void create_set_color_button(const char *stock_id,
63 const Glib::ustring& tip_text, int index,
64 const sigc::slot0<void>& callback);
65 void create_close_button();
67 void on_color_changed();
68 void on_set_oc_pressed();
69 void on_set_fc_pressed();
70 bool on_close_pressed();
76 sigc::signal<void,synfig::Color>& signal_edited() { return signal_edited_; }
78 void set_color(const synfig::Color& x);
79 synfig::Color get_color() const;
82 bool busy() const { return busy_; }
84 }; // END of Dialog_Color
86 }; // END of namespace studio
88 /* === E N D =============================================================== */