Remove obsolete includes.
[synfig.git] / synfig-studio / src / gtkmm / dialog_gradient.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file dialog_gradient.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_GRADIENT_H
26 #define __SYNFIG_STUDIO_DIALOG_GRADIENT_H
27
28 /* === H E A D E R S ======================================================= */
29
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 <synfig/gamma.h>
39 #include <synfig/time.h>
40
41 #include "widget_gradient.h"
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_Gradient;
64 class Widget_ColorEdit;
65
66 class Dialog_Gradient : public Gtk::Dialog
67 {
68         DialogSettings dialog_settings;
69
70         Gtk::SpinButton *spinbutton_pos;
71
72         Gtk::Adjustment adjustment_pos;
73
74
75         sigc::signal<void,synfig::Gradient> signal_edited_;
76
77         sigc::connection value_changed_connection;
78
79         void on_ok_pressed();
80         void on_apply_pressed();
81         void on_grab_pressed();
82
83         void on_cpoint_selected(synfig::Gradient::CPoint x);
84         void on_values_adjusted();
85
86         Widget_Gradient* widget_gradient;
87         Widget_ColorEdit* widget_color;
88         Gtk::Button *grab_button;
89
90         void on_changed();
91
92 public:
93
94         sigc::signal<void,synfig::Gradient>& signal_edited() { return signal_edited_; }
95
96         void set_gradient(const synfig::Gradient& x);
97
98         const synfig::Gradient& get_gradient()const { return widget_gradient->get_value(); }
99
100         void grab_button_set_sensitive(bool sensitive) { grab_button->set_sensitive(sensitive); }
101
102         void reset();
103
104
105         Dialog_Gradient();
106         ~Dialog_Gradient();
107         //! Inerface to external calls to fill in the Gradient Editor Dialog
108         //! when a Constant ValueNode or a Animated ValueNode is double cliked.
109         void edit(const synfigapp::ValueDesc &x, etl::handle<synfigapp::CanvasInterface> canvas_interface, synfig::Time time=0);
110 }; // END of Dialog_Gradient
111
112 }; // END of namespace studio
113
114 /* === E N D =============================================================== */
115
116 #endif