<!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::Xml 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_1Xml.html">Xml</a> </div> <div class="contents"> <h1>Gnome::Glade::Xml Class Reference</h1><!-- doxytag: class="Gnome::Glade::Xml" --><!-- doxytag: inherits="Glib::Object" --><div class="dynheader"> Inheritance diagram for Gnome::Glade::Xml:</div> <div class="dynsection"> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classGnome_1_1Glade_1_1Xml-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="classGnome_1_1Glade_1_1XmlError.html">Gnome::Glade::XmlError</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#7761768713c005251186a02312c64026">Error</a></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></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_1Xml.html#2987319c2918461c2b87636b8be1bcc2">~Xml</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">GladeXML* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#40423feb0c18b3c2ae3788eb9a7871a1">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#40423feb0c18b3c2ae3788eb9a7871a1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const GladeXML* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#3f0b9603ba5beaf11b0a9f1eb6c7b037">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#3f0b9603ba5beaf11b0a9f1eb6c7b037"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">GladeXML* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#b571da66313322d6fd36584e922135e7">gobj_copy</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#b571da66313322d6fd36584e922135e7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#93de104460cf62911a60a9645be122c0">get_filename</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Gtk::Widget* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#a850dc2cbfef4e119d3fbb0c983c4be9">get_widget</a> (const Glib::ustring& name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a widget from the <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> file. <a href="#a850dc2cbfef4e119d3fbb0c983c4be9"></a><br></td></tr> <tr><td class="memTemplParams" nowrap colspan="2">template<class T_Widget> </td></tr> <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T_Widget* </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#2f8abf5936d33db52fd917c1c1d4de3d">get_widget</a> (const Glib::ustring& name, T_Widget*& widget)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">More convenient way of getting a widget from the <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> file. <a href="#2f8abf5936d33db52fd917c1c1d4de3d"></a><br></td></tr> <tr><td class="memTemplParams" nowrap colspan="2">template<class T_Widget> </td></tr> <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T_Widget* </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#8e9be00bb530ef24ee4a01cfe95d4a37">get_widget_derived</a> (const Glib::ustring& name, T_Widget*& widget)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This provides a pointer to a widget whose details are specified in the <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> file, but which is implemented by your own derived class. <a href="#8e9be00bb530ef24ee4a01cfe95d4a37"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::ListHandle<Gtk::Widget*> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#00645193c3486e796be93b7daa3eec74">get_widget_prefix</a> (const Glib::ustring& name)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#a2cdd4bd3fac01a7bfd0d7fa3adc7231">reparent_widget</a> (const Glib::ustring& name, Gtk::Container& container)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Take the widget from the glade-generated container and put it in another container. <a href="#a2cdd4bd3fac01a7bfd0d7fa3adc7231"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#8a5de4f642bd1dd9684df4ad5bfb77a1">relative_file</a> (const std::string& filename) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#15d6880111f72b695ff9f834a9628a97">connect_clicked</a> (const Glib::ustring& name, const sigc::slot<void>& slot_)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Connect a Gtk::Button's clicked signal or a Gtk::MenuItem's activated signal to a slot. <a href="#15d6880111f72b695ff9f834a9628a97"></a><br></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#1a4ecbd703142ff3e4b7098cc2653852">create</a> (const std::string& filename, const Glib::ustring& root=Glib::ustring(), const Glib::ustring& domain=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Loads a <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> XML file. <a href="#1a4ecbd703142ff3e4b7098cc2653852"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#432d8d0c0a41aaad6821a9a74cb33315">create_from_buffer</a> (const char* buffer, int size, const Glib::ustring& root=Glib::ustring(), const Glib::ustring& domain=Glib::ustring())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reads glade XML data from memory. <a href="#432d8d0c0a41aaad6821a9a74cb33315"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static Glib::ustring </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#194cd8d2bbe32b2af0bdf908da9840bd">get_widget_name</a> (Gtk::Widget& widget)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#dfa5ff54a6c8b9f9aa3b6e6ec4b86eb0">get_widget_tree</a> (Gtk::Widget& widget)</td></tr> <tr><td colspan="2"><br><h2>Protected 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_1Xml.html#160192d84ac26d4cb15f19f244950dfb">Xml</a> (const std::string& filename, const Glib::ustring& root, const Glib::ustring& domain)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Loads a glade XML file. <a href="#160192d84ac26d4cb15f19f244950dfb"></a><br></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_1Xml.html#1736fad12cef10e6896a0e7345c57cb7">Xml</a> (const char* buffer, int size, const Glib::ustring& root, const Glib::ustring& domain)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reads glade XML data from memory. <a href="#1736fad12cef10e6896a0e7345c57cb7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Gtk::Widget* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#3d60edc43a6adef91e68b8595d995e17">get_widget_checked</a> (const Glib::ustring& name, GType type)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">GtkWidget* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#548a1454e17cf3d6ac0aa1e32f4ea26c">get_cwidget</a> (const Glib::ustring& name)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual GType </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#5a9bd43ba37c50cce8a9198678ce89a7">lookup_type_vfunc</a> (const Glib::ustring& classname)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">* interface for changing the custom widget handling */ <a href="#5a9bd43ba37c50cce8a9198678ce89a7"></a><br></td></tr> <tr><td colspan="2"><br><h2>Related Functions</h2></td></tr> <tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Gnome::Glade::Xml</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Glade_1_1Xml.html#1cb960c56d31dc948a3e6f4ba6af4480">wrap</a> (GladeXML* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A Glib::wrap() method for this object. <a href="#1cb960c56d31dc948a3e6f4ba6af4480"></a><br></td></tr> </table> <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="7761768713c005251186a02312c64026"></a><!-- doxytag: member="Gnome::Glade::Xml::Error" ref="7761768713c005251186a02312c64026" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="classGnome_1_1Glade_1_1XmlError.html">Gnome::Glade::XmlError</a> <a class="el" href="classGnome_1_1Glade_1_1XmlError.html">Gnome::Glade::Xml::Error</a> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="2987319c2918461c2b87636b8be1bcc2"></a><!-- doxytag: member="Gnome::Glade::Xml::~Xml" ref="2987319c2918461c2b87636b8be1bcc2" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gnome::Glade::Xml::~Xml </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> <a class="anchor" name="160192d84ac26d4cb15f19f244950dfb"></a><!-- doxytag: member="Gnome::Glade::Xml::Xml" ref="160192d84ac26d4cb15f19f244950dfb" args="(const std::string &filename, const Glib::ustring &root, const Glib::ustring &domain)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gnome::Glade::Xml::Xml </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>filename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>root</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>domain</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Loads a glade XML file. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGnome_1_1Glade_1_1XmlError.html">XmlError</a></em> </td><td></td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="1736fad12cef10e6896a0e7345c57cb7"></a><!-- doxytag: member="Gnome::Glade::Xml::Xml" ref="1736fad12cef10e6896a0e7345c57cb7" args="(const char *buffer, int size, const Glib::ustring &root, const Glib::ustring &domain)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gnome::Glade::Xml::Xml </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>root</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>domain</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Reads glade XML data from memory. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGnome_1_1Glade_1_1XmlError.html">XmlError</a></em> </td><td></td></tr> </table> </dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="40423feb0c18b3c2ae3788eb9a7871a1"></a><!-- doxytag: member="Gnome::Glade::Xml::gobj" ref="40423feb0c18b3c2ae3788eb9a7871a1" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GladeXML* Gnome::Glade::Xml::gobj </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Provides access to the underlying C GObject. <p> </div> </div><p> <a class="anchor" name="3f0b9603ba5beaf11b0a9f1eb6c7b037"></a><!-- doxytag: member="Gnome::Glade::Xml::gobj" ref="3f0b9603ba5beaf11b0a9f1eb6c7b037" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GladeXML* Gnome::Glade::Xml::gobj </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Provides access to the underlying C GObject. <p> </div> </div><p> <a class="anchor" name="b571da66313322d6fd36584e922135e7"></a><!-- doxytag: member="Gnome::Glade::Xml::gobj_copy" ref="b571da66313322d6fd36584e922135e7" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GladeXML* Gnome::Glade::Xml::gobj_copy </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <p> </div> </div><p> <a class="anchor" name="3d60edc43a6adef91e68b8595d995e17"></a><!-- doxytag: member="Gnome::Glade::Xml::get_widget_checked" ref="3d60edc43a6adef91e68b8595d995e17" args="(const Glib::ustring &name, GType type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::Widget* Gnome::Glade::Xml::get_widget_checked </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GType </td> <td class="paramname"> <em>type</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Referenced by <a class="el" href="xml_8h-source.html#l00243">get_widget()</a>.</p> </div> </div><p> <a class="anchor" name="548a1454e17cf3d6ac0aa1e32f4ea26c"></a><!-- doxytag: member="Gnome::Glade::Xml::get_cwidget" ref="548a1454e17cf3d6ac0aa1e32f4ea26c" args="(const Glib::ustring &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GtkWidget* Gnome::Glade::Xml::get_cwidget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em> </td> <td> ) </td> <td width="100%"><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Referenced by <a class="el" href="xml_8h-source.html#l00272">get_widget_derived()</a>.</p> </div> </div><p> <a class="anchor" name="1a4ecbd703142ff3e4b7098cc2653852"></a><!-- doxytag: member="Gnome::Glade::Xml::create" ref="1a4ecbd703142ff3e4b7098cc2653852" args="(const std::string &filename, const Glib::ustring &root=Glib::ustring(), const Glib::ustring &domain=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a>> Gnome::Glade::Xml::create </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>filename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>root</em> = <code>Glib::ustring()</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>domain</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Loads a <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> XML file. <p> This will instantiate the widgets in the XML file. You can use the root parameter to only instantiate a certain widget and its children. The returned <a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a> object keeps pointers to the instantiated widgets which you can retrieve with <a class="el" href="classGnome_1_1Glade_1_1Xml.html#a850dc2cbfef4e119d3fbb0c983c4be9" title="Get a widget from the Glade file.">get_widget()</a>.<p> Note that the <a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a> object does not delete the widgets it instantiates, but instead leaves the responsibility to you. See <a class="el" href="classGnome_1_1Glade_1_1Xml.html#a850dc2cbfef4e119d3fbb0c983c4be9" title="Get a widget from the Glade file.">get_widget()</a>. This means that you can safely let the <a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a> object go out of scope after you have retrieved the pointers you need from it. <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGnome_1_1Glade_1_1XmlError.html">XmlError</a></em> </td><td></td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="432d8d0c0a41aaad6821a9a74cb33315"></a><!-- doxytag: member="Gnome::Glade::Xml::create_from_buffer" ref="432d8d0c0a41aaad6821a9a74cb33315" args="(const char *buffer, int size, const Glib::ustring &root=Glib::ustring(), const Glib::ustring &domain=Glib::ustring())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a>> Gnome::Glade::Xml::create_from_buffer </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>root</em> = <code>Glib::ustring()</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>domain</em> = <code>Glib::ustring()</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Reads glade XML data from memory. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classGnome_1_1Glade_1_1XmlError.html">XmlError</a></em> </td><td></td></tr> </table> </dl> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classGnome_1_1Glade_1_1Xml.html#1a4ecbd703142ff3e4b7098cc2653852" title="Loads a Glade XML file.">create()</a> </dd></dl> </div> </div><p> <a class="anchor" name="93de104460cf62911a60a9645be122c0"></a><!-- doxytag: member="Gnome::Glade::Xml::get_filename" ref="93de104460cf62911a60a9645be122c0" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Gnome::Glade::Xml::get_filename </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="a850dc2cbfef4e119d3fbb0c983c4be9"></a><!-- doxytag: member="Gnome::Glade::Xml::get_widget" ref="a850dc2cbfef4e119d3fbb0c983c4be9" args="(const Glib::ustring &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::Widget* Gnome::Glade::Xml::get_widget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Get a widget from the <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> file. <p> For instance: <div class="fragment"><pre class="fragment"> Gtk::Table* pTable = <span class="keyword">dynamic_cast<</span>Gtk::Table*<span class="keyword">></span>(refXml->get_widget(<span class="stringliteral">"mytable"</span>)); </pre></div> Note that you are responsible for deleting top-level widgets (windows and dialogs). Other widgets are instantiated as managed so they will be deleted automatically if you add them to a container. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the widget. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the widget, or <code>0</code> on failure. </dd></dl> </div> </div><p> <a class="anchor" name="2f8abf5936d33db52fd917c1c1d4de3d"></a><!-- doxytag: member="Gnome::Glade::Xml::get_widget" ref="2f8abf5936d33db52fd917c1c1d4de3d" args="(const Glib::ustring &name, T_Widget *&widget)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_Widget> </div> <table class="memname"> <tr> <td class="memname">T_Widget* Gnome::Glade::Xml::get_widget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">T_Widget *& </td> <td class="paramname"> <em>widget</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> More convenient way of getting a widget from the <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> file. <p> It allows for a shorter syntax with less repetition. For instance: <div class="fragment"><pre class="fragment"> Gtk::Table* pTable = 0; refXml->get_widget(<span class="stringliteral">"mytable"</span>, pTable); </pre></div> This method prints a warning message to the console if the widget doesn't exist or has the wrong type, so you don't need to check that manually.<p> Note that you are responsible for deleting top-level widgets (windows and dialogs) instantiated by the <a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a> object. Other widgets are instantiated as managed so they will be deleted automatically if you add them to a container widget.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the widget. </td></tr> </table> </dl> <dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>widget</em> </td><td>A pointer to the widget, or <code>0</code> on failure. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The value of <em>widget</em>. </dd></dl> <p>References <a class="el" href="classGnome_1_1Glade_1_1Xml.html#3d60edc43a6adef91e68b8595d995e17">get_widget_checked()</a>.</p> </div> </div><p> <a class="anchor" name="8e9be00bb530ef24ee4a01cfe95d4a37"></a><!-- doxytag: member="Gnome::Glade::Xml::get_widget_derived" ref="8e9be00bb530ef24ee4a01cfe95d4a37" args="(const Glib::ustring &name, T_Widget *&widget)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_Widget> </div> <table class="memname"> <tr> <td class="memname">T_Widget* Gnome::Glade::Xml::get_widget_derived </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">T_Widget *& </td> <td class="paramname"> <em>widget</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> This provides a pointer to a widget whose details are specified in the <a class="el" href="namespaceGnome_1_1Glade.html">Glade</a> file, but which is implemented by your own derived class. <p> Your class must have a constructor like so: <div class="fragment"><pre class="fragment"> DerivedDialog::DerivedDialog(BaseObjectType* cobject, <span class="keyword">const</span> Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : Gtk::Dialog(cobject) <span class="comment">//Calls the base class constructor</span> </pre></div><p> For instance: <div class="fragment"><pre class="fragment"> Gtk::DerivedBox* pBox = 0; refXml->get_widget_derived(<span class="stringliteral">"mybox"</span>, pBox); </pre></div><p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the widget. </td></tr> </table> </dl> <dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>widget</em> </td><td>A pointer to the widget, or <code>0</code> on failure. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The value of <em>widget</em>. </dd></dl> <p>References <a class="el" href="classGnome_1_1Glade_1_1Xml.html#548a1454e17cf3d6ac0aa1e32f4ea26c">get_cwidget()</a>.</p> </div> </div><p> <a class="anchor" name="00645193c3486e796be93b7daa3eec74"></a><!-- doxytag: member="Gnome::Glade::Xml::get_widget_prefix" ref="00645193c3486e796be93b7daa3eec74" args="(const Glib::ustring &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Glib::ListHandle<Gtk::Widget*> Gnome::Glade::Xml::get_widget_prefix </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="a2cdd4bd3fac01a7bfd0d7fa3adc7231"></a><!-- doxytag: member="Gnome::Glade::Xml::reparent_widget" ref="a2cdd4bd3fac01a7bfd0d7fa3adc7231" args="(const Glib::ustring &name, Gtk::Container &container)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gnome::Glade::Xml::reparent_widget </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Gtk::Container & </td> <td class="paramname"> <em>container</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Take the widget from the glade-generated container and put it in another container. <p> </div> </div><p> <a class="anchor" name="8a5de4f642bd1dd9684df4ad5bfb77a1"></a><!-- doxytag: member="Gnome::Glade::Xml::relative_file" ref="8a5de4f642bd1dd9684df4ad5bfb77a1" args="(const std::string &filename) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Gnome::Glade::Xml::relative_file </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>filename</em> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="194cd8d2bbe32b2af0bdf908da9840bd"></a><!-- doxytag: member="Gnome::Glade::Xml::get_widget_name" ref="194cd8d2bbe32b2af0bdf908da9840bd" args="(Gtk::Widget &widget)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static Glib::ustring Gnome::Glade::Xml::get_widget_name </td> <td>(</td> <td class="paramtype">Gtk::Widget & </td> <td class="paramname"> <em>widget</em> </td> <td> ) </td> <td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="dfa5ff54a6c8b9f9aa3b6e6ec4b86eb0"></a><!-- doxytag: member="Gnome::Glade::Xml::get_widget_tree" ref="dfa5ff54a6c8b9f9aa3b6e6ec4b86eb0" args="(Gtk::Widget &widget)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static Glib::RefPtr<<a class="el" href="classGnome_1_1Glade_1_1Xml.html">Xml</a>> Gnome::Glade::Xml::get_widget_tree </td> <td>(</td> <td class="paramtype">Gtk::Widget & </td> <td class="paramname"> <em>widget</em> </td> <td> ) </td> <td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="15d6880111f72b695ff9f834a9628a97"></a><!-- doxytag: member="Gnome::Glade::Xml::connect_clicked" ref="15d6880111f72b695ff9f834a9628a97" args="(const Glib::ustring &name, const sigc::slot< void > &slot_)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gnome::Glade::Xml::connect_clicked </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const sigc::slot< void > & </td> <td class="paramname"> <em>slot_</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Connect a Gtk::Button's clicked signal or a Gtk::MenuItem's activated signal to a slot. <p> For instance: <div class="fragment"><pre class="fragment"> refXml->connect_button(<span class="stringliteral">"button"</span>, sigc::mem_fun(*<span class="keyword">this</span>, &ExampleWindow::on_button_clicked) ); </pre></div><p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name of the widget. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pslot</em> </td><td>The slot to connect to. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="5a9bd43ba37c50cce8a9198678ce89a7"></a><!-- doxytag: member="Gnome::Glade::Xml::lookup_type_vfunc" ref="5a9bd43ba37c50cce8a9198678ce89a7" args="(const Glib::ustring &classname)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual GType Gnome::Glade::Xml::lookup_type_vfunc </td> <td>(</td> <td class="paramtype">const Glib::ustring & </td> <td class="paramname"> <em>classname</em> </td> <td> ) </td> <td width="100%"><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> * interface for changing the custom widget handling */ <p> </div> </div><p> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="1cb960c56d31dc948a3e6f4ba6af4480"></a><!-- doxytag: member="Gnome::Glade::Xml::wrap" ref="1cb960c56d31dc948a3e6f4ba6af4480" args="(GladeXML *object, bool take_copy=false)" --> <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">Gnome::Glade::Xml</a>> wrap </td> <td>(</td> <td class="paramtype">GladeXML * </td> <td class="paramname"> <em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>take_copy</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p> A Glib::wrap() method for this object. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em> </td><td>The C instance. </td></tr> <tr><td valign="top"></td><td valign="top"><em>take_copy</em> </td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="xml_8h.html">xml.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>