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

# widget_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_VALUE_H
    00026 #define __SYNFIG_GTKMM_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/box.h>
    00046 #include <gtkmm/spinbutton.h>
    00047 //#include <gtkmm/cellrenderer.h>
    00048 #include <gtkmm/checkbutton.h>
    00049
    00050 //#include <gtkmm/colorselection.h>
    00051 #include <gtkmm/optionmenu.h>
    00052
    00053 //#include <synfig/synfig.h>
    00054 #include <synfig/paramdesc.h>
    00055 #include <synfig/value.h>
    00056 #include <synfig/canvas.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_ColorEdit;
    00069 class Widget_CanvasChooser;
    00070 class Widget_Enum;
    00071 class Widget_Filename;
    00072 class Widget_Vector;
    00073 class Widget_Time;
    00074 class Widget_Distance;
    00075
    00076 class Widget_ValueBase : public Gtk::HBox
    00077 {
    00078     Gtk::Label *label;
    00079     synfig::ValueBase value;
    00080
    00081     Widget_Vector *vector_widget;
    00082     Gtk::SpinButton *real_widget;
    00083     Gtk::Adjustment real_adjustment;
    00084     Gtk::SpinButton *integer_widget;
    00085     Gtk::Adjustment integer_adjustment;
    00086     Gtk::SpinButton *angle_widget;
    00087     Gtk::Adjustment angle_adjustment;
    00088
    00089     Gtk::CheckButton *bool_widget;
    00090     //Gtk::ColorSelection *color_widget;
    00091     Widget_ColorEdit *color_widget;
    00092     Widget_CanvasChooser *canvas_widget;
    00093     Widget_Enum *enum_widget;
    00094     Widget_Filename *filename_widget;
    00095     Widget_Time *time_widget;
    00096     Gtk::Entry *string_widget;
    00097     Widget_Distance *distance_widget;
    00098
    00099 //  std::string hint;
    00100
    00101     synfig::ParamDesc param_desc;
    00102     etl::handle<synfig::Canvas> canvas;
    00103     sigc::signal<void> signal_value_changed_;
    00104     sigc::signal<void> signal_activate_;
    00105
    00106 public:
    00107     sigc::signal<void> &signal_value_changed() { return signal_value_changed_; }
    00108
    00109     void activate();
    00110
    00111     sigc::signal<void>& signal_activate() { return signal_activate_; }
    00112
    00113     void set_value(const synfig::ValueBase &data);
    00114     const synfig::ValueBase &get_value();
    00115
    00116     void on_grab_focus();
    00117
    00118     void set_param_desc(const synfig::ParamDesc &x) { param_desc=x; }
    00119     const synfig::ParamDesc &get_param_desc() { return param_desc; }
    00120
    00121     void set_sensitive(bool x);
    00122
    00123     //void set_hint(std::string x) { hint=x; }
    00124 //  std::string get_hint() { return hint; }
    00125
    00126     void set_canvas(etl::handle<synfig::Canvas> x) { canvas=x; assert(canvas); }
    00127     void inside_cellrenderer();
    00128     Widget_ValueBase();
    00129     ~Widget_ValueBase();
    00130 };
    00131
    00132 }; // END of namespace studio
    00133
    00134 /* === E N D =============================================================== */
    00135
    00136 #endif