initial version
[synfig.git] / synfig-studio / trunk / src / gtkmm / cellrenderer_gradient.h
1 /* === S I N F G =========================================================== */
2 /*!     \file cellrenderer_gradient.h
3 **      \brief Template Header
4 **
5 **      $Id: cellrenderer_gradient.h,v 1.1.1.1 2005/01/07 03:34:35 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_CELLRENDERER_GRADIENT_H
25 #define __SINFG_STUDIO_CELLRENDERER_GRADIENT_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <gtkmm/entry.h>
30 #include <gtkmm/cellrenderertext.h>
31
32 #include <sigc++/signal.h>
33 #include <sigc++/slot.h>
34
35 #include <sinfg/gradient.h>
36
37 /* === M A C R O S ========================================================= */
38
39 /* === T Y P E D E F S ===================================================== */
40
41 /* === C L A S S E S & S T R U C T S ======================================= */
42
43 namespace Gtk { class Entry; class Button; };
44
45 namespace studio {
46
47 class CellRenderer_Gradient : public Gtk::CellRendererText
48 {
49         sigc::signal<void, const Glib::ustring&> signal_secondary_click_;
50         sigc::signal<void, const Glib::ustring&, sinfg::Gradient> signal_edited_;
51
52         Glib::Property<sinfg::Gradient> property_gradient_;
53
54 public:
55         sigc::signal<void, const Glib::ustring&, sinfg::Gradient> &signal_edited()
56         {return signal_edited_; }
57
58         Glib::PropertyProxy<sinfg::Gradient> property_gradient() { return property_gradient_.get_proxy();}
59         
60         CellRenderer_Gradient();
61         ~CellRenderer_Gradient();
62
63 protected:
64         
65         virtual void
66         render_vfunc(
67                 const Glib::RefPtr<Gdk::Drawable>& window,
68                 Gtk::Widget& widget,
69                 const Gdk::Rectangle& background_area,
70                 const Gdk::Rectangle& ca,
71                 const Gdk::Rectangle& expose_area,
72                 Gtk::CellRendererState flags);
73
74         virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
75                                                  Gtk::Widget& widget,
76                                                  const Glib::ustring& path,
77                                                  const Gdk::Rectangle& background_area,
78                                                  const Gdk::Rectangle& cell_area,
79                                                  Gtk::CellRendererState flags);
80
81 }; // END of class CellRenderer_Gradient
82
83 }; // END of namespace studio
84
85 /* === E N D =============================================================== */
86
87 #endif