X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fsynfigstudio_0_61_03%2Fsynfig-studio%2Fsrc%2Fgtkmm%2Fcellrenderer_value.h;fp=synfig-studio%2Ftags%2Fsynfigstudio_0_61_03%2Fsynfig-studio%2Fsrc%2Fgtkmm%2Fcellrenderer_value.h;h=bc90c5ee3f0ec3e6fb8feba756ae6f934ee881a4;hb=da707947f2c5d17050f34debe532902971af6f60;hp=0000000000000000000000000000000000000000;hpb=761e5fbff7ec410ef90050e3125dd21cf11182a9;p=synfig.git diff --git a/synfig-studio/tags/synfigstudio_0_61_03/synfig-studio/src/gtkmm/cellrenderer_value.h b/synfig-studio/tags/synfigstudio_0_61_03/synfig-studio/src/gtkmm/cellrenderer_value.h new file mode 100644 index 0000000..bc90c5e --- /dev/null +++ b/synfig-studio/tags/synfigstudio_0_61_03/synfig-studio/src/gtkmm/cellrenderer_value.h @@ -0,0 +1,135 @@ +/* === S Y N F I G ========================================================= */ +/*! \file cellrenderer_value.cpp +** \brief Template File +** +** $Id: cellrenderer_value.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GTKMM_CELLRENDERER_VALUE_H +#define __SYNFIG_GTKMM_CELLRENDERER_VALUE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//#include +#include +#include + + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio { + +class Widget_Color; +class Widget_CanvasChooser; +class Widget_Enum; +class Widget_Filename; +class Widget_Vector; +class Widget_Time; + +class ValueBase_Entry; + +class CellRenderer_ValueBase : public Gtk::CellRendererText +{ + sigc::signal signal_secondary_click_; + sigc::signal signal_edited_; + + Glib::Property property_value_; + Glib::Property > property_canvas_; + Glib::Property property_param_desc_; + + void string_edited_(const Glib::ustring&,const Glib::ustring&); + + void gradient_edited(synfig::Gradient gradient, Glib::ustring path); + void color_edited(synfig::Color color, Glib::ustring path); + +public: + sigc::signal &signal_secondary_click() + {return signal_secondary_click_; } + + sigc::signal &signal_edited() + {return signal_edited_; } + + Glib::PropertyProxy property_value() { return property_value_.get_proxy();} + Glib::PropertyProxy > property_canvas() { return property_canvas_.get_proxy();} + Glib::PropertyProxy property_param_desc() { return property_param_desc_.get_proxy(); } + Glib::PropertyProxy property_inconsistant() { return property_foreground_set(); } + + etl::handle get_canvas()const { return property_canvas_; } + synfig::ParamDesc get_param_desc()const { return property_param_desc_; } + + CellRenderer_ValueBase(); + ~CellRenderer_ValueBase(); + + ValueBase_Entry *value_entry; + + void on_value_editing_done(); + + virtual void + render_vfunc( + const Glib::RefPtr& window, + Gtk::Widget& widget, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& ca, + const Gdk::Rectangle& expose_area, + Gtk::CellRendererState flags); + + virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event, + Gtk::Widget& widget, + const Glib::ustring& path, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& cell_area, + Gtk::CellRendererState flags); + +}; // END of class CellRenderer_ValueBase + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif