Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-studio / trunk / src / gtkmm / dialog_color.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file dialog_color.h
3 **      \brief Template Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
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.
14 **
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.
19 **      \endlegal
20 */
21 /* ========================================================================= */
22
23 /* === S T A R T =========================================================== */
24
25 #ifndef __SYNFIG_STUDIO_DIALOG_COLOR_H
26 #define __SYNFIG_STUDIO_DIALOG_COLOR_H
27
28 /* === H E A D E R S ======================================================= */
29
30 #include <gtk/gtk.h>
31 #include <gtkmm/dialog.h>
32 #include <gtkmm/tooltips.h>
33 #include <sigc++/functors/slot.h>
34
35 #include "widget_coloredit.h"
36 #include "dialogsettings.h"
37
38 /* === M A C R O S ========================================================= */
39
40 /* === T Y P E D E F S ===================================================== */
41
42 /* === C L A S S E S & S T R U C T S ======================================= */
43
44 namespace studio {
45
46 class Widget_Color;
47
48 class Dialog_Color : public Gtk::Dialog
49 {
50         DialogSettings dialog_settings;
51         Gtk::Tooltips tooltips;
52
53         Widget_ColorEdit* color_edit_widget;
54
55         sigc::signal<void,synfig::Color> signal_edited_;
56
57         bool busy_;
58
59         void create_color_edit_widget();
60         void create_set_color_button(const char *stock_id,
61                         const Glib::ustring& tip_text, int index,
62                         const sigc::slot0<void>& callback);
63         void create_close_button();
64
65         void on_color_changed();
66         void on_set_oc_pressed();
67         void on_set_fc_pressed();
68         bool on_close_pressed();
69
70 public:
71         Dialog_Color();
72         ~Dialog_Color();
73
74         sigc::signal<void,synfig::Color>& signal_edited() { return signal_edited_; }
75
76         void set_color(const synfig::Color& x) { color_edit_widget->set_value(x); }
77         synfig::Color get_color() const { return color_edit_widget->get_value(); }
78         void reset();
79
80         bool busy() const { return busy_; }
81
82 }; // END of Dialog_Color
83
84 }; // END of namespace studio
85
86 /* === E N D =============================================================== */
87
88 #endif