- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# cellrenderer_value.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00021 /* ========================================================================= */
    00022
    00023 /* === S T A R T =========================================================== */
    00024
    00025 #ifndef __SYNFIG_GTKMM_CELLRENDERER_VALUE_H
    00026 #define __SYNFIG_GTKMM_CELLRENDERER_VALUE_H
    00027
    00028 /* === H E A D E R S ======================================================= */
    00029
    00030 #include <gtk/gtk.h>
    00031 #include <gtkmm/ruler.h>
    00032 #include <gtkmm/arrow.h>
    00033 #include <gtkmm/image.h>
    00034 #include <gdkmm/pixbufloader.h>
    00035 #include <gtkmm/viewport.h>
    00036 #include <gtkmm/adjustment.h>
    00037 #include <gtkmm/scrolledwindow.h>
    00038 #include <gtkmm/table.h>
    00039 #include <gtkmm/statusbar.h>
    00040 #include <gtkmm/button.h>
    00041 #include <gtkmm/label.h>
    00042 #include <gtkmm/paned.h>
    00043 #include <gtkmm/treeview.h>
    00044 #include <gtkmm/treestore.h>
    00045 #include <gtkmm/adjustment.h>
    00046 #include <gtkmm/box.h>
    00047 #include <gtkmm/spinbutton.h>
    00048 #include <gtkmm/cellrenderer.h>
    00049 #include <gtkmm/checkbutton.h>
    00050
    00051 #include <gtkmm/colorselection.h>
    00052 #include <gtkmm/optionmenu.h>
    00053
    00054 //#include <synfig/synfig.h>
    00055 #include <synfig/paramdesc.h>
    00056 #include <synfig/value.h>
    00057
    00058
    00059 /* === M A C R O S ========================================================= */
    00060
    00061 /* === T Y P E D E F S ===================================================== */
    00062
    00063 /* === C L A S S E S & S T R U C T S ======================================= */
    00064
    00065 namespace studio {
    00066
    00067 class Widget_Color;
    00068 class Widget_CanvasChooser;
    00069 class Widget_Enum;
    00070 class Widget_Filename;
    00071 class Widget_Vector;
    00072 class Widget_Time;
    00073
    00074 class ValueBase_Entry;
    00075
    00076 class CellRenderer_ValueBase : public Gtk::CellRendererText
    00077 {
    00078     sigc::signal<void, const Glib::ustring&> signal_secondary_click_;
    00079     sigc::signal<void, const Glib::ustring&, synfig::ValueBase> signal_edited_;
    00080
    00081     Glib::Property<synfig::ValueBase> property_value_;
    00082     Glib::Property<etl::handle<synfig::Canvas> > property_canvas_;
    00083     Glib::Property<synfig::ParamDesc> property_param_desc_;
    00084
    00085     void string_edited_(const Glib::ustring&,const Glib::ustring&);
    00086
    00087     void gradient_edited(synfig::Gradient gradient, Glib::ustring path);
    00088     void color_edited(synfig::Color color, Glib::ustring path);
    00089
    00090     bool edit_value_done_called;
    00091 public:
    00092     sigc::signal<void, const Glib::ustring&> &signal_secondary_click()
    00093     {return signal_secondary_click_; }
    00094
    00095     sigc::signal<void, const Glib::ustring&, synfig::ValueBase> &signal_edited()
    00096     {return signal_edited_; }
    00097
    00098     Glib::PropertyProxy<synfig::ValueBase> property_value() { return property_value_.get_proxy();}
    00099     Glib::PropertyProxy<etl::handle<synfig::Canvas> > property_canvas() { return property_canvas_.get_proxy();}
    00100     Glib::PropertyProxy<synfig::ParamDesc> property_param_desc() { return property_param_desc_.get_proxy(); }
    00101     Glib::PropertyProxy<bool> property_inconsistent() { return property_foreground_set(); }
    00102
    00103     etl::handle<synfig::Canvas> get_canvas()const { return property_canvas_; }
    00104     synfig::ParamDesc get_param_desc()const { return property_param_desc_; }
    00105
    00106     CellRenderer_ValueBase();
    00107     ~CellRenderer_ValueBase();
    00108
    00109     ValueBase_Entry *value_entry;
    00110
    00111     void on_value_editing_done();
    00112
    00113     virtual void
    00114     render_vfunc(
    00115         const Glib::RefPtr<Gdk::Drawable>& window,
    00116         Gtk::Widget& widget,
    00117         const Gdk::Rectangle& background_area,
    00118         const Gdk::Rectangle& ca,
    00119         const Gdk::Rectangle& expose_area,
    00120         Gtk::CellRendererState flags);
    00121
    00122     virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
    00123                                                  Gtk::Widget& widget,
    00124                                                  const Glib::ustring& path,
    00125                                                  const Gdk::Rectangle& background_area,
    00126                                                  const Gdk::Rectangle& cell_area,
    00127                                                  Gtk::CellRendererState flags);
    00128
    00129 }; // END of class CellRenderer_ValueBase
    00130
    00131 }; // END of namespace studio
    00132
    00133 /* === E N D =============================================================== */
    00134
    00135 #endif