X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fgtkmm%2Fwidget_value.h;fp=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fgtkmm%2Fwidget_value.h;h=fa812b7788e689b63b10cfa1f49140f648226727;hb=7c6d5426922cb3cda793f688dcd4d534b02765c8;hp=0000000000000000000000000000000000000000;hpb=fe6bf7f14f9a50e67575a8771fd48edff7fd80a9;p=synfig.git diff --git a/synfig-studio/tags/stable/src/gtkmm/widget_value.h b/synfig-studio/tags/stable/src/gtkmm/widget_value.h new file mode 100644 index 0000000..fa812b7 --- /dev/null +++ b/synfig-studio/tags/stable/src/gtkmm/widget_value.h @@ -0,0 +1,136 @@ +/* === S I N F G =========================================================== */ +/*! \file widget_value.cpp +** \brief Template File +** +** $Id: widget_value.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** +** \legal +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This software and associated documentation +** are CONFIDENTIAL and PROPRIETARY property of +** the above-mentioned copyright holder. +** +** You may not copy, print, publish, or in any +** other way distribute this software without +** a prior written agreement with +** the copyright holder. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SINFG_GTKMM_VALUE_H +#define __SINFG_GTKMM_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_ColorEdit; +class Widget_CanvasChooser; +class Widget_Enum; +class Widget_Filename; +class Widget_Vector; +class Widget_Time; +class Widget_Distance; + +class Widget_ValueBase : public Gtk::HBox +{ + Gtk::Label *label; + sinfg::ValueBase value; + + Widget_Vector *vector_widget; + Gtk::SpinButton *real_widget; + Gtk::Adjustment real_adjustment; + Gtk::SpinButton *integer_widget; + Gtk::Adjustment integer_adjustment; + Gtk::SpinButton *angle_widget; + Gtk::Adjustment angle_adjustment; + + Gtk::CheckButton *bool_widget; + //Gtk::ColorSelection *color_widget; + Widget_ColorEdit *color_widget; + Widget_CanvasChooser *canvas_widget; + Widget_Enum *enum_widget; + Widget_Filename *filename_widget; + Widget_Time *time_widget; + Gtk::Entry *string_widget; + Widget_Distance *distance_widget; + +// std::string hint; + + sinfg::ParamDesc param_desc; + etl::handle canvas; + sigc::signal signal_value_changed_; + sigc::signal signal_activate_; + +public: + sigc::signal &signal_value_changed() { return signal_value_changed_; } + + void activate(); + + sigc::signal& signal_activate() { return signal_activate_; } + + void set_value(const sinfg::ValueBase &data); + const sinfg::ValueBase &get_value(); + + void on_grab_focus(); + + void set_param_desc(const sinfg::ParamDesc &x) { param_desc=x; } + const sinfg::ParamDesc &get_param_desc() { return param_desc; } + + void set_sensitive(bool x); + + //void set_hint(std::string x) { hint=x; } +// std::string get_hint() { return hint; } + + void set_canvas(etl::handle x) { canvas=x; assert(canvas); } + void inside_cellrenderer(); + Widget_ValueBase(); + ~Widget_ValueBase(); +}; + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif