1 /* === S I N F G =========================================================== */
2 /*! \file dialog_preview.h
3 ** \brief Preview dialog Header
5 ** $Id: dialog_preview.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SINFG_GTKMM_DIALOG_PREVIEW_H
25 #define __SINFG_GTKMM_DIALOG_PREVIEW_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/adjustment.h>
30 #include <gtkmm/dialog.h>
31 #include <gtkmm/menu.h>
32 #include <gtkmm/spinbutton.h>
33 #include <gtkmm/dialogsettings.h>
36 #include <gtkmm/widget_time.h>
38 /* === M A C R O S ========================================================= */
40 /* === T Y P E D E F S ===================================================== */
43 /* === C L A S S E S & S T R U C T S ======================================= */
49 float zoom,fps,begintime,endtime;
50 bool overbegin,overend;
53 class Dialog_Preview : public Gtk::Dialog
55 Widget_Preview preview;
56 DialogSettings settings;
58 //etl::handle<sinfg::Canvas> canvas;
64 void set_preview(etl::handle<Preview> prev);
66 Widget_Preview &get_widget() {return preview;}
67 const Widget_Preview &get_widget() const {return preview;}
69 virtual void on_hide();
70 //other forwarding functions...
71 }; // END of Dialog_Preview
73 class Dialog_PreviewOptions : public Gtk::Dialog
75 //all the info needed to construct a render description...
76 Gtk::Adjustment adj_zoom; // factor at which to resize the window...
78 Gtk::Adjustment adj_fps; // how often to take samples of the animation
80 studio::Widget_Time time_begin;
81 studio::Widget_Time time_end;
83 Gtk::CheckButton check_overbegin;
84 Gtk::CheckButton check_overend;
86 DialogSettings settings;
94 void on_overbegin_toggle();
95 void on_overend_toggle();
97 sigc::signal<void,const PreviewInfo &> signal_finish_;
99 Dialog_PreviewOptions();
100 ~Dialog_PreviewOptions();
102 float get_zoom() const { return adj_zoom.get_value(); }
103 void set_zoom(float z) { adj_zoom.set_value(z); }
105 float get_fps() const { return adj_fps.get_value(); }
106 void set_fps(float z) { adj_fps.set_value(z); }
108 float get_global_fps() const { return globalfps; }
109 void set_global_fps(float f);
111 sinfg::Time get_begintime() const { return time_begin.get_value(); }
112 void set_begintime(const sinfg::Time &t) { time_begin.set_value(t); }
114 sinfg::Time get_endtime() const { return time_end.get_value(); }
115 void set_endtime(const sinfg::Time &t) { time_end.set_value(t); }
117 bool get_begin_override() const { return check_overbegin.get_active(); }
118 void set_begin_override(bool o) { check_overbegin.set_active(o); }
120 bool get_end_override() const { return check_overend.get_active(); }
121 void set_end_override(bool o) { check_overend.set_active(o); }
123 sigc::signal<void,const PreviewInfo &> &signal_finish() {return signal_finish_;}
126 }; // END of namespace studio
128 /* === E N D =============================================================== */