<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkmenushell">
  <refnamediv>
    <refname>gtk.MenuShell</refname>
    <refpurpose>a base class for menu objects.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.MenuShell</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkcontainer">gtk.Container</link></classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--append">append</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--prepend">prepend</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--insert">insert</link></methodname>
	<methodparam><parameter
		       role="keyword">child</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">position</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--deactivate">deactivate</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--select-item">select_item</link></methodname>
	<methodparam><parameter
		       role="keyword">menu_item</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--deselect">deselect</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--activate-item">activate_item</link></methodname>
	<methodparam><parameter
		       role="keyword">menu_item</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">force_deactivate</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--select-first">select_first</link></methodname>
	<methodparam><parameter
		       role="keyword">search_sensitive</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--cancel">cancel</link></methodname>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--set-take-focus">set_take_focus</link></methodname>
	<methodparam><parameter
		       role="keyword">take_focus</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenushell--get-take-focus">get_take_focus</link></methodname>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkwidget">gtk.Widget</link>
      +-- <link linkend="class-gtkcontainer">gtk.Container</link>
        +-- <link linkend="class-gtkmenushell">gtk.MenuShell</link>
</synopsis>

  </refsect1>
  
  <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkmenushell"><classname>gtk.MenuShell</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
		</para>
	</refsect1>

  <refsect1 id="properties-gtkmenushell">
    <title>gtk.MenuShell Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"take-focus"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal> the menu and its submenus grab
the keyboard focus on popup. Default value: <literal>True</literal>.
Available in GTK+ 2.8 and above.</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="style-properties-gtkmenushell">
    <title>gtk.MenuShell Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkmenushell">
    <title>gtk.MenuShell Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenushell--activate-current">activate-current</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menushell</parameter>
            </methodparam>
            <methodparam><parameter>force_hide</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenushell--cancel">cancel</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menushell</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenushell--cycle-focus">cycle-focus</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menushell</parameter>
            </methodparam>
            <methodparam><parameter>direction</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenushell--deactivate">deactivate</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menushell</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenushell--move-current">move-current</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menushell</parameter>
            </methodparam>
            <methodparam><parameter>direction</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenushell--move-selected">move-selected</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menushell</parameter>
            </methodparam>
            <methodparam><parameter>distance</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenushell--selection-done">selection-done</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menushell</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-gtkmenushell"><classname>gtk.MenuShell</classname></link> is
the abstract base class used to derive the <link
linkend="class-gtkmenu"><classname>gtk.Menu</classname></link> and <link
linkend="class-gtkmenubar"><classname>gtk.MenuBar</classname></link>
subclasses. A <link
linkend="class-gtkmenushell"><classname>gtk.MenuShell</classname></link> is
a container of <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
objects arranged in a list which can be navigated, selected, and activated
by the user to perform application functions. A <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> can
have a submenu associated with it, allowing for nested hierarchical
menus.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

  <refsect2 id="method-gtkmenushell--append">
      <title>gtk.MenuShell.append</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>append</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
add.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>append</methodname>() method adds a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
specified by <parameter>child</parameter> to the end of the menu shell's
item list.</para>

  </refsect2>

  <refsect2 id="method-gtkmenushell--prepend">
      <title>gtk.MenuShell.prepend</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>prepend</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
add.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>prepend</methodname>() method adds a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
specified by <parameter>child</parameter> to the beginning of the menu
shell's item list.</para>

  </refsect2>

  <refsect2 id="method-gtkmenushell--insert">
      <title>gtk.MenuShell.insert</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert</methodname>
	  <methodparam><parameter
			 role="keyword">child</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">position</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">child</parameter>&nbsp;:</term>
	  <listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
add.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">position</parameter>&nbsp;:</term>
	  <listitem><simpara>The position in the item list where child
should be added. Positions are numbered starting from
0.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert</methodname>() method adds a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
specified by <parameter>child</parameter> to the menu shell's item list at
the position specified by <parameter>position</parameter>. </para>

  </refsect2>

  <refsect2 id="method-gtkmenushell--deactivate">
      <title>gtk.MenuShell.deactivate</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>deactivate</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>

      <para>The <methodname>deactivate</methodname>() method deactivates the
menu shell. Typically this results in the menu shell being removed from the
screen.</para>

  </refsect2>

  <refsect2 id="method-gtkmenushell--select-item">
      <title>gtk.MenuShell.select_item</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>select_item</methodname>
	  <methodparam><parameter
			 role="keyword">menu_item</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">menu_item</parameter>&nbsp;:</term>
	  <listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
select.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>select_item</methodname>() method selects the
menu item specified by <parameter>menu_item</parameter> from the menu
shell.</para>

  </refsect2>

  <refsect2 id="method-gtkmenushell--deselect">
      <title>gtk.MenuShell.deselect</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>deselect</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>

      <para>The <methodname>deselect</methodname>() method deselects the
currently selected item from the menu shell, if any.</para>

  </refsect2>

  <refsect2 id="method-gtkmenushell--activate-item">
      <title>gtk.MenuShell.activate_item</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>activate_item</methodname>
	  <methodparam><parameter
			 role="keyword">menu_item</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">force_deactivate</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">menu_item</parameter>&nbsp;:</term>
	  <listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
activate.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">force_deactivate</parameter>&nbsp;:</term>
	  <listitem><simpara>If <literal>True</literal>, force the
deactivation of the menu shell after the menu item is
activated.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>activate_item</methodname>() method activates
the menu item specified by<parameter> menu_item</parameter>. If
<parameter>force_deactivate</parameter> is <literal>True</literal> the
menushell is forcibly deactivated after<parameter> menu_item</parameter> is
activated.</para>

  </refsect2>

    <refsect2 id="method-gtkmenushell--select-first">
      <title>gtk.MenuShell.select_first</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>select_first</methodname>
	  <methodparam><parameter role="keyword">search_sensitive</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">search_sensitive</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal>, search for the
	  first selectable menu item, otherwise select nothing if the first
	  item isn't sensitive.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.2 and above.</para>
      </note>

      <para>The <methodname>select_first</methodname>() method selects the
first visible or selectable child of the menu shell if
<parameter>search_sensitive</parameter> is <literal>True</literal>. Don't
select tearoff items unless the only item is a tearoff item. If
<parameter>search_sensitive</parameter> is <literal>False</literal> select
nothing if the first item isn't sensitive.
<parameter>search_sensitive</parameter> should be <literal>False</literal>
if the menu is being popped up initially.</para>

    </refsect2>

    <refsect2 id="method-gtkmenushell--cancel">
      <title>gtk.MenuShell.cancel</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>cancel</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>

      <note>
	<para>This method is available in PyGTK 2.4 and above.</para>
      </note>

      <para>The <methodname>cancel</methodname>() method cancels the
selection within the menu shell.</para>

    </refsect2>

    <refsect2 id="method-gtkmenushell--set-take-focus">
      <title>gtk.MenuShell.set_take_focus</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_take_focus</methodname>
	  <methodparam><parameter role="keyword">take_focus</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">take_focus</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal>, the menu shell should
take the keyboard focus on popup.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.8 and above.</para>
      </note>

      <para>The <methodname>set_take_focus</methodname>() method sets the
"take-focus" property to the value of <parameter>take_focus</parameter>. If
<parameter>take_focus</parameter> is <literal>True</literal> the menu shell
will take the keyboard focus so that it will receive all keyboard events to
enable keyboard navigation in menus.</para>

      <para>Setting the "take-focus" property to <literal>False</literal> is
useful only for special applications like virtual keyboard implementations
which should not take keyboard focus.</para>

      <para>The "take-focus" 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, should the
"take-focus" property of the submenu be set explicitly.</para>

      <para>Note that setting it to False has side-effects:</para>

      <itemizedlist>
        <listitem>
          <para>If the focus is in some other app, it keeps the focus and
keyboard navigation in the menu doesn't work. Consequently, keyboard
navigation on the menu will only work if the focus is on some toplevel owned
by the onscreen keyboard.</para>
        </listitem>

        <listitem>
          <para>To avoid confusing the user, menus with the "take-focus"
property set to <literal>False</literal> should not display mnemonics or
accelerators, since they may not work.</para>
        </listitem>
      </itemizedlist>

      <para>Also see the <link
linkend="function-gdk--keyboard-grab"><function>gtk.gdk.keyboard_grab</function>()</link>
function for more information.</para>

    </refsect2>

    <refsect2 id="method-gtkmenushell--get-take-focus">
      <title>gtk.MenuShell.get_take_focus</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_take_focus</methodname>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the men shell will
take keyboard foucs on popup.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.8 and above.</para>
      </note>

      <para>The <methodname>get_take_focus</methodname>() method returns the
value of the "take-focus" property. See the <link
linkend="method-gtkmenushell--set-take-focus"><methodname>set_take_focus</methodname>()</link>
method for more information.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkmenushell--activate-current">
      <title>The "activate-current" gtk.MenuShell Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>menushell</parameter></methodparam>
	  <methodparam><parameter>force_hide</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>menushell</parameter>&nbsp;:</term>
	  <listitem><simpara>the menushell that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>force_hide</parameter>&nbsp;:</term>
	  <listitem><simpara>if True, hide the menu after activating the
menu item.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "activate-current" signal is emitted to activate the current
menu item in the menushell.</para>

    </refsect2>

    <refsect2 id="signal-gtkmenushell--cancel">
      <title>The "cancel" gtk.MenuShell Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>menushell</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>menushell</parameter>&nbsp;:</term>
	  <listitem><simpara>the menushell that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "cancel" signal is emitted to cancel the selection in the
menushell. Also causes the "<link
linkend="signal-gtkmenushell--selection-done">selection-done</link>" signal
to be emitted. </para>

    </refsect2>

    <refsect2 id="signal-gtkmenushell--cycle-focus">
      <title>The "cycle-focus" gtk.MenuShell Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>menushell</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>menushell</parameter>&nbsp;:</term>
	  <listitem><simpara>the menushell that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>direction</parameter>&nbsp;:</term>
	  <listitem><simpara>the direction to cycle the focus; one of:
<literal>gtk.DIR_TAB_FORWARD</literal>,
<literal>gtk.DIR_TAB_BACKWARD</literal>, <literal>gtk.DIR_UP</literal>,
<literal>gtk.DIR_DOWN</literal>, <literal>gtk.DIR_LEFT</literal> or
<literal>gtk.DIR_RIGHT</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "cycle-focus" signal is emitted when an action occurs requesting the focus move to the next menubar.</para>

    </refsect2>

    <refsect2 id="signal-gtkmenushell--deactivate">
      <title>The "deactivate" gtk.MenuShell Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>menushell</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>menushell</parameter>&nbsp;:</term>
	  <listitem><simpara>the menushell that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "deactivate" signal is emitted when the menushell is
deactivated.</para>

    </refsect2>

    <refsect2 id="signal-gtkmenushell--move-current">
      <title>The "move-current" gtk.MenuShell Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>menushell</parameter></methodparam>
	  <methodparam><parameter>direction</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>menushell</parameter>&nbsp;:</term>
	  <listitem><simpara>the menushell that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>direction</parameter>&nbsp;:</term>
	  <listitem><simpara>the direction to move; one of:
<literal>gtk.MENU_DIR_PARENT</literal>,
<literal>gtk.MENU_DIR_CHILD</literal>, <literal>gtk.MENU_DIR_NEXT</literal>
or <literal>gtk.MENU_DIR_PREV</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "move-current" signal is emitted when the current menu item
is to be moved in the direction specified by
<parameter>direction</parameter> which is one of:</para>

      <variablelist>
	<varlistentry>
	  <term><literal>gtk.MENU_DIR_PARENT</literal></term>
	  <listitem>
	    <simpara>To the parent menu shell.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.MENU_DIR_CHILD</literal></term>
	  <listitem>
	    <simpara>To the submenu, if any, associated with the
item.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.MENU_DIR_NEXT</literal></term>
	  <listitem>
	    <simpara>To the next menu item.</simpara>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term><literal>gtk.MENU_DIR_PREV</literal></term>
	  <listitem>
	    <simpara>To the previous menu item.</simpara>
	  </listitem>
	</varlistentry>
      </variablelist>

    </refsect2>
    
    <refsect2 id="signal-gtkmenushell--move-selected">
      <title>The "move-selected" gtk.MenuShell Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>menushell</parameter></methodparam>
	  <methodparam><parameter>distance</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>menushell</parameter>&nbsp;:</term>
	  <listitem><simpara>the menushell that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>distance</parameter>&nbsp;:</term>
	  <listitem><simpara>+1 to move to the next item,
      -1 to move to the previous</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This signal is available in GTK+ 2.12 and above.</para>
      </note>

      <para>The "move-selected" signal is emitted to move the selection to another item.</para>

    </refsect2>

    <refsect2 id="signal-gtkmenushell--selection-done">
      <title>The "selection-done" gtk.MenuShell Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>menushell</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>menushell</parameter>&nbsp;:</term>
	  <listitem><simpara>the menushell that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "selection-done" signal is emitted when a selection has been
completed within a menu shell.</para>

    </refsect2>

  </refsect1>

</refentry>
