Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-studio / tags / 0.61.09 / src / gtkmm / cellrenderer_gradient.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file cellrenderer_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_CELLRENDERER_GRADIENT_H
26 #define __SYNFIG_STUDIO_CELLRENDERER_GRADIENT_H
27
28 /* === H E A D E R S ======================================================= */
29
30 #include <gtkmm/entry.h>
31 #include <gtkmm/cellrenderertext.h>
32
33 #include <sigc++/signal.h>
34 #include <sigc++/slot.h>
35
36 #include <synfig/gradient.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 Gtk { class Entry; class Button; };
45
46 namespace studio {
47
48 class CellRenderer_Gradient : public Gtk::CellRendererText
49 {
50         sigc::signal<void, const Glib::ustring&> signal_secondary_click_;
51         sigc::signal<void, const Glib::ustring&, synfig::Gradient> signal_edited_;
52
53         Glib::Property<synfig::Gradient> property_gradient_;
54
55 public:
56         sigc::signal<void, const Glib::ustring&, synfig::Gradient> &signal_edited()
57         {return signal_edited_; }
58
59         Glib::PropertyProxy<synfig::Gradient> property_gradient() { return property_gradient_.get_proxy();}
60
61         CellRenderer_Gradient();
62         ~CellRenderer_Gradient();
63
64 protected:
65
66         virtual void
67         render_vfunc(
68                 const Glib::RefPtr<Gdk::Drawable>& window,
69                 Gtk::Widget& widget,
70                 const Gdk::Rectangle& background_area,
71                 const Gdk::Rectangle& ca,
72                 const Gdk::Rectangle& expose_area,
73                 Gtk::CellRendererState flags);
74
75         virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
76                                                  Gtk::Widget& widget,
77                                                  const Glib::ustring& path,
78                                                  const Gdk::Rectangle& background_area,
79                                                  const Gdk::Rectangle& cell_area,
80                                                  Gtk::CellRendererState flags);
81
82 }; // END of class CellRenderer_Gradient
83
84 }; // END of namespace studio
85
86 /* === E N D =============================================================== */
87
88 #endif