Lumiera  0.pre.03
»edit your freedom«
preferences-dialog.hpp
Go to the documentation of this file.
1 /*
2  PREFERENCES-DIALOG.hpp - dialog for application preferences
3 
4  Copyright (C) Lumiera.org
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
32 #ifndef STAGE_DIALOG_PREFERENCES_DIALOG_H
33 #define STAGE_DIALOG_PREFERENCES_DIALOG_H
34 
35 
36 #include "stage/gtk-base.hpp"
37 #include "stage/dialog/dialog.hpp"
38 
39 namespace stage {
40 namespace dialog {
41 
42 
44  : public Gtk::Dialog
45  {
46  Gtk::Notebook notebook_;
47 
48  Gtk::VBox interfaceBox_;
49  Gtk::ComboBox interfaceThemeCombo_;
50 
51  public:
52  PreferencesDialog (Gtk::Window &parent)
53  : Dialog(_("Preferences"), parent, true)
54  {
55  using namespace Gtk;
56 
57  Box *v_box = get_vbox();
58  REQUIRE (v_box != NULL);
59 
60  interfaceBox_.pack_start (interfaceThemeCombo_, PACK_SHRINK);
61  interfaceBox_.set_spacing(4);
62  interfaceBox_.set_border_width(5);
63 
64  notebook_.append_page (interfaceBox_, _("Interface"));
65 
66  v_box->pack_start (notebook_);
67 
68  // Configure the dialog
69  v_box->set_spacing (BoxSpacing);
70  set_border_width (BorderPadding);
71  set_resizable (false);
72 
73  // Configure the Cancel and OK buttons
74  add_button (Stock::CANCEL, RESPONSE_CANCEL);
75  add_button (Stock::OK, RESPONSE_OK);
76 
77  show_all_children();
78  }
79  };
80 
81 
82 }} // namespace stage::dialog
83 #endif /*STAGE_DIALOG_PREFERENCES_DIALOG_H*/
static const int BorderPadding
The space in pixels to pad the border of Lumiera dialog boxes.
Definition: dialog.hpp:38
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
static const int BoxSpacing
The spacing for VBoxes and HBoxes in Lumiera dialogs.
Definition: dialog.hpp:43
Global constants and definitions for dialogs.
A set of basic GTK includes for the UI.