29
32
<div class="contents">
30
<h1>Gtk::MenuShell Class Reference<br>
33
<h1>Gtk::MenuShell Class Reference<br/>
32
35
[<a class="el" href="group__Widgets.html">Widgets</a>, <a class="el" href="group__Containers.html">Container Widgets</a>, <a class="el" href="group__Menus.html">Menu classes</a>]</small>
33
</h1><!-- doxytag: class="Gtk::MenuShell" --><!-- doxytag: inherits="Gtk::Container" -->The abstract base class for <a class="el" href="classGtk_1_1Menu.html" title="A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated...">Gtk::Menu</a> and <a class="el" href="classGtk_1_1MenuBar.html" title="A standard menu bar which usually holds Gtk::Menu submenu items.">Gtk::MenuBar</a>. <a href="#_details">More...</a>
35
Inherits <a class="el" href="classGtk_1_1Container.html">Gtk::Container</a>.
37
Inherited by <a class="el" href="classGtk_1_1Menu.html">Gtk::Menu</a>, and <a class="el" href="classGtk_1_1MenuBar.html">Gtk::MenuBar</a>.
36
</h1><!-- doxytag: class="Gtk::MenuShell" --><!-- doxytag: inherits="Gtk::Container" -->
37
<p>The abstract base class for <a class="el" href="classGtk_1_1Menu.html" title="A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated...">Gtk::Menu</a> and <a class="el" href="classGtk_1_1MenuBar.html" title="A standard menu bar which usually holds Gtk::Menu submenu items.">Gtk::MenuBar</a>. <a href="#_details">More...</a></p>
39
<p>Inherits <a class="el" href="classGtk_1_1Container.html">Gtk::Container</a>.</p>
41
<p>Inherited by <a class="el" href="classGtk_1_1Menu.html">Gtk::Menu</a>, and <a class="el" href="classGtk_1_1MenuBar.html">Gtk::MenuBar</a>.</p>
39
42
<div class="dynheader">
40
43
Collaboration diagram for Gtk::MenuShell:</div>
41
44
<div class="dynsection">
42
<p><center><img src="classGtk_1_1MenuShell__coll__graph.png" border="0" usemap="#Gtk_1_1MenuShell__coll__map" alt="Collaboration graph"></center>
43
<map name="Gtk_1_1MenuShell__coll__map">
44
<area shape="rect" href="classGtk_1_1Container.html" title="Abstract container class." alt="" coords="873,36,977,63"><area shape="rect" href="classGtk_1_1Bin.html" title="A container with just one child." alt="" coords="1827,69,1896,96"><area shape="rect" href="classGtk_1_1Widget.html" title="Abstract Widget (Base class for all widgets)." alt="" coords="661,36,752,63"><area shape="rect" href="classGtk_1_1Object.html" title="Gtk::Object is the base class for all widgets, and for a few non-widget objects such..." alt="" coords="505,5,593,32"><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="340,5,431,32"><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="163,29,283,56"><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="333,56,437,83"><area shape="rect" doxygen="libsigc++-2.0.tag:http://library.gnome.org/devel/libsigc++/unstable/" href="http://library.gnome.org/devel/libsigc++/unstable/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="5,29,112,56"><area shape="rect" href="classAtk_1_1Implementor.html" title="Atk::Implementor" alt="" coords="489,56,609,83"><area shape="rect" href="classGtk_1_1Window.html" title="Toplevel Window This represents all widgets which are physical windows controlled..." alt="" coords="2332,80,2428,107"><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html" title="Glib::RefPtr\< AccelGroup \>" alt="" coords="1771,120,1952,147"><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html" title="Glib::RefPtr\< T_CppObject \>" alt="" coords="831,120,1020,147"><area shape="rect" href="classGtk_1_1Menu__Helpers_1_1MenuList.html" title="Gtk::Menu_Helpers::MenuList" alt="" coords="2283,153,2477,180"><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1HelperList.html" title="Glib::HelperList\< MenuItem, const Element, Glib::List_Cpp_Iterator\< GtkMenuItem, MenuItem \> \>" alt="" coords="1565,171,2157,197"><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1HelperList.html" title="Glib::HelperList\< class, class, class \>" alt="" coords="804,171,1047,197"></map>
45
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
48
<a href="classGtk_1_1MenuShell-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
50
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
51
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">Menu_Helpers::MenuList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#8d79bb921d0a3ffca5e4c9d8f77648a2">MenuList</a></td></tr>
53
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
54
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#b7117e65877843c10ad7d5b705a770e7">~MenuShell</a> ()</td></tr>
56
<tr><td class="memItemLeft" nowrap align="right" valign="top">GtkMenuShell* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#bb7c2641f9e3624f3225dcf76d8b994c">gobj</a> ()</td></tr>
58
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GtkObject. <a href="#bb7c2641f9e3624f3225dcf76d8b994c"></a><br></td></tr>
59
<tr><td class="memItemLeft" nowrap align="right" valign="top">const GtkMenuShell* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#4417adfb6a301e40a0040517c43e69c7">gobj</a> () const </td></tr>
61
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GtkObject. <a href="#4417adfb6a301e40a0040517c43e69c7"></a><br></td></tr>
62
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#24d5b1a4a61941006e544a4f5a230917">append</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item)</td></tr>
64
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#5aa0142b2f86f511ac5f98ce892d03bd">prepend</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item)</td></tr>
66
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a3243bef17ebc3ed18b3885194e7d9a3">insert</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item, int position)</td></tr>
68
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#c38fde346621b24154540f83243956fd">select_item</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item)</td></tr>
70
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#b90ff16ed2fcba9aa3460569d45f1c1a">deselect</a> ()</td></tr>
72
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#6e5136fc61381ae6f2e529906066680a">activate_item</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item, bool force_deactivate=false)</td></tr>
74
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#882dab72c89e462a879a6b6179464cc2">select_first</a> (bool search_sensitive=true)</td></tr>
76
<tr><td class="mdescLeft"> </td><td class="mdescRight">Select the first visible or selectable child of the menu shell; don't select tearoff items unless the only item is a tearoff item. <a href="#882dab72c89e462a879a6b6179464cc2"></a><br></td></tr>
77
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#9b6af9110758ce34856b005b19a7a2fb">deactivate</a> ()</td></tr>
79
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#bc8e49ce84e81319c81bdc58020245c0">cancel</a> ()</td></tr>
81
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cancels the selection within the menu shell. <a href="#bc8e49ce84e81319c81bdc58020245c0"></a><br></td></tr>
82
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#14c8a5dcb0d5afa8b1ab93ae149cf603">signal_deactivate</a> ()</td></tr>
84
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#fe3aa91d39c133487f5ee87afdf3e255">signal_selection_done</a> ()</td></tr>
86
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy1.html">Glib::SignalProxy1</a>< gboolean, int > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#29358f68b2c16afdab5147f7021368e8">signal_move_selected</a> ()</td></tr>
88
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">MenuList</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#3be08eb46038a65ca6c9b5b35f310672">items</a> ()</td></tr>
90
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">MenuList</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a65f89396cb05203e8ef565a2cd0ea1d">items</a> () const </td></tr>
92
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#b871eaa94a1566f520beb132ba3794c4">accelerate</a> (<a class="el" href="classGtk_1_1Window.html">Window</a>& window)</td></tr>
94
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initializes menu accelerators. <a href="#b871eaa94a1566f520beb132ba3794c4"></a><br></td></tr>
95
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#b854722984e3fc3e85d2ad7c7ba20c2f">accelerate</a> (<a class="el" href="classGtk_1_1Widget.html">Widget</a>& parent)</td></tr>
97
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initializes menu accelerators. <a href="#b854722984e3fc3e85d2ad7c7ba20c2f"></a><br></td></tr>
98
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#959971445f815ecfcc2f3d3cda24708a">get_take_focus</a> () const </td></tr>
100
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns: <code>true</code> if the menu shell will take the keyboard focus on popup. <a href="#959971445f815ecfcc2f3d3cda24708a"></a><br></td></tr>
101
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#c076143bf45a4c69cd65965a7779a963">set_take_focus</a> (bool take_focus=true)</td></tr>
103
<tr><td class="mdescLeft"> </td><td class="mdescRight">If <em>take_focus</em> is <code>true</code> (the default) the menu shell will take the keyboard focus so that it will receive all keyboard events which is needed to enable keyboard navigation in menus. <a href="#c076143bf45a4c69cd65965a7779a963"></a><br></td></tr>
104
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a>< bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#98a38ba541cff7ba9f990e24adeb6642">property_take_focus</a> ()</td></tr>
106
<tr><td class="mdescLeft"> </td><td class="mdescRight">A boolean that determines whether the menu grabs the keyboard focus. <a href="#98a38ba541cff7ba9f990e24adeb6642"></a><br></td></tr>
107
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1PropertyProxy__ReadOnly.html">Glib::PropertyProxy_ReadOnly</a><br class="typebreak">
108
< bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#4119fb422a09241e3e88a6cc1431ee06">property_take_focus</a> () const </td></tr>
110
<tr><td class="mdescLeft"> </td><td class="mdescRight">A boolean that determines whether the menu grabs the keyboard focus. <a href="#4119fb422a09241e3e88a6cc1431ee06"></a><br></td></tr>
111
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
112
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#eceb71b253394dbc8ca282feb8ae8e58">on_deactivate</a> ()</td></tr>
114
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#407cbaed85670dc36c35a67cdefd015b">on_selection_done</a> ()</td></tr>
116
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#6af3cf3fd23271ebe15daa3210339bfe">MenuShell</a> ()</td></tr>
118
<tr><td colspan="2"><br><h2>Related Functions</h2></td></tr>
119
<tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr>
120
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGtk_1_1MenuShell.html">Gtk::MenuShell</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#5a3342e817b330a6b353d25c37ea2359">wrap</a> (GtkMenuShell* object, bool take_copy=false)</td></tr>
122
<tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/namespaceGlib.html#671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#5a3342e817b330a6b353d25c37ea2359"></a><br></td></tr>
45
<div class="center"><img src="classGtk_1_1MenuShell__coll__graph.png" border="0" usemap="#Gtk_1_1MenuShell_coll__map" alt="Collaboration graph"/></div>
46
<map name="Gtk_1_1MenuShell_coll__map" id="Gtk_1_1MenuShell_coll__map">
47
<area shape="rect" href="classGtk_1_1Container.html" title="Abstract container class." alt="" coords="873,36,977,63"/><area shape="rect" href="classGtk_1_1Bin.html" title="A container with just one child." alt="" coords="1840,69,1909,96"/><area shape="rect" href="classGtk_1_1Widget.html" title="Abstract Widget (Base class for all widgets)." alt="" coords="661,36,752,63"/><area shape="rect" href="classGtk_1_1Object.html" title="Gtk::Object is the base class for all widgets, and for a few non-widget objects such..." alt="" coords="505,5,593,32"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="340,5,431,32"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="163,29,283,56"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="333,56,437,83"/><area shape="rect" doxygen="libsigc++-2.0.tag:http://library.gnome.org/devel/libsigc++/unstable/" href="http://library.gnome.org/devel/libsigc++/unstable/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="5,29,112,56"/><area shape="rect" href="classAtk_1_1Implementor.html" title="Atk::Implementor" alt="" coords="489,56,609,83"/><area shape="rect" href="classGtk_1_1Window.html" title="Toplevel Window This represents all widgets which are physical windows controlled..." alt="" coords="2345,80,2441,107"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html" title="Glib::RefPtr\< AccelGroup \>" alt="" coords="1784,120,1965,147"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html" title="Glib::RefPtr\< T_CppObject \>" alt="" coords="831,120,1020,147"/><area shape="rect" href="classGtk_1_1Menu__Helpers_1_1MenuList.html" title="Gtk::Menu_Helpers::MenuList" alt="" coords="2296,153,2491,180"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1HelperList.html" title="Glib::HelperList\< MenuItem, const Element, Glib::List_Cpp_Iterator\< GtkMenuItem, MenuItem \> \>" alt="" coords="1579,171,2171,197"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1HelperList.html" title="Glib::HelperList\< class, class, class \>" alt="" coords="804,171,1047,197"/></map>
48
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
50
<p><a href="classGtk_1_1MenuShell-members.html">List of all members.</a></p>
51
<table border="0" cellpadding="0" cellspacing="0">
52
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
53
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">Menu_Helpers::MenuList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a8d79bb921d0a3ffca5e4c9d8f77648a2">MenuList</a></td></tr>
54
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
55
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#ab7117e65877843c10ad7d5b705a770e7">~MenuShell</a> ()</td></tr>
56
<tr><td class="memItemLeft" align="right" valign="top">GtkMenuShell* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#abb7c2641f9e3624f3225dcf76d8b994c">gobj</a> ()</td></tr>
57
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GtkObject. <a href="#abb7c2641f9e3624f3225dcf76d8b994c"></a><br/></td></tr>
58
<tr><td class="memItemLeft" align="right" valign="top">const GtkMenuShell* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a4417adfb6a301e40a0040517c43e69c7">gobj</a> () const </td></tr>
59
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GtkObject. <a href="#a4417adfb6a301e40a0040517c43e69c7"></a><br/></td></tr>
60
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a24d5b1a4a61941006e544a4f5a230917">append</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item)</td></tr>
61
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a5aa0142b2f86f511ac5f98ce892d03bd">prepend</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item)</td></tr>
62
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#aa3243bef17ebc3ed18b3885194e7d9a3">insert</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item, int position)</td></tr>
63
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#ac38fde346621b24154540f83243956fd">select_item</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item)</td></tr>
64
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#ab90ff16ed2fcba9aa3460569d45f1c1a">deselect</a> ()</td></tr>
65
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a6e5136fc61381ae6f2e529906066680a">activate_item</a> (<a class="el" href="classGtk_1_1MenuItem.html">MenuItem</a>& menu_item, bool force_deactivate=false)</td></tr>
66
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a882dab72c89e462a879a6b6179464cc2">select_first</a> (bool search_sensitive=true)</td></tr>
67
<tr><td class="mdescLeft"> </td><td class="mdescRight">Select the first visible or selectable child of the menu shell; don't select tearoff items unless the only item is a tearoff item. <a href="#a882dab72c89e462a879a6b6179464cc2"></a><br/></td></tr>
68
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a9b6af9110758ce34856b005b19a7a2fb">deactivate</a> ()</td></tr>
69
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#abc8e49ce84e81319c81bdc58020245c0">cancel</a> ()</td></tr>
70
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cancels the selection within the menu shell. <a href="#abc8e49ce84e81319c81bdc58020245c0"></a><br/></td></tr>
71
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a14c8a5dcb0d5afa8b1ab93ae149cf603">signal_deactivate</a> ()</td></tr>
72
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#afe3aa91d39c133487f5ee87afdf3e255">signal_selection_done</a> ()</td></tr>
73
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy1.html">Glib::SignalProxy1</a>< gboolean, int > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a29358f68b2c16afdab5147f7021368e8">signal_move_selected</a> ()</td></tr>
74
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">MenuList</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a3be08eb46038a65ca6c9b5b35f310672">items</a> ()</td></tr>
75
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">MenuList</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#aa65f89396cb05203e8ef565a2cd0ea1d">items</a> () const </td></tr>
76
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#ab871eaa94a1566f520beb132ba3794c4">accelerate</a> (<a class="el" href="classGtk_1_1Window.html">Window</a>& window)</td></tr>
77
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initializes menu accelerators. <a href="#ab871eaa94a1566f520beb132ba3794c4"></a><br/></td></tr>
78
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#ab854722984e3fc3e85d2ad7c7ba20c2f">accelerate</a> (<a class="el" href="classGtk_1_1Widget.html">Widget</a>& parent)</td></tr>
79
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initializes menu accelerators. <a href="#ab854722984e3fc3e85d2ad7c7ba20c2f"></a><br/></td></tr>
80
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a959971445f815ecfcc2f3d3cda24708a">get_take_focus</a> () const </td></tr>
81
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns: <code>true</code> if the menu shell will take the keyboard focus on popup. <a href="#a959971445f815ecfcc2f3d3cda24708a"></a><br/></td></tr>
82
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#ac076143bf45a4c69cd65965a7779a963">set_take_focus</a> (bool take_focus=true)</td></tr>
83
<tr><td class="mdescLeft"> </td><td class="mdescRight">If <em>take_focus</em> is <code>true</code> (the default) the menu shell will take the keyboard focus so that it will receive all keyboard events which is needed to enable keyboard navigation in menus. <a href="#ac076143bf45a4c69cd65965a7779a963"></a><br/></td></tr>
84
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a>< bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a98a38ba541cff7ba9f990e24adeb6642">property_take_focus</a> ()</td></tr>
85
<tr><td class="mdescLeft"> </td><td class="mdescRight">A boolean that determines whether the menu grabs the keyboard focus. <a href="#a98a38ba541cff7ba9f990e24adeb6642"></a><br/></td></tr>
86
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1PropertyProxy__ReadOnly.html">Glib::PropertyProxy_ReadOnly</a><br class="typebreak"/>
87
< bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a4119fb422a09241e3e88a6cc1431ee06">property_take_focus</a> () const </td></tr>
88
<tr><td class="mdescLeft"> </td><td class="mdescRight">A boolean that determines whether the menu grabs the keyboard focus. <a href="#a4119fb422a09241e3e88a6cc1431ee06"></a><br/></td></tr>
89
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
90
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#aeceb71b253394dbc8ca282feb8ae8e58">on_deactivate</a> ()</td></tr>
91
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a407cbaed85670dc36c35a67cdefd015b">on_selection_done</a> ()</td></tr>
92
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a6af3cf3fd23271ebe15daa3210339bfe">MenuShell</a> ()</td></tr>
93
<tr><td colspan="2"><h2>Related Functions</h2></td></tr>
94
<tr><td colspan="2"><p>(Note that these are not member functions.) </p>
96
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1MenuShell.html">Gtk::MenuShell</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1MenuShell.html#a5a3342e817b330a6b353d25c37ea2359">wrap</a> (GtkMenuShell* object, bool take_copy=false)</td></tr>
97
<tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a5a3342e817b330a6b353d25c37ea2359"></a><br/></td></tr>
124
<hr><a name="_details"></a><h2>Detailed Description</h2>
125
The abstract base class for <a class="el" href="classGtk_1_1Menu.html" title="A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated...">Gtk::Menu</a> and <a class="el" href="classGtk_1_1MenuBar.html" title="A standard menu bar which usually holds Gtk::Menu submenu items.">Gtk::MenuBar</a>. <p>
126
It is a container of <a class="el" href="classGtk_1_1MenuItem.html" title="Child item for menus.">Gtk::MenuItem</a> objects arranged in a list which can be navigated, selected, and activated by the user to perform application functions. It can have a submenu associated with it, allowing for nested hierarchical menus. You can use <a class="el" href="classGtk_1_1MenuShell.html#24d5b1a4a61941006e544a4f5a230917">append()</a>, <a class="el" href="classGtk_1_1MenuShell.html#5aa0142b2f86f511ac5f98ce892d03bd">prepend()</a> and <a class="el" href="classGtk_1_1MenuShell.html#a3243bef17ebc3ed18b3885194e7d9a3">insert()</a> to add <a class="el" href="classGtk_1_1MenuItem.html" title="Child item for menus.">Gtk::MenuItem</a> widgets, but you will probably find it more convenient to use the STL-style <a class="el" href="classGtk_1_1MenuShell.html#3be08eb46038a65ca6c9b5b35f310672">items()</a> interface with the Gtk::Menu_Helpers::MenuElem() class. <hr><h2>Member Typedef Documentation</h2>
127
<a class="anchor" name="8d79bb921d0a3ffca5e4c9d8f77648a2"></a><!-- doxytag: member="Gtk::MenuShell::MenuList" ref="8d79bb921d0a3ffca5e4c9d8f77648a2" args="" -->
99
<hr/><a name="_details"></a><h2>Detailed Description</h2>
100
<p>The abstract base class for <a class="el" href="classGtk_1_1Menu.html" title="A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated...">Gtk::Menu</a> and <a class="el" href="classGtk_1_1MenuBar.html" title="A standard menu bar which usually holds Gtk::Menu submenu items.">Gtk::MenuBar</a>. </p>
101
<p>It is a container of <a class="el" href="classGtk_1_1MenuItem.html" title="Child item for menus.">Gtk::MenuItem</a> objects arranged in a list which can be navigated, selected, and activated by the user to perform application functions. It can have a submenu associated with it, allowing for nested hierarchical menus. You can use <a class="el" href="classGtk_1_1MenuShell.html#a24d5b1a4a61941006e544a4f5a230917">append()</a>, <a class="el" href="classGtk_1_1MenuShell.html#a5aa0142b2f86f511ac5f98ce892d03bd">prepend()</a> and <a class="el" href="classGtk_1_1MenuShell.html#aa3243bef17ebc3ed18b3885194e7d9a3">insert()</a> to add <a class="el" href="classGtk_1_1MenuItem.html" title="Child item for menus.">Gtk::MenuItem</a> widgets, but you will probably find it more convenient to use the STL-style <a class="el" href="classGtk_1_1MenuShell.html#a3be08eb46038a65ca6c9b5b35f310672">items()</a> interface with the Gtk::Menu_Helpers::MenuElem() class. </p>
102
<hr/><h2>Member Typedef Documentation</h2>
103
<a class="anchor" id="a8d79bb921d0a3ffca5e4c9d8f77648a2"></a><!-- doxytag: member="Gtk::MenuShell::MenuList" ref="a8d79bb921d0a3ffca5e4c9d8f77648a2" args="" -->
128
104
<div class="memitem">
129
105
<div class="memproto">
130
106
<table class="memname">
132
<td class="memname">typedef <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">Menu_Helpers::MenuList</a> <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">Gtk::MenuShell::MenuList</a> </td>
108
<td class="memname">typedef <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">Menu_Helpers::MenuList</a> <a class="el" href="classGtk_1_1Menu__Helpers_1_1MenuList.html">Gtk::MenuShell::MenuList</a></td>
136
112
<div class="memdoc">
142
<hr><h2>Constructor & Destructor Documentation</h2>
143
<a class="anchor" name="b7117e65877843c10ad7d5b705a770e7"></a><!-- doxytag: member="Gtk::MenuShell::~MenuShell" ref="b7117e65877843c10ad7d5b705a770e7" args="()" -->
116
<hr/><h2>Constructor & Destructor Documentation</h2>
117
<a class="anchor" id="ab7117e65877843c10ad7d5b705a770e7"></a><!-- doxytag: member="Gtk::MenuShell::~MenuShell" ref="ab7117e65877843c10ad7d5b705a770e7" args="()" -->
144
118
<div class="memitem">
145
119
<div class="memproto">
146
120
<table class="memname">
148
122
<td class="memname">virtual Gtk::MenuShell::~MenuShell </td>
150
<td class="paramname"> </td>
124
<td class="paramname"></td>
151
125
<td> ) </td>
152
126
<td><code> [virtual]</code></td>
644
588
<div class="memdoc">
647
If <em>take_focus</em> is <code>true</code> (the default) the menu shell will take the keyboard focus so that it will receive all keyboard events which is needed to enable keyboard navigation in menus. <p>
648
Setting <em>take_focus</em> to <code>false</code> is useful only for special applications like virtual keyboard implementations which should not take keyboard focus.<p>
649
The <em>take_focus</em> state of a menu or menu bar is automatically propagated to submenus whenever a submenu is popped up, so you don't have to worry about recursively setting it for your entire menu hierarchy. Only when programmatically picking a submenu and popping it up manually, the <em>take_focus</em> property of the submenu needs to be set explicitely.<p>
650
Note that setting it to <code>false</code> has side-effects:<p>
651
If the focus is in some other app, it keeps the focus and keynav in the menu doesn't work. Consequently, keynav on the menu will only work if the focus is on some toplevel owned by the onscreen keyboard.<p>
652
To avoid confusing the user, menus with <em>take_focus</em> set to <code>false</code> should not display mnemonics or accelerators, since it cannot be guaranteed that they will work.<p>
653
See also gdk_keyboard_grab()<p>
654
<dl compact><dt><b><a class="el" href="since_2_8.html#_since_2_8000033">Since gtkmm 2.8:</a></b></dt><dd></dd></dl>
655
<dl compact><dt><b>Parameters:</b></dt><dd>
590
<p>If <em>take_focus</em> is <code>true</code> (the default) the menu shell will take the keyboard focus so that it will receive all keyboard events which is needed to enable keyboard navigation in menus. </p>
591
<p>Setting <em>take_focus</em> to <code>false</code> is useful only for special applications like virtual keyboard implementations which should not take keyboard focus.</p>
592
<p>The <em>take_focus</em> state of a menu or menu bar is automatically propagated to submenus whenever a submenu is popped up, so you don't have to worry about recursively setting it for your entire menu hierarchy. Only when programmatically picking a submenu and popping it up manually, the <em>take_focus</em> property of the submenu needs to be set explicitely.</p>
593
<p>Note that setting it to <code>false</code> has side-effects:</p>
594
<p>If the focus is in some other app, it keeps the focus and keynav in the menu doesn't work. Consequently, keynav on the menu will only work if the focus is on some toplevel owned by the onscreen keyboard.</p>
595
<p>To avoid confusing the user, menus with <em>take_focus</em> set to <code>false</code> should not display mnemonics or accelerators, since it cannot be guaranteed that they will work.</p>
596
<p>See also gdk_keyboard_grab()</p>
597
<dl class="since_2_8"><dt><b><a class="el" href="since_2_8.html#_since_2_8000033">Since gtkmm 2.8:</a></b></dt><dd></dd></dl>
598
<dl><dt><b>Parameters:</b></dt><dd>
656
599
<table border="0" cellspacing="2" cellpadding="0">
657
600
<tr><td valign="top"></td><td valign="top"><em>take_focus</em> </td><td><code>true</code> if the menu shell should take the keyboard focus on popup. </td></tr>
663
<a class="anchor" name="14c8a5dcb0d5afa8b1ab93ae149cf603"></a><!-- doxytag: member="Gtk::MenuShell::signal_deactivate" ref="14c8a5dcb0d5afa8b1ab93ae149cf603" args="()" -->
607
<a class="anchor" id="a14c8a5dcb0d5afa8b1ab93ae149cf603"></a><!-- doxytag: member="Gtk::MenuShell::signal_deactivate" ref="a14c8a5dcb0d5afa8b1ab93ae149cf603" args="()" -->
664
608
<div class="memitem">
665
609
<div class="memproto">
666
610
<table class="memname">
668
612
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > Gtk::MenuShell::signal_deactivate </td>
670
<td class="paramname"> </td>
614
<td class="paramname"></td>
671
615
<td> ) </td>
676
620
<div class="memdoc">
679
<dl class="user" compact><dt><b>Prototype:</b></dt><dd><code>void on_my_deactivate()</code> </dd></dl>
683
<a class="anchor" name="29358f68b2c16afdab5147f7021368e8"></a><!-- doxytag: member="Gtk::MenuShell::signal_move_selected" ref="29358f68b2c16afdab5147f7021368e8" args="()" -->
621
<dl class="user"><dt><b>Prototype:</b></dt><dd><code>void on_my_deactivate()</code> </dd></dl>
625
<a class="anchor" id="a29358f68b2c16afdab5147f7021368e8"></a><!-- doxytag: member="Gtk::MenuShell::signal_move_selected" ref="a29358f68b2c16afdab5147f7021368e8" args="()" -->
684
626
<div class="memitem">
685
627
<div class="memproto">
686
628
<table class="memname">
688
630
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy1.html">Glib::SignalProxy1</a>< gboolean,int > Gtk::MenuShell::signal_move_selected </td>
690
<td class="paramname"> </td>
632
<td class="paramname"></td>
691
633
<td> ) </td>
696
638
<div class="memdoc">
699
<dl class="user" compact><dt><b>Prototype:</b></dt><dd><code>gboolean on_my_move_selected(int distance)</code> </dd></dl>
703
<a class="anchor" name="fe3aa91d39c133487f5ee87afdf3e255"></a><!-- doxytag: member="Gtk::MenuShell::signal_selection_done" ref="fe3aa91d39c133487f5ee87afdf3e255" args="()" -->
639
<dl class="user"><dt><b>Prototype:</b></dt><dd><code>gboolean on_my_move_selected(int distance)</code> </dd></dl>
643
<a class="anchor" id="afe3aa91d39c133487f5ee87afdf3e255"></a><!-- doxytag: member="Gtk::MenuShell::signal_selection_done" ref="afe3aa91d39c133487f5ee87afdf3e255" args="()" -->
704
644
<div class="memitem">
705
645
<div class="memproto">
706
646
<table class="memname">
708
648
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a>< void > Gtk::MenuShell::signal_selection_done </td>
710
<td class="paramname"> </td>
650
<td class="paramname"></td>
711
651
<td> ) </td>
716
656
<div class="memdoc">
719
<dl class="user" compact><dt><b>Prototype:</b></dt><dd><code>void on_my_selection_done()</code> </dd></dl>
723
<hr><h2>Friends And Related Function Documentation</h2>
724
<a class="anchor" name="5a3342e817b330a6b353d25c37ea2359"></a><!-- doxytag: member="Gtk::MenuShell::wrap" ref="5a3342e817b330a6b353d25c37ea2359" args="(GtkMenuShell *object, bool take_copy=false)" -->
657
<dl class="user"><dt><b>Prototype:</b></dt><dd><code>void on_my_selection_done()</code> </dd></dl>
661
<hr/><h2>Friends And Related Function Documentation</h2>
662
<a class="anchor" id="a5a3342e817b330a6b353d25c37ea2359"></a><!-- doxytag: member="Gtk::MenuShell::wrap" ref="a5a3342e817b330a6b353d25c37ea2359" args="(GtkMenuShell *object, bool take_copy=false)" -->
725
663
<div class="memitem">
726
664
<div class="memproto">
727
665
<table class="memname">