1 /* === S Y N F I G ========================================================= */
2 /*! \file gtkmm/renddesc.h
6 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
8 ** This package is free software; you can redistribute it and/or
9 ** modify it under the terms of the GNU General Public License as
10 ** published by the Free Software Foundation; either version 2 of
11 ** the License, or (at your option) any later version.
13 ** This package is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ** General Public License for more details.
19 ** === N O T E S ===========================================================
21 ** ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_GTKMM_RENDDESC_H
26 #define __SYNFIG_GTKMM_RENDDESC_H
28 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/table.h>
31 #include <gtkmm/frame.h>
32 #include <synfig/renddesc.h>
33 #include <gtkmm/spinbutton.h>
34 #include <gtkmm/adjustment.h>
35 #include <gtkmm/checkbutton.h>
36 #include <gtkmm/notebook.h>
37 #include "widget_vector.h"
38 #include "widget_time.h"
40 /* === M A C R O S ========================================================= */
42 /* === T Y P E D E F S ===================================================== */
44 /* === C L A S S E S & S T R U C T S ======================================= */
48 class Widget_RendDesc : public Gtk::Notebook
50 synfig::RendDesc rend_desc_;
51 sigc::signal<void> signal_changed_;
53 Gtk::Adjustment adjustment_width;
54 Gtk::Adjustment adjustment_height;
55 Gtk::Adjustment adjustment_xres;
56 Gtk::Adjustment adjustment_yres;
57 Gtk::Adjustment adjustment_phy_width;
58 Gtk::Adjustment adjustment_phy_height;
59 Gtk::Adjustment adjustment_fps;
60 //Gtk::Adjustment adjustment_start_time;
61 //Gtk::Adjustment adjustment_end_time;
62 //Gtk::Adjustment adjustment_start_frame;
63 //Gtk::Adjustment adjustment_end_frame;
64 Gtk::Adjustment adjustment_span;
66 Gtk::SpinButton *entry_width;
67 Gtk::SpinButton *entry_height;
68 Gtk::SpinButton *entry_xres;
69 Gtk::SpinButton *entry_yres;
70 Gtk::SpinButton *entry_phy_width;
71 Gtk::SpinButton *entry_phy_height;
72 Gtk::SpinButton *entry_fps;
73 // Gtk::SpinButton *entry_start_time;
74 // Gtk::SpinButton *entry_end_time;
75 // Gtk::SpinButton *entry_start_frame;
76 // Gtk::SpinButton *entry_end_frame;
77 Gtk::SpinButton *entry_span;
79 Gtk::CheckButton *toggle_px_aspect;
80 Gtk::CheckButton *toggle_px_width;
81 Gtk::CheckButton *toggle_px_height;
83 Gtk::CheckButton *toggle_im_aspect;
84 Gtk::CheckButton *toggle_im_width;
85 Gtk::CheckButton *toggle_im_height;
86 Gtk::CheckButton *toggle_im_span;
88 /* Gtk::Table *time_table; */
89 Gtk::Frame *time_frame;
91 Widget_Vector *entry_tl;
92 Widget_Vector *entry_br;
94 Widget_Vector *entry_focus;
96 Widget_Time *entry_start_time;
97 Widget_Time *entry_end_time;
99 mutable int update_lock;
104 UpdateLock(int &locked):locked(locked){locked++;}
105 ~UpdateLock(){locked--;}
110 sigc::signal<void> &signal_changed() { return signal_changed_; }
115 //! Sets the RendDesc
116 void set_rend_desc(const synfig::RendDesc &rend_desc);
118 //! Applies the given RendDesc to the current RendDesc
119 void apply_rend_desc(const synfig::RendDesc &rend_desc);
121 //! Retrieves the current RendDesc
122 const synfig::RendDesc &get_rend_desc();
124 void disable_time_section();
126 void enable_time_section();
131 void on_width_changed();
132 void on_height_changed();
133 void on_xres_changed();
134 void on_yres_changed();
135 void on_phy_width_changed();
136 void on_phy_height_changed();
137 void on_tl_changed();
138 void on_br_changed();
139 void on_fps_changed();
140 void on_start_time_changed();
141 void on_end_time_changed();
142 //void on_start_frame_changed();
143 //void on_end_frame_changed();
144 void on_lock_changed();
145 void on_focus_changed();
146 void on_span_changed();
148 void create_widgets();
149 void connect_signals();
150 Gtk::Widget *create_image_tab();
151 Gtk::Widget *create_time_tab();
152 Gtk::Widget *create_other_tab();
155 }; // END of namespace studio
157 /* === E N D =============================================================== */