bakery  2.6
Dialog_Preferences.h
Go to the documentation of this file.
1 /*
2  * Copyright 2002 Murray Cumming
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 #ifndef BAKERY_CONFIGURATION_DIALOG_PREFERENCES_H
20 #define BAKERY_CONFIGURATION_DIALOG_PREFERENCES_H
21 
22 #include <libglademm.h>
24 #include <gtkmm/dialog.h>
25 
26 namespace Bakery
27 {
28 
40 class Dialog_Preferences : public Gtk::Dialog
41 {
42 public:
44  Dialog_Preferences(Gtk::Window& parent, const Glib::ustring& configuration_directory, const Glib::ustring& glade_filename, const Glib::ustring& widget_name = "vbox", bool instant = false);
45  virtual ~Dialog_Preferences();
46 
47 #ifdef GLIBMM_EXCEPTIONS_ENABLED
48  virtual void load();
49  virtual void save();
50 #else
51  virtual void load(std::auto_ptr<Glib::Error>& error);
52  virtual void save(std::auto_ptr<Glib::Error>& error);
53 #endif
54 
55 protected:
56 
57  //Signal handlers:
58  virtual void on_button_help();
59 
60  virtual void connect_widget(const Glib::ustring& key, const Glib::ustring& glade_widget_name);
61 
62  virtual void on_show(); //override.
63  virtual void on_hide(); //override.
64  virtual void on_response(int response_id); // override.
65 
67 
68  bool m_instant;
69  Glib::RefPtr<Gnome::Glade::Xml> m_refGlade;
71 };
72 
73 
74 } //namespace Bakery
75 
76 #endif //BAKERY_CONFIGURATION_DIALOG_PREFERENCES_H
virtual void save(std::auto_ptr< Glib::Error > &error)
Gtk::Button m_Button_Cancel
Definition: Dialog_Preferences.h:66
Dialog_Preferences(Gtk::Window &parent, const Glib::ustring &configuration_directory, const Glib::ustring &glade_filename, const Glib::ustring &widget_name="vbox", bool instant=false)
if instant is true then this will be an instant-apply preference dialog.
Gtk::Button m_Button_Help
Definition: Dialog_Preferences.h:66
Bakery::Conf::Client * m_pConfClient
Definition: Dialog_Preferences.h:70
Gtk::Button m_Button_Close
Definition: Dialog_Preferences.h:66
Glib::RefPtr< Gnome::Glade::Xml > m_refGlade
Definition: Dialog_Preferences.h:69
Definition: App.h:29
virtual void on_button_help()
virtual void on_response(int response_id)
virtual void load(std::auto_ptr< Glib::Error > &error)
Preferences Dialog In the Glade file:
Definition: Dialog_Preferences.h:40
virtual void connect_widget(const Glib::ustring &key, const Glib::ustring &glade_widget_name)
Configuration Client Allows you to associate widget "values" with configuration keys, and then load() and save() them all at once.
Definition: Client.h:50
bool m_instant
Definition: Dialog_Preferences.h:68