source: synfigstudio/trunk/fuentes/src/gui/render.h @ 481

Last change on this file since 481 was 481, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 3.4 KB
Line 
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 <vector>
32
33#include <gtkmm/dialog.h>
34#include <gtkmm/tooltip.h>
35#include <gtkmm/table.h>
36#include <gtkmm/entry.h>
37#include <gtkmm/adjustment.h>
38#include <gtkmm/spinbutton.h>
39#include <gtkmm/checkbutton.h>
40#include <gtkmm/comboboxtext.h>
41
42#include <synfig/string.h>
43#include <synfig/targetparam.h>
44#include <synfig/target.h>
45
46#include <synfigapp/canvasinterface.h>
47
48#include "renddesc.h"
49
50#include <dialogs/dialog_targetparam.h>
51
52/* === M A C R O S ========================================================= */
53
54/* === T Y P E D E F S ===================================================== */
55
56/* === C L A S S E S & S T R U C T S ======================================= */
57
58namespace studio
59{
60class AsyncRenderer;
61
62class RenderSettings : public Gtk::Dialog
63{
64        etl::handle<synfigapp::CanvasInterface> canvas_interface_;
65        Widget_RendDesc widget_rend_desc;
66
67        Gtk::Entry entry_filename;
68
69        Glib::RefPtr<Gtk::Adjustment> adjustment_quality;
70        Gtk::SpinButton entry_quality;
71
72        Glib::RefPtr<Gtk::Adjustment> adjustment_antialias;
73        Gtk::SpinButton entry_antialias;
74
75        Gtk::CheckButton toggle_single_frame;
76        Gtk::CheckButton toggle_extract_alpha;
77
78        Gtk::ComboBoxText comboboxtext_target;
79        Gtk::Button *tparam_button;
80
81        std::vector<synfig::String> target_names;
82        synfig::String target_name;
83        synfig::String calculated_target_name;
84        std::vector< std::pair<synfig::TargetAlphaMode,synfig::String> > render_passes;
85
86        void set_target(synfig::String name);
87
88        etl::handle<AsyncRenderer> async_renderer;
89
90        synfig::TargetParam tparam;
91
92        static std::map<synfig::String, Dialog_TargetParam *> dialog_book;
93
94public:
95        RenderSettings(Gtk::Window& parent,etl::handle<synfigapp::CanvasInterface> canvas_interface);
96        ~RenderSettings();
97        void set_entry_filename();
98
99        //Use to add new param dialog.
100        static void register_dialog(synfig::String target_name, Dialog_TargetParam * dialog) 
101        {dialog_book[target_name] = dialog;}
102
103private:
104        void on_rend_desc_changed();
105        void on_single_frame_toggle();
106        void on_choose_pressed();
107        void on_render_pressed();
108        void on_cancel_pressed();
109        void on_targetparam_pressed();
110        void submit_next_render_pass();
111        void on_comboboxtext_target_changed();
112        void on_finished();
113}; // END of class RenderSettings
114
115}; // END of namespace studio
116
117
118/* === E N D =============================================================== */
119
120#endif
Note: See TracBrowser for help on using the repository browser.