initial version
[synfig.git] / synfig-studio / trunk / src / gtkmm / dialog_color.h
1 /* === S I N F G =========================================================== */
2 /*!     \file dialog_color.h
3 **      \brief Template Header
4 **
5 **      $Id: dialog_color.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
14 **      You may not copy, print, publish, or in any
15 **      other way distribute this software without
16 **      a prior written agreement with
17 **      the copyright holder.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === S T A R T =========================================================== */
23
24 #ifndef __SINFG_STUDIO_DIALOG_COLOR_H
25 #define __SINFG_STUDIO_DIALOG_COLOR_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <gtk/gtk.h>
30 #include <gtkmm/adjustment.h>
31 #include <gtkmm/table.h>
32 #include <gtkmm/button.h>
33 #include <gtkmm/dialog.h>
34 #include <gtkmm/drawingarea.h>
35 #include <gtkmm/optionmenu.h>
36 #include <gtkmm/checkbutton.h>
37
38 #include <sinfg/gamma.h>
39 #include <sinfg/time.h>
40
41 #include "widget_coloredit.h"
42
43 #include <sinfgapp/value_desc.h>
44 #include <sinfg/time.h>
45
46 #include "dialogsettings.h"
47
48 /* === M A C R O S ========================================================= */
49
50 /* === T Y P E D E F S ===================================================== */
51
52 /* === C L A S S E S & S T R U C T S ======================================= */
53
54 namespace Gtk { class Menu; class SpinButton; class Adjustment; };
55
56 namespace sinfgapp {
57 class CanvasInterface;
58 };
59
60 namespace studio {
61
62 class Widget_Color;
63         
64 class Dialog_Color : public Gtk::Dialog
65 {
66         DialogSettings dialog_settings;
67         
68         sigc::signal<void,sinfg::Color> signal_edited_;
69         //sigc::signal<void,sinfg::Color> signal_apply_;
70
71         bool on_close_pressed();
72         void on_apply_pressed();
73         void on_color_changed();
74
75         Widget_ColorEdit* widget_color;
76
77         bool busy_;
78         
79 public:
80         bool busy()const { return busy_; }
81         
82         sigc::signal<void,sinfg::Color>& signal_edited() { return signal_edited_; }
83         
84         //sigc::signal<void,sinfg::Color>& signal_apply() { return signal_apply_; }
85         
86         void set_color(const sinfg::Color& x) { widget_color->set_value(x); }
87
88         sinfg::Color get_color()const { return widget_color->get_value(); }
89                 
90         void reset();
91
92         
93         Dialog_Color();
94         ~Dialog_Color();
95
96 //      void edit(const sinfgapp::ValueDesc &x, etl::handle<sinfgapp::CanvasInterface> canvas_interface, sinfg::Time x=0);
97 }; // END of Dialog_Color
98
99 }; // END of namespace studio
100
101 /* === E N D =============================================================== */
102
103 #endif