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

# renddesc.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00025 /* === S T A R T =========================================================== */
    00026
    00027 #ifndef __SYNFIG_GTKMM_RENDDESC_H
    00028 #define __SYNFIG_GTKMM_RENDDESC_H
    00029
    00030 /* === H E A D E R S ======================================================= */
    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 /* === M A C R O S ========================================================= */
    00043
    00044 /* === T Y P E D E F S ===================================================== */
    00045
    00046 /* === C L A S S E S & S T R U C T S ======================================= */
    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     //Gtk::Adjustment adjustment_start_time;
    00063     //Gtk::Adjustment adjustment_end_time;
    00064     //Gtk::Adjustment adjustment_start_frame;
    00065     //Gtk::Adjustment adjustment_end_frame;
    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 //  Gtk::SpinButton *entry_start_time;
    00076 //  Gtk::SpinButton *entry_end_time;
    00077 //  Gtk::SpinButton *entry_start_frame;
    00078 //  Gtk::SpinButton *entry_end_frame;
    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     /* Gtk::Table *time_table; */
    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     //void on_start_frame_changed();
    00145     //void on_end_frame_changed();
    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 }; // END of namespace studio
    00158
    00159 /* === E N D =============================================================== */
    00160
    00161 #endif