Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Bakery::Conf::Client Class Reference

Configuration Client Allows you to associate widget "values" with configuration keys, and then load() and save() them all at once. More...

#include <Client.h>

Inheritance diagram for Bakery::Conf::Client:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Client (const Glib::ustring &configuration_directory)
virtual ~Client ()
virtual void load ()
virtual void save ()
virtual void add (const Glib::ustring &key, Gtk::Widget &widget)
 e.g. conf_client.add("user_name", m_EntryUserName);
virtual void add_instant (const Glib::ustring &key, Gtk::Widget &widget)

Protected Types

typedef Bakery::Conf::AssociationBase::AssociationPtr AssociationPtr

Protected Member Functions

virtual void add_implementation (const Glib::ustring &key, Gtk::Widget &widget, bool instant)
 Override this method to add recognition of additional widget types to a derived class of Client.
template<class T_Widget>
void add_association (const Glib::ustring &key, T_Widget &widget, bool instant)

Detailed Description

Configuration Client Allows you to associate widget "values" with configuration keys, and then load() and save() them all at once.

The "value" depends on the widget: Gtk::Entry - text (gconf string). Gtk::CheckButton, Gtk::RadioButton - active (gconf bool). Gtk::Range (e.g. scales and scrollbars) - position (gconf float). Gtk::SpinButton - value (gconf float). Gtk::Combo - text (gconf string). Gtk::OptionMenu - item number (gconf int); ideally we would prefer to use a string representation, but that's not realistic.

Advantages compared to Gnome::Conf::Client:


Member Typedef Documentation

typedef Bakery::Conf::AssociationBase::AssociationPtr Bakery::Conf::Client::AssociationPtr [protected]
 


Constructor & Destructor Documentation

Bakery::Conf::Client::Client const Glib::ustring configuration_directory  ) 
 

virtual Bakery::Conf::Client::~Client  )  [virtual]
 


Member Function Documentation

virtual void Bakery::Conf::Client::add const Glib::ustring key,
Gtk::Widget widget
[virtual]
 

e.g. conf_client.add("user_name", m_EntryUserName);

template<class T_Widget>
void Bakery::Conf::Client::add_association const Glib::ustring key,
T_Widget &  widget,
bool  instant
[inline, protected]
 

virtual void Bakery::Conf::Client::add_implementation const Glib::ustring key,
Gtk::Widget widget,
bool  instant
[protected, virtual]
 

Override this method to add recognition of additional widget types to a derived class of Client.

You must also provide an implementation for the specialization of Association<T> for the widget type(s) you are adding support for.

virtual void Bakery::Conf::Client::add_instant const Glib::ustring key,
Gtk::Widget widget
[virtual]
 

virtual void Bakery::Conf::Client::load  )  [virtual]
 

virtual void Bakery::Conf::Client::save  )  [virtual]
 


The documentation for this class was generated from the following file:
Generated on Tue Jan 4 19:01:03 2005 for bakery by  doxygen 1.3.9.1