Merge branch 'master' into nikitakit_restructure
[synfig.git] / synfig-studio / src / gui / render.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file gtkmm/render.h
3 **      \brief Template Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **      Copyright (c) 2007 Chris Moore
10 **
11 **      This package is free software; you can redistribute it and/or
12 **      modify it under the terms of the GNU General Public License as
13 **      published by the Free Software Foundation; either version 2 of
14 **      the License, or (at your option) any later version.
15 **
16 **      This package is distributed in the hope that it will be useful,
17 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
18 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 **      General Public License for more details.
20 **      \endlegal
21 */
22 /* ========================================================================= */
23
24 /* === S T A R T =========================================================== */
25
26 #ifndef __SYNFIG_STUDIO_GTKMM_RENDER_H
27 #define __SYNFIG_STUDIO_GTKMM_RENDER_H
28
29 /* === H E A D E R S ======================================================= */
30
31 #include <gtkmm/dialog.h>
32 #include <gtkmm/tooltips.h>
33 #include <gtkmm/table.h>
34 #include <gtkmm/entry.h>
35 #include <gtkmm/adjustment.h>
36 #include <gtkmm/spinbutton.h>
37 #include <gtkmm/checkbutton.h>
38 #include <gtkmm/tooltips.h>
39 #include <gtkmm/optionmenu.h>
40
41 #include <synfig/string.h>
42 #include <synfig/targetparam.h>
43
44 #include <synfigapp/canvasinterface.h>
45
46 #include "renddesc.h"
47
48 /* === M A C R O S ========================================================= */
49
50 /* === T Y P E D E F S ===================================================== */
51
52 /* === C L A S S E S & S T R U C T S ======================================= */
53
54 namespace studio
55 {
56 class AsyncRenderer;
57
58 class RenderSettings : public Gtk::Dialog
59 {
60         Gtk::Tooltips tooltips;
61
62         etl::handle<synfigapp::CanvasInterface> canvas_interface_;
63         Widget_RendDesc widget_rend_desc;
64
65         Gtk::Entry entry_filename;
66
67         Gtk::Adjustment adjustment_quality;
68         Gtk::SpinButton entry_quality;
69
70         Gtk::Adjustment adjustment_antialias;
71         Gtk::SpinButton entry_antialias;
72
73         Gtk::CheckButton toggle_single_frame;
74
75         Gtk::OptionMenu optionmenu_target;
76         Gtk::Menu *menu_target;
77         Gtk::Button *tparam_button;
78
79         synfig::String target_name;
80
81         void set_target(synfig::String name);
82
83         etl::handle<AsyncRenderer> async_renderer;
84
85         synfig::TargetParam tparam;
86
87 public:
88         RenderSettings(Gtk::Window& parent,etl::handle<synfigapp::CanvasInterface> canvas_interface);
89         ~RenderSettings();
90         void set_entry_filename();
91
92 private:
93
94         void on_rend_desc_changed();
95         void on_single_frame_toggle();
96         void on_choose_pressed();
97         void on_render_pressed();
98         void on_cancel_pressed();
99         void on_targetparam_pressed();
100
101         void on_finished();
102 }; // END of class RenderSettings
103
104 }; // END of namespace studio
105
106
107 /* === E N D =============================================================== */
108
109 #endif