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

Gnome::Glade::VariablesMap Class Reference

Associates named Glade widgets with member variables. More...

#include <variablesmap.h>

List of all members.

Public Member Functions

 VariablesMap (const Glib::RefPtr< Glade::Xml > &glade)
virtual ~VariablesMap ()
virtual void connect_widget (const Glib::ustring &widget_name, bool &variable)
 For ToggleButton (CheckBox and RadioButton).
virtual void connect_widget (const Glib::ustring &widget_name, Glib::ustring &variable)
 For Entry.
virtual void transfer_widgets_to_variables ()
 Transfer data from the widget to the variable.
virtual void transfer_variables_to_widgets ()
 Transfer data from the variable to the widget.

Protected Types

typedef std::map< Gtk::Widget *,
void * > 
type_mapWidgetsToVariables

Protected Member Functions

virtual bool validate_widgets ()
 Override this to validate the data that the user enters into the widgets.
virtual void transfer_one_widget (Gtk::Widget *pWidget, bool to_variable)

Protected Attributes

type_mapWidgetsToVariables m_mapWidgetsToVariables
Glib::RefPtr< Glade::Xmlm_refGlade


Detailed Description

Associates named Glade widgets with member variables.

Use connect_widget() to link the widgets with variables that will contain their data. Then use transfer_widgets_to_variables() and transfter_variables_to_widgets() to get or set all of the variables at once.

This is meant to be a bit like MFC's "Dialog Data Exchange and Validation".


Member Typedef Documentation

typedef std::map<Gtk::Widget*, void*> Gnome::Glade::VariablesMap::type_mapWidgetsToVariables [protected]
 


Constructor & Destructor Documentation

Gnome::Glade::VariablesMap::VariablesMap const Glib::RefPtr< Glade::Xml > &  glade  )  [explicit]
 

virtual Gnome::Glade::VariablesMap::~VariablesMap  )  [virtual]
 


Member Function Documentation

virtual void Gnome::Glade::VariablesMap::connect_widget const Glib::ustring widget_name,
Glib::ustring variable
[virtual]
 

For Entry.

virtual void Gnome::Glade::VariablesMap::connect_widget const Glib::ustring widget_name,
bool &  variable
[virtual]
 

For ToggleButton (CheckBox and RadioButton).

virtual void Gnome::Glade::VariablesMap::transfer_one_widget Gtk::Widget pWidget,
bool  to_variable
[protected, virtual]
 

virtual void Gnome::Glade::VariablesMap::transfer_variables_to_widgets  )  [virtual]
 

Transfer data from the variable to the widget.

virtual void Gnome::Glade::VariablesMap::transfer_widgets_to_variables  )  [virtual]
 

Transfer data from the widget to the variable.

virtual bool Gnome::Glade::VariablesMap::validate_widgets  )  [protected, virtual]
 

Override this to validate the data that the user enters into the widgets.

The return value indicates whether the widgets' data is valid.


Member Data Documentation

type_mapWidgetsToVariables Gnome::Glade::VariablesMap::m_mapWidgetsToVariables [protected]
 

Glib::RefPtr<Glade::Xml> Gnome::Glade::VariablesMap::m_refGlade [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu May 5 14:28:51 2005 for libglademm by  doxygen 1.4.2