Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-studio / tags / synfigstudio_0_61_07_rc2 / 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/adjustment.h>
32 #include <gtkmm/table.h>
33 #include <gtkmm/button.h>
34 #include <gtkmm/dialog.h>
35 #include <gtkmm/drawingarea.h>
36 #include <gtkmm/optionmenu.h>
37 #include <gtkmm/checkbutton.h>
38
39 #include <synfig/gamma.h>
40 #include <synfig/time.h>
41
42 #include "widget_coloredit.h"
43
44 #include <synfigapp/value_desc.h>
45 #include <synfig/time.h>
46
47 #include "dialogsettings.h"
48
49 /* === M A C R O S ========================================================= */
50
51 /* === T Y P E D E F S ===================================================== */
52
53 /* === C L A S S E S & S T R U C T S ======================================= */
54
55 namespace Gtk { class Menu; class SpinButton; class Adjustment; };
56
57 namespace synfigapp {
58 class CanvasInterface;
59 };
60
61 namespace studio {
62
63 class Widget_Color;
64
65 class Dialog_Color : public Gtk::Dialog
66 {
67         DialogSettings dialog_settings;
68
69         sigc::signal<void,synfig::Color> signal_edited_;
70         //sigc::signal<void,synfig::Color> signal_apply_;
71
72         bool on_close_pressed();
73         void on_apply_pressed();
74         void on_color_changed();
75
76         Widget_ColorEdit* widget_color;
77
78         bool busy_;
79
80 public:
81         bool busy()const { return busy_; }
82
83         sigc::signal<void,synfig::Color>& signal_edited() { return signal_edited_; }
84
85         //sigc::signal<void,synfig::Color>& signal_apply() { return signal_apply_; }
86
87         void set_color(const synfig::Color& x) { widget_color->set_value(x); }
88
89         synfig::Color get_color()const { return widget_color->get_value(); }
90
91         void reset();
92
93
94         Dialog_Color();
95         ~Dialog_Color();
96
97 //      void edit(const synfigapp::ValueDesc &x, etl::handle<synfigapp::CanvasInterface> canvas_interface, synfig::Time x=0);
98 }; // END of Dialog_Color
99
100 }; // END of namespace studio
101
102 /* === E N D =============================================================== */
103
104 #endif