1 /* === S Y N F I G ========================================================= */
2 /*! \file cellrenderer_value.cpp
3 ** \brief Template File
5 ** $Id: cellrenderer_value.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
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_GTKMM_CELLRENDERER_VALUE_H
26 #define __SYNFIG_GTKMM_CELLRENDERER_VALUE_H
28 /* === H E A D E R S ======================================================= */
31 #include <gtkmm/ruler.h>
32 #include <gtkmm/arrow.h>
33 #include <gtkmm/image.h>
34 #include <gdkmm/pixbufloader.h>
35 #include <gtkmm/viewport.h>
36 #include <gtkmm/adjustment.h>
37 #include <gtkmm/scrolledwindow.h>
38 #include <gtkmm/table.h>
39 #include <gtkmm/statusbar.h>
40 #include <gtkmm/button.h>
41 #include <gtkmm/label.h>
42 #include <atkmm/stateset.h>
43 #include <gtkmm/paned.h>
44 #include <gtkmm/treeview.h>
45 #include <gtkmm/treestore.h>
46 #include <gtkmm/adjustment.h>
47 #include <gtkmm/box.h>
48 #include <gtkmm/spinbutton.h>
49 #include <gtkmm/cellrenderer.h>
50 #include <gtkmm/checkbutton.h>
52 #include <gtkmm/colorselection.h>
53 #include <gtkmm/optionmenu.h>
55 //#include <synfig/synfig.h>
56 #include <synfig/paramdesc.h>
57 #include <synfig/value.h>
60 /* === M A C R O S ========================================================= */
62 /* === T Y P E D E F S ===================================================== */
64 /* === C L A S S E S & S T R U C T S ======================================= */
69 class Widget_CanvasChooser;
71 class Widget_Filename;
75 class ValueBase_Entry;
77 class CellRenderer_ValueBase : public Gtk::CellRendererText
79 sigc::signal<void, const Glib::ustring&> signal_secondary_click_;
80 sigc::signal<void, const Glib::ustring&, synfig::ValueBase> signal_edited_;
82 Glib::Property<synfig::ValueBase> property_value_;
83 Glib::Property<etl::handle<synfig::Canvas> > property_canvas_;
84 Glib::Property<synfig::ParamDesc> property_param_desc_;
86 void string_edited_(const Glib::ustring&,const Glib::ustring&);
88 void gradient_edited(synfig::Gradient gradient, Glib::ustring path);
89 void color_edited(synfig::Color color, Glib::ustring path);
92 sigc::signal<void, const Glib::ustring&> &signal_secondary_click()
93 {return signal_secondary_click_; }
95 sigc::signal<void, const Glib::ustring&, synfig::ValueBase> &signal_edited()
96 {return signal_edited_; }
98 Glib::PropertyProxy<synfig::ValueBase> property_value() { return property_value_.get_proxy();}
99 Glib::PropertyProxy<etl::handle<synfig::Canvas> > property_canvas() { return property_canvas_.get_proxy();}
100 Glib::PropertyProxy<synfig::ParamDesc> property_param_desc() { return property_param_desc_.get_proxy(); }
101 Glib::PropertyProxy<bool> property_inconsistant() { return property_foreground_set(); }
103 etl::handle<synfig::Canvas> get_canvas()const { return property_canvas_; }
104 synfig::ParamDesc get_param_desc()const { return property_param_desc_; }
106 CellRenderer_ValueBase();
107 ~CellRenderer_ValueBase();
109 ValueBase_Entry *value_entry;
111 void on_value_editing_done();
115 const Glib::RefPtr<Gdk::Drawable>& window,
117 const Gdk::Rectangle& background_area,
118 const Gdk::Rectangle& ca,
119 const Gdk::Rectangle& expose_area,
120 Gtk::CellRendererState flags);
122 virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
124 const Glib::ustring& path,
125 const Gdk::Rectangle& background_area,
126 const Gdk::Rectangle& cell_area,
127 Gtk::CellRendererState flags);
129 }; // END of class CellRenderer_ValueBase
131 }; // END of namespace studio
133 /* === E N D =============================================================== */