Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
render.cpp
Go to the documentation of this file.
1/*
2 Render - dialog to define render output
3
4 Copyright (C)
5 2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
14
24#include "stage/gtk-base.hpp"
25
28#include "include/logging.h"
29
30
31using namespace Gtk;
32
33namespace stage {
34namespace dialog {
35
36 Render::Render (Window& parent)
37 : Dialog(_("Render"), parent, true)
38 , outputFileLabel_(_("Output File:"))
39 , browseButtonImage_(StockID(Stock::INDEX), ICON_SIZE_BUTTON)
40 , outputFileBrowseButton_(_("_Browse..."))
41 , containerFormatLabel_(_("Container Format:"))
42 , renderButtonImage_(StockID(Stock::OK), ICON_SIZE_BUTTON)
43 , audioFrame_(_("Audio"))
44 , videoFrame_(_("Video"))
45 {
46 Box* v_box = get_vbox();
47 REQUIRE (v_box != NULL);
48
49 // The Output File Row
50 outputFileHBox_.pack_start (outputFileLabel_, PACK_SHRINK);
52
54 outputFileBrowseButton_.signal_clicked().connect(
55 sigc::mem_fun(*this, &Render::on_button_browse));
56
57 outputFileHBox_.pack_start (outputFileBrowseButton_, PACK_SHRINK);
58 outputFileHBox_.set_spacing(4);
59 v_box->pack_start (outputFileHBox_, PACK_SHRINK);
60
61 // The Container Format Row
62 containerFormatHBox_.pack_start (containerFormatLabel_, PACK_SHRINK);
64 containerFormatHBox_.set_spacing(4);
65 v_box->pack_start (containerFormatHBox_, PACK_SHRINK);
66
67 v_box->pack_start (audioFrame_);
68 v_box->pack_start (videoFrame_);
69
70 // Configure the dialog
71 v_box->set_spacing (BoxSpacing);
72 set_border_width (BorderPadding);
73 set_resizable (false);
74
75 // Configure the Cancel and Render buttons
76 add_button (Stock::CANCEL, RESPONSE_CANCEL);
77
78 Button* render_button = add_button (Stock::OK, RESPONSE_OK);
79 render_button->set_label (_("_Render"));
80 render_button->set_image (renderButtonImage_);
81 //render_button->set_flags(Gtk::CAN_DEFAULT);
82 render_button->grab_default();
83
84 show_all_children();
85 }
86
87 void
89 {
90 FileChooserDialog dialog (*this,
91 _("Select a File Name for Rendering"),
92 FILE_CHOOSER_ACTION_SAVE);
93
94 // Add response buttons the the dialog:
95 dialog.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
96 dialog.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
97
98 int result = dialog.run();
99 INFO (stage, "%d", result);
100 if (result == RESPONSE_OK)
101 INFO(stage, "%s", "RESPONSE_OK");
102 }
103
104
105}} // namespace stage::dialog
Gtk::ComboBox containerFormat_
Definition render.hpp:48
Gtk::Image browseButtonImage_
Definition render.hpp:43
Gtk::Entry outputFilePathEntry_
Definition render.hpp:41
Gtk::Frame videoFrame_
Definition render.hpp:53
Gtk::Frame audioFrame_
Definition render.hpp:52
Gtk::HBox containerFormatHBox_
Definition render.hpp:46
Gtk::Label outputFileLabel_
Definition render.hpp:40
Gtk::Button outputFileBrowseButton_
Definition render.hpp:44
Gtk::Image renderButtonImage_
Definition render.hpp:50
Gtk::Label containerFormatLabel_
Definition render.hpp:47
Render(Gtk::Window &parent)
Definition render.cpp:36
Gtk::HBox outputFileHBox_
Definition render.hpp:39
Global constants and definitions for dialogs.
A set of basic GTK includes for the UI.
#define _(String)
Definition gtk-base.hpp:68
return NULL
Definition llist.h:586
This header is for including and configuring NoBug.
static const int BorderPadding
The space in pixels to pad the border of Lumiera dialog boxes.
Definition dialog.hpp:29
static const int BoxSpacing
The spacing for VBoxes and HBoxes in Lumiera dialogs.
Definition dialog.hpp:34
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
Dialog to set up a renter process and define output name and format.