1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.MenuShell</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="previous" href="class-gtkmenuitem.html" title="gtk.MenuItem"><link rel="next" href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.MenuShell</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkmenuitem.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkmenutoolbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkmenushell"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.MenuShell</h2><p>gtk.MenuShell — a base class for menu objects.</p></div><div class="refsect1" lang="en"><a name="id3465671"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.MenuShell</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--append" title="gtk.MenuShell.append">append</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--prepend" title="gtk.MenuShell.prepend">prepend</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--insert" title="gtk.MenuShell.insert">insert</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--deactivate" title="gtk.MenuShell.deactivate">deactivate</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--select-item" title="gtk.MenuShell.select_item">select_item</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>menu_item</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--deselect" title="gtk.MenuShell.deselect">deselect</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--activate-item" title="gtk.MenuShell.activate_item">activate_item</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>menu_item</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>force_deactivate</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--select-first" title="gtk.MenuShell.select_first">select_first</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>search_sensitive</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkmenushell.html#method-gtkmenushell--cancel" title="gtk.MenuShell.cancel">cancel</a></span>()</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3465881"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
+-- <a href="class-gtkmenushell.html" title="gtk.MenuShell">gtk.MenuShell</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3465923"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkmenushell.html#signal-gtkmenushell--activate-current" title='The "activate-current" gtk.MenuShell Signal'>activate-current</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>force_hide</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkmenushell.html#signal-gtkmenushell--cancel" title='The "cancel" gtk.MenuShell Signal'>cancel</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkmenushell.html#signal-gtkmenushell--cycle-focus" title='The "cycle-focus" gtk.MenuShell Signal'>cycle-focus</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>direction</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkmenushell.html#signal-gtkmenushell--deactivate" title='The "deactivate" gtk.MenuShell Signal'>deactivate</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkmenushell.html#signal-gtkmenushell--move-current" title='The "move-current" gtk.MenuShell Signal'>move-current</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>direction</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkmenushell.html#signal-gtkmenushell--selection-done" title='The "selection-done" gtk.MenuShell Signal'>selection-done</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3466225"></a><h2>Description</h2><p>A <a href="class-gtkmenushell.html" title="gtk.MenuShell"><tt class="classname">gtk.MenuShell</tt></a> is
the abstract base class used to derive the <a href="class-gtkmenu.html" title="gtk.Menu"><tt class="classname">gtk.Menu</tt></a> and <a href="class-gtkmenubar.html" title="gtk.MenuBar"><tt class="classname">gtk.MenuBar</tt></a>
subclasses. A <a href="class-gtkmenushell.html" title="gtk.MenuShell"><tt class="classname">gtk.MenuShell</tt></a> is
a container of <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a>
objects arranged in a list which can be navigated, selected, and activated
by the user to perform application functions. A <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a> can
have a submenu associated with it, allowing for nested hierarchical
menus.</p></div><div class="refsect1" lang="en"><a name="id3466284"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkmenushell--append"></a><h3>gtk.MenuShell.append</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>The <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a> to
add.</td></tr></tbody></table><p>The <tt class="methodname">append</tt>() method adds a new <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a>
specified by <i class="parameter"><tt>child</tt></i> to the end of the menu shell's
item list.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--prepend"></a><h3>gtk.MenuShell.prepend</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">prepend</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>The <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a> to
add.</td></tr></tbody></table><p>The <tt class="methodname">prepend</tt>() method adds a new <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a>
specified by <i class="parameter"><tt>child</tt></i> to the beginning of the menu
shell's item list.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--insert"></a><h3>gtk.MenuShell.insert</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">insert</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>The <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a> to
add.</td></tr><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>The position in the item list where child
should be added. Positions are numbered starting from
0.</td></tr></tbody></table><p>The <tt class="methodname">insert</tt>() method adds a new <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a>
specified by <i class="parameter"><tt>child</tt></i> to the menu shell's item list at
the position specified by <i class="parameter"><tt>position</tt></i>. </p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--deactivate"></a><h3>gtk.MenuShell.deactivate</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">deactivate</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">deactivate</tt>() method deactivates the
menu shell. Typically this results in the menu shell being removed from the
screen.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--select-item"></a><h3>gtk.MenuShell.select_item</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">select_item</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>menu_item</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>menu_item</tt></b>:</span></td><td>The <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a> to
select.</td></tr></tbody></table><p>The <tt class="methodname">select_item</tt>() method selects the
menu item specified by <i class="parameter"><tt>menu_item</tt></i> from the menu
shell.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--deselect"></a><h3>gtk.MenuShell.deselect</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">deselect</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">deselect</tt>() method deselects the
currently selected item from the menu shell, if any.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--activate-item"></a><h3>gtk.MenuShell.activate_item</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">activate_item</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>menu_item</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>force_deactivate</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>menu_item</tt></b>:</span></td><td>The <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a> to
activate.</td></tr><tr><td><span class="term"><b class="parameter"><tt>force_deactivate</tt></b>:</span></td><td>If <tt class="literal">TRUE</tt>, force the
deactivation of the menu shell after the menu item is
activated.</td></tr></tbody></table><p>The <tt class="methodname">activate_item</tt>() method activates
the menu item specified by<i class="parameter"><tt> menu_item</tt></i>. If
<i class="parameter"><tt>force_deactivate</tt></i> is <tt class="literal">TRUE</tt> the
menushell is forcibly deactivated after<i class="parameter"><tt> menu_item</tt></i> is
activated.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--select-first"></a><h3>gtk.MenuShell.select_first</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">select_first</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>search_sensitive</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>search_sensitive</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, search for the
first selectable menu item, otherwise select nothing if the first
item isn't sensitive.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <tt class="methodname">select_first</tt>() method selects the
first visible or selectable child of the menu shell if
<i class="parameter"><tt>search_sensitive</tt></i> is <tt class="literal">TRUE</tt>. Don't
select tearoff items unless the only item is a tearoff item. If
<i class="parameter"><tt>search_sensitive</tt></i> is <tt class="literal">FALSE</tt> select
nothing if the first item isn't sensitive.
<i class="parameter"><tt>search_sensitive</tt></i> should be <tt class="literal">FALSE</tt>
if the menu is being popped up initially.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenushell--cancel"></a><h3>gtk.MenuShell.cancel</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cancel</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <tt class="methodname">cancel</tt>() method cancels the
selection within the menu shell.</p></div></div><div class="refsect1" lang="en"><a name="id3466947"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkmenushell--activate-current"></a><h3>The "activate-current" gtk.MenuShell Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>force_hide</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>menushell</tt></i>:</span></td><td>the menushell that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>force_hide</tt></i>:</span></td><td>if TRUE, hide the menu after activating the
menu item.</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "activate-current" signal is emitted to activate the current
menu item in the menushell.</p></div><div class="refsect2" lang="en"><a name="signal-gtkmenushell--cancel"></a><h3>The "cancel" gtk.MenuShell Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>menushell</tt></i>:</span></td><td>the menushell that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "cancel" signal is emitted to cancel the selection in the
menushell. Also causes the "<a href="class-gtkmenushell.html#signal-gtkmenushell--selection-done" title='The "selection-done" gtk.MenuShell Signal'>selection-done</a>" signal
to be emitted. </p></div><div class="refsect2" lang="en"><a name="signal-gtkmenushell--cycle-focus"></a><h3>The "cycle-focus" gtk.MenuShell Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>menushell</tt></i>:</span></td><td>the menushell that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>direction</tt></i>:</span></td><td>the direction to cycle the focus; one of:
<tt class="literal">gtk.DIR_TAB_FORWARD</tt>,
<tt class="literal">gtk.DIR_TAB_BACKWARD</tt>, <tt class="literal">gtk.DIR_UP</tt>,
<tt class="literal">gtk.DIR_DOWN</tt>, <tt class="literal">gtk.DIR_LEFT</tt> or
<tt class="literal">gtk.DIR_RIGHT</tt></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "cycle-focus" signal is emitted when an action occurs requesting the focus move to the next menubar.</p></div><div class="refsect2" lang="en"><a name="signal-gtkmenushell--deactivate"></a><h3>The "deactivate" gtk.MenuShell Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>menushell</tt></i>:</span></td><td>the menushell that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "deactivate" signal is emitted when the menushell is
deactivated.</p></div><div class="refsect2" lang="en"><a name="signal-gtkmenushell--move-current"></a><h3>The "move-current" gtk.MenuShell Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>direction</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>menushell</tt></i>:</span></td><td>the menushell that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>direction</tt></i>:</span></td><td>the direction to move; one of:
<tt class="literal">gtk.MENU_DIR_PARENT</tt>,
<tt class="literal">gtk.MENU_DIR_CHILD</tt>, <tt class="literal">gtk.MENU_DIR_NEXT</tt>
or <tt class="literal">gtk.MENU_DIR_PREV</tt></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "move-current" signal is emitted when the current menu item
is to be moved in the direction specified by
<i class="parameter"><tt>direction</tt></i> which is one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.MENU_DIR_PARENT</tt></span></td><td>To the parent menu shell.</td></tr><tr><td><span class="term"><tt class="literal">gtk.MENU_DIR_CHILD</tt></span></td><td>To the submenu, if any, associated with the
item.</td></tr><tr><td><span class="term"><tt class="literal">gtk.MENU_DIR_NEXT</tt></span></td><td>To the next menu item.</td></tr><tr><td><span class="term"><tt class="literal">gtk.MENU_DIR_PREV</tt></span></td><td>To the previous menu item.</td></tr></tbody></table></div><div class="refsect2" lang="en"><a name="signal-gtkmenushell--selection-done"></a><h3>The "selection-done" gtk.MenuShell Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>menushell</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>menushell</tt></i>:</span></td><td>the menushell that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "selection-done" signal is emitted when a selection has been
completed within a menu shell.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkmenuitem.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gtkmenutoolbutton.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.MenuItem</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.MenuToolButton</td></tr></table></div></body></html>
|