minor fix
[synfig.git] / synfig-studio / trunk / src / gtkmm / renddesc.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file renddesc.cpp
3 **      \brief Template File
4 **
5 **      $Id: renddesc.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
10 **      This package is free software; you can redistribute it and/or
11 **      modify it under the terms of the GNU General Public License as
12 **      published by the Free Software Foundation; either version 2 of
13 **      the License, or (at your option) any later version.
14 **
15 **      This package is distributed in the hope that it will be useful,
16 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
17 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 **      General Public License for more details.
19 **      \endlegal
20 */
21 /* ========================================================================= */
22
23 /* === H E A D E R S ======================================================= */
24
25 #ifdef USING_PCH
26 #       include "pch.h"
27 #else
28 #ifdef HAVE_CONFIG_H
29 #       include <config.h>
30 #endif
31
32 #include "renddesc.h"
33 #include <gtkmm/label.h>
34 #include <gtkmm/frame.h>
35 #include <ETL/misc>
36 #include <synfig/general.h>
37 //#include <gtkmm/seperator.h>
38
39 #endif
40
41 /* === U S I N G =========================================================== */
42
43 using namespace std;
44 using namespace etl;
45 using namespace synfig;
46 using namespace studio;
47
48 /* === M A C R O S ========================================================= */
49
50 #ifndef SYNFIG_MAX_PIXEL_WIDTH
51 #define SYNFIG_MAX_PIXEL_WIDTH  (~(1<<31))
52 #endif
53
54 #ifndef SYNFIG_MAX_PIXEL_HEIGHT
55 #define SYNFIG_MAX_PIXEL_HEIGHT (~(1<<31))
56 #endif
57
58 #if ! defined(_)
59 #define _(x)    (x)
60 #endif
61
62 #ifndef DPM2DPI
63 #define DPM2DPI(x)      ((x)/39.3700787402)
64 #define DPI2DPM(x)      ((x)*39.3700787402)
65 #endif
66
67 #ifndef METERS2INCHES
68 #define METERS2INCHES(x)        ((x)*39.3700787402)
69 #define INCHES2METERS(x)        ((x)/39.3700787402)
70 #endif
71
72 /* === G L O B A L S ======================================================= */
73
74 /* === P R O C E D U R E S ================================================= */
75
76 /* === M E T H O D S ======================================================= */
77
78 Widget_RendDesc::Widget_RendDesc():
79         Gtk::Table(1,2,false),
80         adjustment_width(1,1,SYNFIG_MAX_PIXEL_WIDTH),
81         adjustment_height(1,1,SYNFIG_MAX_PIXEL_HEIGHT),
82         adjustment_xres(0,0,10000000),
83         adjustment_yres(0,0,10000000),
84         adjustment_phy_width(0,0,10000000),
85         adjustment_phy_height(0,0,10000000),
86         adjustment_fps(0,0,10000000),
87         adjustment_span(0,0,10000000)
88 {
89         update_lock=0;
90         
91         Gtk::Frame *size_frame=manage(new Gtk::Frame(_("Image Size")));
92         Gtk::Frame *area_frame=manage(new Gtk::Frame(_("Image Area")));
93         time_frame=manage(new Gtk::Frame(_("Time")));
94         
95         Gtk::Table *size_table=manage(new Gtk::Table(2,2,false));
96         size_frame->add(*size_table);
97
98         Gtk::Table *area_table=manage(new Gtk::Table(2,2,false));
99         area_frame->add(*area_table);
100
101         time_table=manage(new Gtk::Table(2,2,false));
102         time_frame->add(*time_table);
103
104         Gtk::Frame *other_frame=manage(new Gtk::Frame(_("Other")));
105         Gtk::Table *other_table=manage(new Gtk::Table(2,2,false));
106         other_frame->add(*other_table);
107
108         Gtk::Frame *lock_frame=manage(new Gtk::Frame(_("Locks and Links")));
109         Gtk::Table *lock_table=manage(new Gtk::Table(2,2,false));
110         lock_frame->add(*lock_table);
111         
112         entry_width=manage(new Gtk::SpinButton(adjustment_width,1,0));
113         entry_height=manage(new Gtk::SpinButton(adjustment_height,1,0));        
114         entry_width->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_width_changed));
115         entry_height->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_height_changed));
116         size_table->attach(*manage(new Gtk::Label(_("Width"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);        
117         size_table->attach(*manage(new Gtk::Label(_("Height"))), 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);       
118         size_table->attach(*entry_width, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0); 
119         size_table->attach(*entry_height, 1, 2, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);        
120         
121         entry_xres=manage(new Gtk::SpinButton(adjustment_xres,0.5,1));
122         entry_yres=manage(new Gtk::SpinButton(adjustment_yres,0.5,1));  
123         entry_xres->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_xres_changed));
124         entry_yres->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_yres_changed));
125         size_table->attach(*manage(new Gtk::Label(_("XRes"))), 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
126         size_table->attach(*manage(new Gtk::Label(_("YRes"))), 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
127         size_table->attach(*entry_xres, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);  
128         size_table->attach(*entry_yres, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);  
129
130         entry_phy_width=manage(new Gtk::SpinButton(adjustment_phy_width,0.25,2));
131         entry_phy_height=manage(new Gtk::SpinButton(adjustment_phy_height,0.25,2));     
132         entry_phy_width->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_phy_width_changed));
133         entry_phy_height->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_phy_height_changed));
134         size_table->attach(*manage(new Gtk::Label(_("PhyWidth"))), 4, 5, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);     
135         size_table->attach(*manage(new Gtk::Label(_("PhyHeight"))), 4, 5, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);    
136         size_table->attach(*entry_phy_width, 5, 6, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);     
137         size_table->attach(*entry_phy_height, 5, 6, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
138
139
140         entry_span=manage(new Gtk::SpinButton(adjustment_span,0.1,4));  
141         entry_span->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_span_changed));
142         size_table->attach(*manage(new Gtk::Label(_("Span"))), 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); 
143         size_table->attach(*entry_span, 1, 2, 2, 3, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);  
144
145         entry_tl=manage(new Widget_Vector());
146         entry_br=manage(new Widget_Vector());
147         entry_tl->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_tl_changed));
148         entry_br->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_br_changed));
149         area_table->attach(*manage(new Gtk::Label(_("Top-Left"))), 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);       
150         area_table->attach(*manage(new Gtk::Label(_("Bottom-Right"))), 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);   
151         area_table->attach(*entry_tl, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
152         area_table->attach(*entry_br, 1, 2, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
153
154         entry_fps=manage(new Gtk::SpinButton(adjustment_fps,1,5));
155         entry_start_time=manage(new Widget_Time());
156         entry_end_time=manage(new Widget_Time());       
157         //entry_start_frame=manage(new Gtk::SpinButton(adjustment_start_frame,1,0));
158         //entry_end_frame=manage(new Gtk::SpinButton(adjustment_end_frame,1,0));        
159         entry_fps->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_fps_changed));
160         entry_start_time->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_start_time_changed));
161         entry_end_time->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_end_time_changed));
162         //entry_start_frame->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_start_frame_changed));
163         //entry_end_frame->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_end_frame_changed));
164         time_table->attach(*manage(new Gtk::Label(_("FPS"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);  
165         time_table->attach(*manage(new Gtk::Label(_("Start Time"))), 2, 3, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);   
166         time_table->attach(*manage(new Gtk::Label(_("End Time"))), 2, 3, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);     
167         //time_table->attach(*manage(new Gtk::Label(_("Start Frame"))), 4, 5, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);        
168         //time_table->attach(*manage(new Gtk::Label(_("End Frame"))), 4, 5, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0);  
169         time_table->attach(*entry_fps, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);   
170         time_table->attach(*entry_start_time, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
171         time_table->attach(*entry_end_time, 3, 4, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);      
172         //time_table->attach(*entry_start_frame, 5, 6, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0); 
173         //time_table->attach(*entry_end_frame, 5, 6, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);   
174
175         entry_focus=manage(new Widget_Vector());
176         entry_focus->signal_value_changed().connect(sigc::mem_fun(*this,&studio::Widget_RendDesc::on_focus_changed));
177         other_table->attach(*manage(new Gtk::Label(_("Focus Point"))), 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);   
178         other_table->attach(*entry_focus, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);        
179
180
181
182         toggle_px_aspect=manage(new Gtk::CheckButton(_("Pixel Aspect")));
183         toggle_px_width=manage(new Gtk::CheckButton(_("Pixel Width")));
184         toggle_px_height=manage(new Gtk::CheckButton(_("Pixel Height")));
185
186         toggle_im_aspect=manage(new Gtk::CheckButton(_("Image Aspect")));
187         toggle_im_width=manage(new Gtk::CheckButton(_("Image Width")));
188         toggle_im_height=manage(new Gtk::CheckButton(_("Image Height")));
189         toggle_im_span=manage(new Gtk::CheckButton(_("Image Span")));
190
191         toggle_px_aspect->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
192         toggle_px_width->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
193         toggle_px_height->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
194         toggle_im_aspect->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
195         toggle_im_width->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
196         toggle_im_height->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
197         toggle_im_span->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
198
199         lock_table->attach(*toggle_px_aspect, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
200         lock_table->attach(*toggle_px_width, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);     
201         lock_table->attach(*toggle_px_height, 0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
202
203         lock_table->attach(*toggle_im_aspect, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
204         lock_table->attach(*toggle_im_width, 1, 2, 1, 2, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);     
205         lock_table->attach(*toggle_im_height, 1, 2, 2, 3, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);    
206         lock_table->attach(*toggle_im_span, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK|Gtk::FILL, 0, 0);      
207
208
209         lock_frame->show_all();
210         other_frame->show_all();
211         size_frame->show_all();
212         area_frame->show_all();
213         time_frame->show_all();
214         attach(*size_frame, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
215         attach(*area_frame, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
216         attach(*lock_frame, 0, 1, 2,3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);     
217         attach(*time_frame, 0, 1, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);    
218         attach(*other_frame, 0, 1, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0);   
219 }
220
221 Widget_RendDesc::~Widget_RendDesc()
222 {
223 }
224
225 void Widget_RendDesc::set_rend_desc(const synfig::RendDesc &rend_desc)
226 {
227         if(update_lock)return;
228         
229         rend_desc_=rend_desc;
230         refresh();
231 }
232
233 void
234 Widget_RendDesc::refresh()
235 {
236         UpdateLock lock(update_lock);
237         adjustment_width.set_value(rend_desc_.get_w());
238         adjustment_height.set_value(rend_desc_.get_h());
239         adjustment_phy_width.set_value(METERS2INCHES(rend_desc_.get_physical_w()));
240         adjustment_phy_height.set_value(METERS2INCHES(rend_desc_.get_physical_h()));
241         adjustment_xres.set_value(DPM2DPI(rend_desc_.get_x_res()));
242         adjustment_yres.set_value(DPM2DPI(rend_desc_.get_y_res()));
243         entry_start_time->set_fps(rend_desc_.get_frame_rate());
244         entry_start_time->set_value(rend_desc_.get_time_start());
245         entry_end_time->set_fps(rend_desc_.get_frame_rate());
246         entry_end_time->set_value(rend_desc_.get_time_end());
247
248         adjustment_fps.set_value(rend_desc_.get_frame_rate());
249         adjustment_span.set_value(rend_desc_.get_span());
250         entry_tl->set_value(rend_desc_.get_tl());
251         entry_br->set_value(rend_desc_.get_br());
252         entry_focus->set_value(rend_desc_.get_focus());
253
254         toggle_px_aspect->set_active((bool)(rend_desc_.get_flags()&RendDesc::PX_ASPECT));
255         toggle_px_width->set_active((bool)(rend_desc_.get_flags()&RendDesc::PX_W));
256         toggle_px_height->set_active((bool)(rend_desc_.get_flags()&RendDesc::PX_H));
257
258         toggle_im_aspect->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_ASPECT));
259         toggle_im_width->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_W));
260         toggle_im_height->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_H));
261         toggle_im_span->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_SPAN));   
262 }
263
264 void Widget_RendDesc::apply_rend_desc(const synfig::RendDesc &rend_desc)
265 {
266         set_rend_desc(rend_desc);
267 }
268
269 const synfig::RendDesc &
270 Widget_RendDesc::get_rend_desc()
271 {
272         return rend_desc_;
273 }
274
275 void
276 Widget_RendDesc::on_width_changed()
277 {
278         if(update_lock)return;
279         UpdateLock lock(update_lock);
280         rend_desc_.set_w(round_to_int(adjustment_width.get_value()));
281         refresh();
282         signal_changed()();
283 }
284
285 void
286 Widget_RendDesc::on_lock_changed()
287 {
288         if(update_lock)return;
289         UpdateLock lock(update_lock);
290
291 #define DO_TOGGLE(x,y)  if(toggle_ ## x->get_active()) \
292                 rend_desc_.set_flags(rend_desc_.get_flags()|RendDesc:: y); \
293         else \
294                 rend_desc_.set_flags(rend_desc_.get_flags()&~RendDesc:: y)
295
296         DO_TOGGLE(px_aspect,PX_ASPECT);
297         DO_TOGGLE(px_width,PX_W);
298         DO_TOGGLE(px_height,PX_H);
299
300         DO_TOGGLE(im_aspect,IM_ASPECT);
301         DO_TOGGLE(im_width,IM_W);
302         DO_TOGGLE(im_height,IM_H);
303         DO_TOGGLE(im_span,IM_SPAN);
304
305 #undef DO_TOGGLE
306         
307         refresh();
308         signal_changed()();
309 }
310
311 void
312 Widget_RendDesc::on_height_changed()
313 {
314         if(update_lock)return;
315         UpdateLock lock(update_lock);
316         rend_desc_.set_h(round_to_int(adjustment_height.get_value()));
317         refresh();
318         signal_changed()();
319 }
320
321 void
322 Widget_RendDesc::on_phy_width_changed()
323 {
324         if(update_lock)return;
325         UpdateLock lock(update_lock);
326         rend_desc_.set_physical_w(INCHES2METERS(adjustment_phy_width.get_value()));
327         refresh();
328         signal_changed()();
329 }
330
331 void
332 Widget_RendDesc::on_phy_height_changed()
333 {
334         if(update_lock)return;
335         UpdateLock lock(update_lock);
336         rend_desc_.set_physical_h(INCHES2METERS(adjustment_phy_height.get_value()));
337         refresh();
338         signal_changed()();
339 }
340
341 void
342 Widget_RendDesc::on_xres_changed()
343 {
344         if(update_lock)return;
345         UpdateLock lock(update_lock);
346         rend_desc_.set_x_res(DPI2DPM(adjustment_xres.get_value()));
347         refresh();
348         signal_changed()();
349 }
350
351 void
352 Widget_RendDesc::on_yres_changed()
353 {
354         if(update_lock)return;
355         UpdateLock lock(update_lock);
356         rend_desc_.set_y_res(DPI2DPM(adjustment_yres.get_value()));
357         refresh();
358         signal_changed()();
359 }
360
361 void
362 Widget_RendDesc::on_start_time_changed()
363 {
364         if(update_lock)return;
365         UpdateLock lock(update_lock);
366         rend_desc_.set_time_start(entry_start_time->get_value());
367         refresh();
368         signal_changed()();
369 }
370
371 void
372 Widget_RendDesc::on_end_time_changed()
373 {
374         if(update_lock)return;
375         UpdateLock lock(update_lock);
376         rend_desc_.set_time_end(entry_end_time->get_value());
377         refresh();
378         signal_changed()();
379 }
380
381 /*
382 void
383 Widget_RendDesc::on_start_frame_changed()
384 {
385         if(update_lock)return;
386         UpdateLock lock(update_lock);
387         rend_desc_.set_frame_start((int)(adjustment_start_frame.get_value()+0.5));
388         refresh();
389         signal_changed()();
390 }
391
392 void
393 Widget_RendDesc::on_end_frame_changed()
394 {
395         if(update_lock)return;
396         UpdateLock lock(update_lock);
397         rend_desc_.set_frame_end((int)(adjustment_end_frame.get_value()+0.5));
398         refresh();
399         signal_changed()();
400 }
401 */
402
403 void
404 Widget_RendDesc::on_fps_changed()
405 {
406         if(update_lock)return;
407         UpdateLock lock(update_lock);
408         rend_desc_.set_frame_rate((int)(adjustment_fps.get_value()+0.5));
409         refresh();
410         signal_changed()();
411 }
412
413 void
414 Widget_RendDesc::on_tl_changed()
415 {
416         if(update_lock)return;
417         UpdateLock lock(update_lock);
418         rend_desc_.set_tl(entry_tl->get_value());
419         refresh();
420         signal_changed()();
421 }
422
423 void
424 Widget_RendDesc::on_br_changed()
425 {
426         if(update_lock)return;
427         UpdateLock lock(update_lock);
428         rend_desc_.set_br(entry_br->get_value());
429         refresh();
430         signal_changed()();
431 }
432
433 void
434 Widget_RendDesc::on_focus_changed()
435 {
436         if(update_lock)return;
437         UpdateLock lock(update_lock);
438         rend_desc_.set_focus(entry_focus->get_value());
439         refresh();
440         signal_changed()();
441 }
442
443 void
444 Widget_RendDesc::on_span_changed()
445 {
446         if(update_lock)return;
447         UpdateLock lock(update_lock);
448         rend_desc_.set_span(adjustment_span.get_value());
449         refresh();
450         signal_changed()();
451 }
452
453 void
454 Widget_RendDesc::disable_time_section()
455 {
456         time_frame->set_sensitive(false);
457         
458 /*
459         Gtk::Table::TableList &list=time_table->children();
460         Gtk::Table::TableList::iterator iter;
461         for(iter=list.begin();iter!=list.end();iter++)
462                 iter->get_widget()->set_sensitive(false);
463 */      
464 }
465         
466 void
467 Widget_RendDesc::enable_time_section()
468 {
469         time_frame->set_sensitive(true);
470
471 /*
472         Gtk::Table::TableList &list=time_table->children();
473         Gtk::Table::TableList::iterator iter;
474         for(iter=list.begin();iter!=list.end();iter++)
475                 iter->get_widget()->set_sensitive(true);
476
477 */
478 }