<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>gtkmm: Gtk::OptionMenu Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">gtkmm <span id="projectnumber">2.24.4</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceGtk.html">Gtk</a> </li> <li class="navelem"><a class="el" href="classGtk_1_1OptionMenu.html">OptionMenu</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#related">Related Functions</a> </div> <div class="headertitle"> <h1>Gtk::OptionMenu Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="Gtk::OptionMenu" --><!-- doxytag: inherits="Gtk::Button" --> <p>A widget used to choose from a list of valid choices. <a href="#_details">More...</a></p> <div class="dynheader"> Inheritance diagram for Gtk::OptionMenu:</div> <div class="dyncontent"> <div class="center"><img src="classGtk_1_1OptionMenu__inherit__graph.png" border="0" usemap="#Gtk_1_1OptionMenu_inherit__map" alt="Inheritance graph"/></div> <map name="Gtk_1_1OptionMenu_inherit__map" id="Gtk_1_1OptionMenu_inherit__map"> <area shape="rect" id="node2" href="classGtk_1_1Button.html" title="A widget that creates a signal when clicked on." alt="" coords="89,547,183,576"/><area shape="rect" id="node4" href="classGtk_1_1Bin.html" title="A container with just one child." alt="" coords="100,469,172,499"/><area shape="rect" id="node6" href="classGtk_1_1Container.html" title="Abstract container class." alt="" coords="79,392,193,421"/><area shape="rect" id="node8" href="classGtk_1_1Widget.html" title="Abstract Widget (Base class for all widgets)" alt="" coords="89,315,183,344"/><area shape="rect" id="node10" href="classGtk_1_1Object.html" title="Gtk::Object is the base class for all widgets, and for a few non-widget objects such as Gtk::Adjustme..." alt="" coords="21,237,115,267"/><area shape="rect" id="node12" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="21,160,115,189"/><area shape="rect" id="node14" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="5,83,131,112"/><area shape="rect" id="node16" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="11,5,125,35"/><area shape="rect" id="node18" href="classAtk_1_1Implementor.html" title="Atk::Implementor" alt="" coords="139,237,272,267"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for Gtk::OptionMenu:</div> <div class="dyncontent"> <div class="center"><img src="classGtk_1_1OptionMenu__coll__graph.png" border="0" usemap="#Gtk_1_1OptionMenu_coll__map" alt="Collaboration graph"/></div> <map name="Gtk_1_1OptionMenu_coll__map" id="Gtk_1_1OptionMenu_coll__map"> <area shape="rect" id="node2" href="classGtk_1_1Button.html" title="A widget that creates a signal when clicked on." alt="" coords="89,547,183,576"/><area shape="rect" id="node4" href="classGtk_1_1Bin.html" title="A container with just one child." alt="" coords="100,469,172,499"/><area shape="rect" id="node6" href="classGtk_1_1Container.html" title="Abstract container class." alt="" coords="79,392,193,421"/><area shape="rect" id="node8" href="classGtk_1_1Widget.html" title="Abstract Widget (Base class for all widgets)" alt="" coords="89,315,183,344"/><area shape="rect" id="node10" href="classGtk_1_1Object.html" title="Gtk::Object is the base class for all widgets, and for a few non-widget objects such as Gtk::Adjustme..." alt="" coords="21,237,115,267"/><area shape="rect" id="node12" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="21,160,115,189"/><area shape="rect" id="node14" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="5,83,131,112"/><area shape="rect" id="node16" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="11,5,125,35"/><area shape="rect" id="node18" href="classAtk_1_1Implementor.html" title="Atk::Implementor" alt="" coords="139,237,272,267"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classGtk_1_1OptionMenu-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a48cc0b8a9aa1d8332643ea92b35ae146">~OptionMenu</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">GtkOptionMenu* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#aae1984c3cfd400894e9da3e81fb4c4d0">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GtkObject. <a href="#aae1984c3cfd400894e9da3e81fb4c4d0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GtkOptionMenu* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a7f3da3dbf5f565daa422f126c2b7d86f">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GtkObject. <a href="#a7f3da3dbf5f565daa422f126c2b7d86f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#abb2ed6ba3bf399cddc5a769393444505">OptionMenu</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a0803d2e805dd785709c502374555a720">set_menu</a> (<a class="el" href="classGtk_1_1Menu.html">Menu</a>& menu)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1Menu.html">Menu</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a4b9aaefe25cc2e2b990c22807696823b">get_menu</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classGtk_1_1Menu.html">Menu</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a4216ee55973a26d07dc71c796f782ee4">get_menu</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a3d7c2beff095a3c96ae6e5857fc97d75">remove_menu</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a80a465035f6cfb95c5c11d3cbfbbdd64">get_history</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the index of the currently selected menu item. <a href="#a80a465035f6cfb95c5c11d3cbfbbdd64"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#ac4acac0764b96e84c806c9bdb351840f">set_history</a> (guint index)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a69a90222e061e0e57de42270296c865f">signal_changed</a> ()</td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#abb1311279eb38075c44fe45776db3316">on_changed</a> ()</td></tr> <tr><td colspan="2"><h2><a name="related"></a> Related Functions</h2></td></tr> <tr><td colspan="2">(Note that these are not member functions.) <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1OptionMenu.html">Gtk::OptionMenu</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1OptionMenu.html#a0a28db17e3f7ff0f41fb50981457e84f">wrap</a> (GtkOptionMenu* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a0a28db17e3f7ff0f41fb50981457e84f"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A widget used to choose from a list of valid choices. </p> <p>A <a class="el" href="classGtk_1_1OptionMenu.html" title="A widget used to choose from a list of valid choices.">Gtk::OptionMenu</a> is a widget that allows the user to choose from a list of valid choices. The <a class="el" href="classGtk_1_1OptionMenu.html" title="A widget used to choose from a list of valid choices.">Gtk::OptionMenu</a> displays the selected choice. When activated the GtkOptionMenu displays a popup <a class="el" href="classGtk_1_1Menu.html" title="A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated by the user...">Gtk::Menu</a> which allows the user to make a new choice.</p> <dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000081">Deprecated:</a></b></dt><dd>Use the <a class="el" href="classGtk_1_1ComboBox.html" title="A widget used to choose from a list of items.">ComboBox</a> widget instead. </dd></dl> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a48cc0b8a9aa1d8332643ea92b35ae146"></a><!-- doxytag: member="Gtk::OptionMenu::~OptionMenu" ref="a48cc0b8a9aa1d8332643ea92b35ae146" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gtk::OptionMenu::~OptionMenu </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="abb2ed6ba3bf399cddc5a769393444505"></a><!-- doxytag: member="Gtk::OptionMenu::OptionMenu" ref="abb2ed6ba3bf399cddc5a769393444505" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::OptionMenu::OptionMenu </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a80a465035f6cfb95c5c11d3cbfbbdd64"></a><!-- doxytag: member="Gtk::OptionMenu::get_history" ref="a80a465035f6cfb95c5c11d3cbfbbdd64" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Gtk::OptionMenu::get_history </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Retrieves the index of the currently selected menu item. </p> <p>The menu items are numbered from top to bottom, starting with 0.</p> <p>Deprecated: 2.4: Use <a class="el" href="classGtk_1_1ComboBox.html" title="A widget used to choose from a list of items.">Gtk::ComboBox</a> instead. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>Index of the selected menu item, or -1 if there are no menu items. </dd></dl> </div> </div> <a class="anchor" id="a4b9aaefe25cc2e2b990c22807696823b"></a><!-- doxytag: member="Gtk::OptionMenu::get_menu" ref="a4b9aaefe25cc2e2b990c22807696823b" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGtk_1_1Menu.html">Menu</a>* Gtk::OptionMenu::get_menu </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a4216ee55973a26d07dc71c796f782ee4"></a><!-- doxytag: member="Gtk::OptionMenu::get_menu" ref="a4216ee55973a26d07dc71c796f782ee4" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classGtk_1_1Menu.html">Menu</a>* Gtk::OptionMenu::get_menu </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aae1984c3cfd400894e9da3e81fb4c4d0"></a><!-- doxytag: member="Gtk::OptionMenu::gobj" ref="aae1984c3cfd400894e9da3e81fb4c4d0" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GtkOptionMenu* Gtk::OptionMenu::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GtkObject. </p> <p>Reimplemented from <a class="el" href="classGtk_1_1Button.html#aac9db3896fa8b7576c6f3720846faa1c">Gtk::Button</a>.</p> </div> </div> <a class="anchor" id="a7f3da3dbf5f565daa422f126c2b7d86f"></a><!-- doxytag: member="Gtk::OptionMenu::gobj" ref="a7f3da3dbf5f565daa422f126c2b7d86f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GtkOptionMenu* Gtk::OptionMenu::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GtkObject. </p> <p>Reimplemented from <a class="el" href="classGtk_1_1Button.html#a9ea06156c54545902608286d1a0d0e42">Gtk::Button</a>.</p> </div> </div> <a class="anchor" id="abb1311279eb38075c44fe45776db3316"></a><!-- doxytag: member="Gtk::OptionMenu::on_changed" ref="abb1311279eb38075c44fe45776db3316" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gtk::OptionMenu::on_changed </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a3d7c2beff095a3c96ae6e5857fc97d75"></a><!-- doxytag: member="Gtk::OptionMenu::remove_menu" ref="a3d7c2beff095a3c96ae6e5857fc97d75" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::OptionMenu::remove_menu </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ac4acac0764b96e84c806c9bdb351840f"></a><!-- doxytag: member="Gtk::OptionMenu::set_history" ref="ac4acac0764b96e84c806c9bdb351840f" args="(guint index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::OptionMenu::set_history </td> <td>(</td> <td class="paramtype">guint </td> <td class="paramname"><em>index</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a0803d2e805dd785709c502374555a720"></a><!-- doxytag: member="Gtk::OptionMenu::set_menu" ref="a0803d2e805dd785709c502374555a720" args="(Menu &menu)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::OptionMenu::set_menu </td> <td>(</td> <td class="paramtype"><a class="el" href="classGtk_1_1Menu.html">Menu</a>& </td> <td class="paramname"><em>menu</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a69a90222e061e0e57de42270296c865f"></a><!-- doxytag: member="Gtk::OptionMenu::signal_changed" ref="a69a90222e061e0e57de42270296c865f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > Gtk::OptionMenu::signal_changed </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <dl class="user"><dt><b>Prototype:</b></dt><dd><code>void on_my_changed()</code> </dd></dl> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="a0a28db17e3f7ff0f41fb50981457e84f"></a><!-- doxytag: member="Gtk::OptionMenu::wrap" ref="a0a28db17e3f7ff0f41fb50981457e84f" args="(GtkOptionMenu *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGtk_1_1OptionMenu.html">Gtk::OptionMenu</a>* wrap </td> <td>(</td> <td class="paramtype">GtkOptionMenu * </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> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">object</td><td>The C instance. </td></tr> <tr><td class="paramname">take_copy</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> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>gtkmm/optionmenu.h</li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Jun 25 2013 for gtkmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>