2008-04-09 00:21:05 +02:00
|
|
|
/*
|
2008-04-12 18:46:32 +02:00
|
|
|
render.cpp - Definition of the main workspace window object
|
2008-04-11 23:04:39 +02:00
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
2008-04-09 00:21:05 +02:00
|
|
|
|
2008-04-16 23:50:01 +02:00
|
|
|
#include "../gtk-lumiera.hpp"
|
|
|
|
|
|
2008-04-16 00:36:15 +02:00
|
|
|
#include "render.hpp"
|
2008-04-09 00:21:05 +02:00
|
|
|
|
2008-04-16 23:50:01 +02:00
|
|
|
using namespace Gtk;
|
|
|
|
|
|
2008-04-12 18:46:32 +02:00
|
|
|
namespace lumiera {
|
|
|
|
|
namespace gui {
|
|
|
|
|
namespace dialogs {
|
2008-04-09 00:21:05 +02:00
|
|
|
|
2008-04-16 23:50:01 +02:00
|
|
|
Render::Render(Window &parent) :
|
|
|
|
|
Dialog(_("Render"), parent, true),
|
|
|
|
|
outputFileLabel(_("Output File:")),
|
|
|
|
|
browseButtonImage(StockID(Stock::INDEX), ICON_SIZE_BUTTON),
|
|
|
|
|
browseButtonLabel(_("_Browse..."), true),
|
|
|
|
|
containerFormatLabel(_("Container Format:")),
|
|
|
|
|
cancelButton(Stock::CANCEL),
|
|
|
|
|
renderButtonImage(StockID(Stock::APPLY), ICON_SIZE_BUTTON),
|
|
|
|
|
renderButtonLabel(_("_Render"), true)
|
2008-04-11 23:04:39 +02:00
|
|
|
{
|
2008-04-16 23:50:01 +02:00
|
|
|
VBox *v_box = get_vbox();
|
|
|
|
|
g_assert(v_box != NULL);
|
|
|
|
|
|
|
|
|
|
// The Output File Row
|
|
|
|
|
outputFileHBox.pack_start(outputFileLabel, PACK_SHRINK);
|
|
|
|
|
outputFileHBox.pack_start(outputFilePathEntry);
|
|
|
|
|
|
|
|
|
|
browseButtonHBox.pack_start(browseButtonImage);
|
|
|
|
|
browseButtonHBox.pack_start(browseButtonLabel);
|
|
|
|
|
outputFileBrowseButton.add(browseButtonHBox);
|
|
|
|
|
|
|
|
|
|
outputFileHBox.pack_start(outputFileBrowseButton, PACK_SHRINK);
|
|
|
|
|
outputFileHBox.set_spacing(4);
|
|
|
|
|
v_box->pack_start(outputFileHBox, PACK_SHRINK);
|
|
|
|
|
|
|
|
|
|
// The Containter Format Row
|
|
|
|
|
containerFormatHBox.pack_start(containerFormatLabel, PACK_SHRINK);
|
|
|
|
|
containerFormatHBox.pack_start(containerFormat);
|
|
|
|
|
containerFormatHBox.set_spacing(4);
|
|
|
|
|
v_box->pack_start(containerFormatHBox, PACK_SHRINK);
|
|
|
|
|
|
|
|
|
|
// Configure the dialog
|
|
|
|
|
v_box->set_spacing(4);
|
|
|
|
|
set_border_width(5);
|
|
|
|
|
set_resizable(false);
|
|
|
|
|
|
|
|
|
|
// Configure the Cancel and Render buttons
|
|
|
|
|
Gtk::Box* action_area = get_action_area();
|
|
|
|
|
g_assert(action_area != NULL);
|
2008-04-12 18:46:32 +02:00
|
|
|
|
2008-04-16 23:50:01 +02:00
|
|
|
cancelButton.signal_clicked().connect(
|
|
|
|
|
sigc::mem_fun(*this, &Render::on_button_cancel));
|
|
|
|
|
action_area->pack_start(cancelButton);
|
|
|
|
|
|
|
|
|
|
renderButtonHBox.pack_start(renderButtonImage);
|
|
|
|
|
renderButtonHBox.pack_start(renderButtonLabel);
|
|
|
|
|
renderButton.add(renderButtonHBox);
|
|
|
|
|
renderButton.signal_clicked().connect(
|
|
|
|
|
sigc::mem_fun(*this, &Render::on_button_render));
|
|
|
|
|
renderButton.set_flags(Gtk::CAN_DEFAULT);
|
|
|
|
|
action_area->pack_start(renderButton);
|
|
|
|
|
renderButton.grab_default();
|
|
|
|
|
|
|
|
|
|
show_all_children();
|
2008-04-12 18:46:32 +02:00
|
|
|
}
|
2008-04-10 16:36:21 +02:00
|
|
|
|
2008-04-16 23:50:01 +02:00
|
|
|
void Render::on_button_render()
|
2008-04-12 18:46:32 +02:00
|
|
|
{
|
2008-04-16 23:50:01 +02:00
|
|
|
g_message("render");
|
|
|
|
|
hide();
|
2008-04-11 23:04:39 +02:00
|
|
|
}
|
|
|
|
|
|
2008-04-16 23:50:01 +02:00
|
|
|
void Render::on_button_cancel()
|
|
|
|
|
{
|
|
|
|
|
g_message("cancel");
|
|
|
|
|
hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-12 18:46:32 +02:00
|
|
|
} // namespace dialogs
|
|
|
|
|
} // namespace gui
|
|
|
|
|
} // namespace lumiera
|