00001 /* === S Y N F I G ========================================================= */ 00021 /* ========================================================================= */ 00022 00023 /* === S T A R T =========================================================== */ 00024 00025 #ifndef __SYNFIG_TEMPLATE_H 00026 #define __SYNFIG_TEMPLATE_H 00027 00028 /* === H E A D E R S ======================================================= */ 00029 #include <gtkmm/adjustment.h> 00030 00031 /* === M A C R O S ========================================================= */ 00032 00033 /* === T Y P E D E F S ===================================================== */ 00034 00035 /* === C L A S S E S & S T R U C T S ======================================= */ 00036 00037 namespace studio { 00038 00039 /* Sets up an adjustment that controls/communicates with another adjustment 00040 (could be expanded to multiple children) 00041 00042 The current value and pagesize define the lower and upper bounds of the 00043 child adjustment. 00044 00045 NEED TO REPLACE FUNCTIONALITY IN: 00046 refresh_rend_desc 00047 refresh_time_window 00048 on_time_changed - possibly.... 00049 00050 time_zoom_in - possibly... 00051 time_zoom_out - possibly... 00052 00053 play - possibly... 00054 00055 THINGS TO CHECK: 00056 disp_audio's use of time_adjustment 00057 children_tree's use of time_adjustment 00058 layer_tree's use of time_adjustment 00059 */ 00060 class Adjust_Window : public Gtk::Adjustment 00061 { 00062 Gtk::Adjustment *adj_child; 00063 00064 sigc::connection childchanged; //we only care about the non-value parts of the child 00065 00066 virtual void on_changed(); //value+pagesize corresponds to child upper 00067 virtual void on_value_changed(); //value corresponds to child lower 00068 00069 protected: //update interface 00070 virtual void update_child(); 00071 virtual void update_fromchild(); 00072 00073 public: //structors 00074 Adjust_Window(double value, double lower, double upper, 00075 double step_increment=1, double page_increment=10, double page_size=0, 00076 Gtk::Adjustment *adj = 0); 00077 00078 virtual ~Adjust_Window(); 00079 00080 public: //child interface 00081 Gtk::Adjustment *get_child_adjustment(); 00082 const Gtk::Adjustment *get_child_adjustment() const; 00083 void set_child_adjustment(Gtk::Adjustment *child); 00084 00085 public: //Sub value interface 00086 double get_sub_lower() const; 00087 double get_sub_upper() const; 00088 }; 00089 00090 }; // END of namespace studio 00091 00092 /* === E N D =============================================================== */ 00093 00094 #endif