1 /* === S Y N F I G ========================================================= */
2 /*! \file cellrenderer_gradient.h
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
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.
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.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_STUDIO_CELLRENDERER_GRADIENT_H
26 #define __SYNFIG_STUDIO_CELLRENDERER_GRADIENT_H
28 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/entry.h>
31 #include <gtkmm/cellrenderertext.h>
33 #include <sigc++/signal.h>
34 #include <sigc++/slot.h>
36 #include <synfig/gradient.h>
38 /* === M A C R O S ========================================================= */
40 /* === T Y P E D E F S ===================================================== */
42 /* === C L A S S E S & S T R U C T S ======================================= */
44 namespace Gtk { class Entry; class Button; };
48 class CellRenderer_Gradient : public Gtk::CellRendererText
50 sigc::signal<void, const Glib::ustring&> signal_secondary_click_;
51 sigc::signal<void, const Glib::ustring&, synfig::Gradient> signal_edited_;
53 Glib::Property<synfig::Gradient> property_gradient_;
56 sigc::signal<void, const Glib::ustring&, synfig::Gradient> &signal_edited()
57 {return signal_edited_; }
59 Glib::PropertyProxy<synfig::Gradient> property_gradient() { return property_gradient_.get_proxy();}
61 CellRenderer_Gradient();
62 ~CellRenderer_Gradient();
68 const Glib::RefPtr<Gdk::Drawable>& window,
70 const Gdk::Rectangle& background_area,
71 const Gdk::Rectangle& ca,
72 const Gdk::Rectangle& expose_area,
73 Gtk::CellRendererState flags);
75 virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
77 const Glib::ustring& path,
78 const Gdk::Rectangle& background_area,
79 const Gdk::Rectangle& cell_area,
80 Gtk::CellRendererState flags);
82 }; // END of class CellRenderer_Gradient
84 }; // END of namespace studio
86 /* === E N D =============================================================== */