<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>libglademm 2.4: Gnome::Glade::VariablesMap Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table border="0" width="100%"> <tr> <td width="10%" height="40"><img src="../../../../../gtkmm-2.4/docs/images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td> <td width="90%" height="40"><img src="../../../../../gtkmm-2.4/docs/images/top.gif" alt="top" width="100%" height="40"/></td> </tr> </table> <center> <a class="qindex" href="../../../../../gtkmm-2.4/docs/index.html">Main Page</a> <a href="../../../../../gtkmm-2.4/docs/reference/html/group__Widgets.html">Widgets</a> <a class="qindex" href="../../../../../gtkmm-2.4/docs/reference/html/namespaces.html"> Namespaces</a> <a href="../../../../../gtkmm-2.4/docs/tutorial/html/index.html"> Book</a> </center> <hr width="100%"/> <!-- Generated by Doxygen 1.5.5 --> <div class="navpath"><a class="el" href="namespaceGnome.html">Gnome</a>::<a class="el" href="namespaceGnome_1_1Glade.html">Glade</a>::<a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html">VariablesMap</a> </div> <div class="contents"> <h1>Gnome::Glade::VariablesMap Class Reference</h1><!-- doxytag: class="Gnome::Glade::VariablesMap" --> <p> <a href="classGnome_1_1Glade_1_1VariablesMap-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Associates named <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> widgets with member variables. <p> Use <a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#5b64eca0b6c46a6250863da4184a95c3" title="For ToggleButton (CheckBox and RadioButton).">connect_widget()</a> to link the widgets with variables that will contain their data. Then use <a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#ece01b3edaa45cf12021d5f5ed7b4caf" title="Transfer data from the widget to the variable.">transfer_widgets_to_variables()</a> and <a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#729b93e9ece69f8919915ae9db1a696c" title="Transfer data from the variable to the widget.">transfer_variables_to_widgets()</a> to get or set all of the variables at once.<p> This is meant to be a bit like MFC's "Dialog Data Exchange and Validation".<p> The association of widget and member varables follow this mapping:<p> Gtk::Entry --> Glib::ustring Gtk::SpinBox --> Glib::ustring Gtk::ComboBoxEntry --> Glib::ustring Gtk::Scale --> double Gtk::Calendar --> Glib::Date Gtk::CheckBox --> bool Gtk::RadioButton --> bool <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#364562d26effde5f542ba1cb00443615">VariablesMap</a> (const Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Glade::Xml</a>>& glade)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#45ed3fd92d50a7bf2d66d955c1eb52e2">~VariablesMap</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#5b64eca0b6c46a6250863da4184a95c3">connect_widget</a> (const Glib::ustring& widget_name, bool& variable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">For ToggleButton (CheckBox and RadioButton). <a href="#5b64eca0b6c46a6250863da4184a95c3"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#7b55c879cbc2764adb7bb2ccd027e35f">connect_widget</a> (const Glib::ustring& widget_name, Glib::ustring& variable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">For Entry, ComboBoxEntry and SpinBox. <a href="#7b55c879cbc2764adb7bb2ccd027e35f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#c2c2a8b10abc73ac0204699acbb8da1b">connect_widget</a> (const Glib::ustring& widget_name, double& variable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">For Scale (HScale and VScale). <a href="#c2c2a8b10abc73ac0204699acbb8da1b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#319e46dbc4394be685c1d27bc16298ca">connect_widget</a> (const Glib::ustring& widget_name, Glib::Date& variable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">For Calendar. <a href="#319e46dbc4394be685c1d27bc16298ca"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#ece01b3edaa45cf12021d5f5ed7b4caf">transfer_widgets_to_variables</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Transfer data from the widget to the variable. <a href="#ece01b3edaa45cf12021d5f5ed7b4caf"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#729b93e9ece69f8919915ae9db1a696c">transfer_variables_to_widgets</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Transfer data from the variable to the widget. <a href="#729b93e9ece69f8919915ae9db1a696c"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::map< Gtk::Widget <br> *, void* > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#5af69893832cfea96fbb210c81ebf4a5">type_mapWidgetsToVariables</a></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#f2a9b55dd979917834abb5319d8bd35f">validate_widgets</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Override this to validate the data that the user enters into the widgets. <a href="#f2a9b55dd979917834abb5319d8bd35f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#56b186c847b21731b4c33c91de394f0b">transfer_one_widget</a> (Gtk::Widget* pWidget, bool to_variable)</td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#5af69893832cfea96fbb210c81ebf4a5">type_mapWidgetsToVariables</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#f63322f243b844ee5093ac7f975c7cc6">m_mapWidgetsToVariables</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Glade::Xml</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#0cd8153654d826eba63d204d5ac3b964">m_refGlade</a></td></tr> </table> <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="5af69893832cfea96fbb210c81ebf4a5"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::type_mapWidgetsToVariables" ref="5af69893832cfea96fbb210c81ebf4a5" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef std::map<Gtk::Widget*, void*> <a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#5af69893832cfea96fbb210c81ebf4a5">Gnome::Glade::VariablesMap::type_mapWidgetsToVariables</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="364562d26effde5f542ba1cb00443615"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::VariablesMap" ref="364562d26effde5f542ba1cb00443615" args="(const Glib::RefPtr< Glade::Xml > &glade)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gnome::Glade::VariablesMap::VariablesMap </td> <td>(</td> <td class="paramtype">const Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Glade::Xml</a>>& </td> <td class="paramname"> <em>glade</em> </td> <td> ) </td> <td width="100%"><code> [explicit]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="45ed3fd92d50a7bf2d66d955c1eb52e2"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::~VariablesMap" ref="45ed3fd92d50a7bf2d66d955c1eb52e2" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gnome::Glade::VariablesMap::~VariablesMap </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="5b64eca0b6c46a6250863da4184a95c3"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::connect_widget" ref="5b64eca0b6c46a6250863da4184a95c3" args="(const Glib::ustring &widget_name, bool &variable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Glade::VariablesMap::connect_widget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>widget_name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool & </td> <td class="paramname"> <em>variable</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> For ToggleButton (CheckBox and RadioButton). <p> </div> </div><p> <a class="anchor" name="7b55c879cbc2764adb7bb2ccd027e35f"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::connect_widget" ref="7b55c879cbc2764adb7bb2ccd027e35f" args="(const Glib::ustring &widget_name, Glib::ustring &variable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Glade::VariablesMap::connect_widget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>widget_name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Glib::ustring & </td> <td class="paramname"> <em>variable</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> For Entry, ComboBoxEntry and SpinBox. <p> </div> </div><p> <a class="anchor" name="c2c2a8b10abc73ac0204699acbb8da1b"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::connect_widget" ref="c2c2a8b10abc73ac0204699acbb8da1b" args="(const Glib::ustring &widget_name, double &variable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Glade::VariablesMap::connect_widget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>widget_name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"> <em>variable</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> For Scale (HScale and VScale). <p> </div> </div><p> <a class="anchor" name="319e46dbc4394be685c1d27bc16298ca"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::connect_widget" ref="319e46dbc4394be685c1d27bc16298ca" args="(const Glib::ustring &widget_name, Glib::Date &variable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Glade::VariablesMap::connect_widget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>widget_name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Glib::Date & </td> <td class="paramname"> <em>variable</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> For Calendar. <p> </div> </div><p> <a class="anchor" name="ece01b3edaa45cf12021d5f5ed7b4caf"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::transfer_widgets_to_variables" ref="ece01b3edaa45cf12021d5f5ed7b4caf" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Glade::VariablesMap::transfer_widgets_to_variables </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Transfer data from the widget to the variable. <p> </div> </div><p> <a class="anchor" name="729b93e9ece69f8919915ae9db1a696c"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::transfer_variables_to_widgets" ref="729b93e9ece69f8919915ae9db1a696c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Glade::VariablesMap::transfer_variables_to_widgets </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Transfer data from the variable to the widget. <p> </div> </div><p> <a class="anchor" name="f2a9b55dd979917834abb5319d8bd35f"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::validate_widgets" ref="f2a9b55dd979917834abb5319d8bd35f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool Gnome::Glade::VariablesMap::validate_widgets </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Override this to validate the data that the user enters into the widgets. <p> The return value indicates whether the widgets' data is valid. </div> </div><p> <a class="anchor" name="56b186c847b21731b4c33c91de394f0b"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::transfer_one_widget" ref="56b186c847b21731b4c33c91de394f0b" args="(Gtk::Widget *pWidget, bool to_variable)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Glade::VariablesMap::transfer_one_widget </td> <td>(</td> <td class="paramtype">Gtk::Widget * </td> <td class="paramname"> <em>pWidget</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>to_variable</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="f63322f243b844ee5093ac7f975c7cc6"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::m_mapWidgetsToVariables" ref="f63322f243b844ee5093ac7f975c7cc6" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#5af69893832cfea96fbb210c81ebf4a5">type_mapWidgetsToVariables</a> <a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#f63322f243b844ee5093ac7f975c7cc6">Gnome::Glade::VariablesMap::m_mapWidgetsToVariables</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="0cd8153654d826eba63d204d5ac3b964"></a><!-- doxytag: member="Gnome::Glade::VariablesMap::m_refGlade" ref="0cd8153654d826eba63d204d5ac3b964" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Glade::Xml</a>> <a class="el" href="classGnome_1_1Glade_1_1VariablesMap.html#0cd8153654d826eba63d204d5ac3b964">Gnome::Glade::VariablesMap::m_refGlade</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="variablesmap_8h.html">variablesmap.h</a></ul> </div> <hr><address><small> Generated for libglademm 2.4 by <a href="http://www.doxygen.org/index.html"> Doxygen</a> 1.5.5 © 1997-2001</small></address> </body> </html>