00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_STUDIO_CELLRENDERER_GRADIENT_H
00026 #define __SYNFIG_STUDIO_CELLRENDERER_GRADIENT_H
00027
00028
00029
00030 #include <gtkmm/entry.h>
00031 #include <gtkmm/cellrenderertext.h>
00032
00033 #include <sigc++/signal.h>
00034 #include <sigc++/slot.h>
00035
00036 #include <synfig/gradient.h>
00037
00038
00039
00040
00041
00042
00043
00044 namespace Gtk { class Entry; class Button; };
00045
00046 namespace studio {
00047
00048 class CellRenderer_Gradient : public Gtk::CellRendererText
00049 {
00050 sigc::signal<void, const Glib::ustring&> signal_secondary_click_;
00051 sigc::signal<void, const Glib::ustring&, synfig::Gradient> signal_edited_;
00052
00053 Glib::Property<synfig::Gradient> property_gradient_;
00054
00055 public:
00056 sigc::signal<void, const Glib::ustring&, synfig::Gradient> &signal_edited()
00057 {return signal_edited_; }
00058
00059 Glib::PropertyProxy<synfig::Gradient> property_gradient() { return property_gradient_.get_proxy();}
00060
00061 CellRenderer_Gradient();
00062 ~CellRenderer_Gradient();
00063
00064 protected:
00065
00066 virtual void
00067 render_vfunc(
00068 const Glib::RefPtr<Gdk::Drawable>& window,
00069 Gtk::Widget& widget,
00070 const Gdk::Rectangle& background_area,
00071 const Gdk::Rectangle& ca,
00072 const Gdk::Rectangle& expose_area,
00073 Gtk::CellRendererState flags);
00074
00075 virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event,
00076 Gtk::Widget& widget,
00077 const Glib::ustring& path,
00078 const Gdk::Rectangle& background_area,
00079 const Gdk::Rectangle& cell_area,
00080 Gtk::CellRendererState flags);
00081
00082 };
00083
00084 };
00085
00086
00087
00088 #endif