00001
00025
00026
00027 #ifndef __SYNFIG_GTKMM_RENDDESC_H
00028 #define __SYNFIG_GTKMM_RENDDESC_H
00029
00030
00031
00032 #include <gtkmm/table.h>
00033 #include <gtkmm/frame.h>
00034 #include <synfig/renddesc.h>
00035 #include <gtkmm/spinbutton.h>
00036 #include <gtkmm/adjustment.h>
00037 #include <gtkmm/checkbutton.h>
00038 #include <gtkmm/notebook.h>
00039 #include "widget_vector.h"
00040 #include "widget_time.h"
00041
00042
00043
00044
00045
00046
00047
00048 namespace studio {
00049
00050 class Widget_RendDesc : public Gtk::Notebook
00051 {
00052 synfig::RendDesc rend_desc_;
00053 sigc::signal<void> signal_changed_;
00054
00055 Gtk::Adjustment adjustment_width;
00056 Gtk::Adjustment adjustment_height;
00057 Gtk::Adjustment adjustment_xres;
00058 Gtk::Adjustment adjustment_yres;
00059 Gtk::Adjustment adjustment_phy_width;
00060 Gtk::Adjustment adjustment_phy_height;
00061 Gtk::Adjustment adjustment_fps;
00062
00063
00064
00065
00066 Gtk::Adjustment adjustment_span;
00067
00068 Gtk::SpinButton *entry_width;
00069 Gtk::SpinButton *entry_height;
00070 Gtk::SpinButton *entry_xres;
00071 Gtk::SpinButton *entry_yres;
00072 Gtk::SpinButton *entry_phy_width;
00073 Gtk::SpinButton *entry_phy_height;
00074 Gtk::SpinButton *entry_fps;
00075
00076
00077
00078
00079 Gtk::SpinButton *entry_span;
00080
00081 Gtk::CheckButton *toggle_px_aspect;
00082 Gtk::CheckButton *toggle_px_width;
00083 Gtk::CheckButton *toggle_px_height;
00084
00085 Gtk::CheckButton *toggle_im_aspect;
00086 Gtk::CheckButton *toggle_im_width;
00087 Gtk::CheckButton *toggle_im_height;
00088 Gtk::CheckButton *toggle_im_span;
00089
00090
00091 Gtk::Frame *time_frame;
00092
00093 Widget_Vector *entry_tl;
00094 Widget_Vector *entry_br;
00095
00096 Widget_Vector *entry_focus;
00097
00098 Widget_Time *entry_start_time;
00099 Widget_Time *entry_end_time;
00100
00101 mutable int update_lock;
00102
00103 struct UpdateLock
00104 {
00105 int &locked;
00106 UpdateLock(int &locked):locked(locked){locked++;}
00107 ~UpdateLock(){locked--;}
00108 };
00109
00110 public:
00111
00112 sigc::signal<void> &signal_changed() { return signal_changed_; }
00113
00114 Widget_RendDesc();
00115 ~Widget_RendDesc();
00116
00118 void set_rend_desc(const synfig::RendDesc &rend_desc);
00119
00121 void apply_rend_desc(const synfig::RendDesc &rend_desc);
00122
00124 const synfig::RendDesc &get_rend_desc();
00125
00126 void disable_time_section();
00127
00128 void enable_time_section();
00129
00130 void refresh();
00131 private:
00132
00133 void on_width_changed();
00134 void on_height_changed();
00135 void on_xres_changed();
00136 void on_yres_changed();
00137 void on_phy_width_changed();
00138 void on_phy_height_changed();
00139 void on_tl_changed();
00140 void on_br_changed();
00141 void on_fps_changed();
00142 void on_start_time_changed();
00143 void on_end_time_changed();
00144
00145
00146 void on_lock_changed();
00147 void on_focus_changed();
00148 void on_span_changed();
00149
00150 void create_widgets();
00151 void connect_signals();
00152 Gtk::Widget *create_image_tab();
00153 Gtk::Widget *create_time_tab();
00154 Gtk::Widget *create_other_tab();
00155 };
00156
00157 };
00158
00159
00160
00161 #endif