<?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-gtkmenuitem">
  <refnamediv>
    <refname>gtk.MenuItem</refname>
    <refpurpose>the widget used for an item in menus</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.MenuItem</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkitem">gtk.Item</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkmenuitem">gtk.MenuItem</link></methodname>
	<methodparam><parameter
		       role="keyword">label</parameter><initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">use_underline</parameter>
	  <initializer>True</initializer></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--set-submenu">set_submenu</link></methodname>
	<methodparam><parameter
		       role="keyword">submenu</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--get-submenu">get_submenu</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--remove-submenu">remove_submenu</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--select">select</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--deselect">deselect</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--activate">activate</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--toggle-size-request">toggle_size_request</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--toggle-size-allocate">toggle_size_allocate</link></methodname>
	<methodparam><parameter
		       role="keyword">allocation</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--set-right-justified">set_right_justified</link></methodname>
	<methodparam><parameter
		       role="keyword">right_justified</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--get-right-justified">get_right_justified</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkmenuitem--set-accel-path">set_accel_path</link></methodname>
	<methodparam><parameter
		       role="keyword">accel_path</parameter></methodparam>
      </methodsynopsis>
      
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkmenuitem--get-accel-path">get_accel_path</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>

      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkmenuitem--set-label">set_label</link></methodname>
        <methodparam><parameter role="keyword">label</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkmenuitem--get-label">get_label</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkmenuitem--set-use-underline">set_use_underline</link></methodname>
        <methodparam><parameter role="keyword">setting</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkmenuitem--get-use-underline">get_use_underline</link></methodname>
        <methodparam></methodparam>
      </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-gtkbin">gtk.Bin</link>
          +-- <link linkend="class-gtkitem">gtk.Item</link>
            +-- <link linkend="class-gtkmenuitem">gtk.MenuItem</link>
</synopsis>
  </refsect1>

    <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
            <link linkend="class-atkimplementor"><classname>atk.ImplementorIFace</classname></link>
		</para>
	</refsect1>

  <refsect1 id="properties-gtkmenuitem">
    <title>gtk.MenuItem 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>"accel-path"</entry>
                        <entry>Read-Write</entry>
                        <entry>Sets the accelerator path of the menu item, through
			which runtime changes of the menu item's accelerator caused
			by the user can be identified and saved to persistant storage.
			Default value: <literal>None</literal>.
			Available in GTK+ 2.14.
			</entry>
                    </row>
                    <row valign="top">
                        <entry>"label"</entry>
                        <entry>Read-Write</entry>
                        <entry>The text for the child label.
			Available in GTK+ 2.16.
			</entry>
                    </row>
		    <row valign="top">
                        <entry>"right-justified"</entry>
                        <entry>Read-Write</entry>
                        <entry>Sets whether the menu item appears justified at the
			right side of a menu bar.
			Default value: <literal>False</literal>.
			Available in GTK+ 2.14.
			</entry>
                    </row>
		    <row valign="top">
                        <entry>"submenu"</entry>
                        <entry>Read-Write</entry>
                        <entry>The submenu attached to the menu item, or
                        <literal>None</literal> if it has none. This
                        property is available in GTK+ 2.12 and above.</entry>
                    </row>
		    <row valign="top">
                        <entry>"use-underline"</entry>
                        <entry>Read-Write</entry>
                        <entry><literal>True</literal> if underlines in the text
      indicate mnemonics.
      Available in GTK+ 2.16.
      </entry>
                    </row>
                </tbody>
            </tgroup>
        </informaltable>
    </blockquote>
  
  </refsect1>

  <refsect1 id="style-properties-gtkmenuitem">
    <title>gtk.MenuItem Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style 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>"arrow-scaling"</entry>
              <entry>Read</entry>
              <entry>Amount of space used up by arrow, relative to the menu item's font size.
              Allowed values: [0,2].
              Default value: 0.8</entry>
            </row>

            <row valign="top">
              <entry>"arrow-spacing"</entry>
              <entry>Read</entry>
              <entry>Space between label and arrow. Allowed values: >= 0.
              Default value: 10</entry>
            </row>

            <row valign="top">
              <entry>"horizontal-padding"</entry>
              <entry>Read</entry>
              <entry>Padding to left and right of the menu item. Allowed
              values: >= 0. Default value: 3</entry>
            </row>

            <row valign="top">
              <entry>"selected-shadow-type"</entry>
              <entry>Read</entry>
              <entry>The shadow type when the item is selected. Default
              value: <literal>gtk.SHADOW_NONE</literal></entry>
            </row>

            <row valign="top">
              <entry>"toggle-spacing"</entry>
              <entry>Read</entry>
              <entry>Space between icon and label. Allowed values: >= 0.
              Default value: 5</entry>
            </row>

            <row valign="top">
              <entry>"width-chars"</entry>
              <entry>Read</entry>
              <entry>The minimum desired width of the menu item in characters.
	      Allowed values: >= 0. Default value: 12.
	      Available in GTK+ 2.14.
	      </entry>
            </row>

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

  </refsect1>

  <refsect1 id="signal-prototypes-gtkmenuitem">
    <title>gtk.MenuItem 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>
    <para><link linkend="signal-prototypes-gtkitem">gtk.Item Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenuitem--activate">activate</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menuitem</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenuitem--activate-item">activate-item</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menuitem</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenuitem--toggle-size-allocate">toggle-size-allocate</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menuitem</parameter>
            </methodparam>
            <methodparam><parameter>allocation</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link
linkend="signal-gtkmenuitem--toggle-size-request">toggle-size-request</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>menuitem</parameter>
            </methodparam>
            <methodparam><parameter>requisition</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
widget implements the appearance and behavior of menu items. The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> and
its derived widget subclasses are the only valid children of menus.</para>

    <para>When menu items are selected and activated by a user they
can:</para>

    <itemizedlist>
      <listitem>
	<simpara>display a popup menu if they have an associated
submenu</simpara>
      </listitem>
      <listitem>
	<simpara>invoke an associated function or method</simpara>
      </listitem>
    </itemizedlist>

    <para>As a <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> is a
subclass of <link
linkend="class-gtkbin"><classname>gtk.Bin</classname></link> it can hold any
valid child widget.</para>

  </refsect1>

  <refsect1 id="constructor-gtkmenuitem">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.MenuItem</methodname>
	<methodparam><parameter
		       role="keyword">label</parameter><initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">use_underline</parameter>
	  <initializer>True</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">label</parameter>&nbsp;:</term>
	<listitem><simpara>a string to be used as the text of the menu item
or <literal>None</literal></simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter role="keyword">use_underline</parameter>&nbsp;:</term>
	<listitem><simpara>if <literal>True</literal>, an underscore in the
label text indicates the next character should be underlined and used for the
mnemonic accelerator key if it is the first character so
marked. Available in PyGTK 2.4 and above.</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
widget</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
widget and sets the text of the menu item label to the value of
<parameter>label</parameter>. If <parameter>label</parameter> is
<literal>None</literal> no label is created for the menu item. The text of
label is parsed for underscore characters that indicate that the next
character is a mnemonic accelerator.</para>

    <para>In PyGTK 2.4 and above the <parameter>use_underline</parameter>
parameter is available and defaults to <literal>True</literal>. If
<parameter>use_underline</parameter> is set to <literal>False</literal> the
label text will not be parsed for mnemonic characters.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkmenuitem--set-submenu">
      <title>gtk.MenuItem.set_submenu</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_submenu</methodname>
	  <methodparam><parameter
			 role="keyword">submenu</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">submenu</parameter>&nbsp;:</term>
	  <listitem><simpara>the menu to use as the
submenu</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_submenu</methodname>() method sets the menu
specified by <parameter>submenu</parameter> as the submenu for the menu
item.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--get-submenu">
      <title>gtk.MenuItem.get_submenu</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_submenu</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the submenu for this menu item, or
<literal>None</literal> if there is no submenu.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_submenu</methodname>() method returns the
submenu widget associated with this menu item. If there is no submenu this
method returns <literal>None</literal>. See <link
linkend="method-gtkmenuitem--set-submenu"><methodname>set_submenu</methodname>()</link>.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--remove-submenu">
      <title>gtk.MenuItem.remove_submenu</title>

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

      <para>The <methodname>remove_submenu</methodname>() method removes the
submenu associated with the menu item.</para>

    </refsect2>


    <refsect2 id="method-gtkmenuitem--select">
      <title>gtk.MenuItem.select</title>

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

      <para>The <methodname>select</methodname>() method emits the "select"
signal on the menu item.</para>

    </refsect2>


    <refsect2 id="method-gtkmenuitem--deselect">
      <title>gtk.MenuItem.deselect</title>

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

      <para>The <methodname>deselect</methodname>() method emits the
"deselect" signal on the menu item.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--activate">
      <title>gtk.MenuItem.activate</title>

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

      <para>The <methodname>activate</methodname>() method emits the
"activate" signal on the menu item.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--toggle-size-request">
      <title>gtk.MenuItem.toggle_size_request</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>toggle_size_request</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the size requisition</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>toggle_size_request</methodname>() method emits
the "toggle-size-request" signal on the menuitem and returns the size
requested for the menuitem.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--toggle-size-allocate">
      <title>gtk.MenuItem.toggle_size_allocate</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>toggle_size_allocate</methodname>
	  <methodparam><parameter
			 role="keyword">allocation</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">allocation</parameter>&nbsp;:</term>
	  <listitem><simpara>the allocation size for the menu
item</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>toggle_size_allocate</methodname>() method emits
the "toggle-size-allocate" signal on the menu item.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--set-right-justified">
      <title>gtk.MenuItem.set_right_justified</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_right_justified</methodname>
	  <methodparam><parameter
			 role="keyword">right_justified</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">right_justified</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the menu item will
appear at the far right if added to a menu bar.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_right_justified</methodname>() method sets
the justification of the menu item according to the value of
<parameter>right_justified</parameter>. If
<parameter>right_justified</parameter> is <literal>True</literal> the menu
item will appear at the right side of a menu bar. If the widget layout is
reversed for a right-to-left language like Hebrew or Arabic,
right-justified-menu-items appear on the left.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--get-right-justified">
      <title>gtk.MenuItem.get_right_justified</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_right_justified</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the menu item will
appear at the far right if added to a menu bar.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_right_justified</methodname>() method gets
the justification of the menu item. If <literal>True</literal> the menu item
appears justified at the right side of the menu bar.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--set-accel-path">
      <title>gtk.MenuItem.set_accel_path</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_accel_path</methodname>
	  <methodparam><parameter
			 role="keyword">accel_path</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">accel_path</parameter>&nbsp;:</term>
	  <listitem><simpara>the accelerator path, corresponding to this
menu item</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_accel_path</methodname>() method sets the
accelerator path on the menu item. The accelerator path provides access to
the menu item's accelerator allowing user changes to be identified and saved
to persistent storage. See also the <link
linkend="method-gtkmenu--set-accel-path"><methodname>gtk.Menu.set_accel_path</methodname>()</link> 
method for a more convenient variant of this function. This method is a
convenience wrapper that handles calling <link
linkend="method-gtkwidget--set-accel-path"><methodname>gtk.Widget.set_accel_path</methodname>()</link> 
with the appropriate accelerator group for the menu item.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--get-accel-path">
      <title>gtk.MenuItem.get_accel_path</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_accel_path</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the accelerator path corresponding to this menu
	  item's functionality, or <literal>None</literal> if not set </simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>
	The <methodname>get_accel_path</methodname>() method gets the accelerator
	path that was previously set on menu_item.
      </para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--set-label">
      <title>gtk.MenuItem.set_label</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_label</methodname>
        <methodparam><parameter role="keyword">label</parameter></methodparam>
      </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">label</parameter>&nbsp;:</term>
          <listitem><simpara>the text you want to set.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>The <methodname>set_label</methodname>() method sets the text
      specified by <parameter>label</parameter> on the menu_item label .</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--get-label">
      <title>gtk.MenuItem.get_label</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_label</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>The text in the menu_item label.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>The <methodname>get_label</methodname>() method gets the text in the menu_item label.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--set-use-underline">
      <title>gtk.MenuItem.set_use_underline</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_use_underline</methodname>
        <methodparam><parameter role="keyword">setting</parameter></methodparam>
      </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">setting</parameter>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if underlines in the text indicate mnemonics.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>The <methodname>set_use_underline</methodname>() method gets whether an underline in the text
      indicates the next character should be used for the mnemonic accelerator key.</para>

    </refsect2>

    <refsect2 id="method-gtkmenuitem--get-use-underline">
      <title>gtk.MenuItem.get_use_underline</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_use_underline</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if an embedded underline in the label indicates the mnemonic accelerator key.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>The <methodname>get_use_underline</methodname>() method checks if an underline in the text indicates
      the next character should be used for the mnemonic accelerator key.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkmenuitem--activate">
      <title>The "activate" gtk.MenuItem Signal</title>

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

      <variablelist>
	<varlistentry>
	  <term><parameter>menuitem</parameter>&nbsp;:</term>
	  <listitem><simpara>the menuitem 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 "activate" signal is emitted when the menu item is
activated.</para>

    </refsect2>

    <refsect2 id="signal-gtkmenuitem--activate-item">
      <title>The "activate-item" gtk.MenuItem Signal</title>

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

      <variablelist>
	<varlistentry>
	  <term><parameter>menuitem</parameter>&nbsp;:</term>
	  <listitem><simpara>the menuitem 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 "activate-item" signal is emitted when the menu item is
activated, but also if the menu item has a submenu. For normal applications,
the relevant signal is "activate".</para>

    </refsect2>

    <refsect2 id="signal-gtkmenuitem--toggle-size-allocate">
      <title>The "toggle-size-allocate" gtk.MenuItem Signal</title>

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

      <variablelist>
	<varlistentry>
	  <term><parameter>menuitem</parameter>&nbsp;:</term>
	  <listitem><simpara>the menuitem that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>allocation</parameter>&nbsp;:</term>
	  <listitem><simpara>the size allocation for the
menuitem</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 "toggle-size-allocate" signal is emitted when the size
allocation is changed.</para>

    </refsect2>

    <refsect2 id="signal-gtkmenuitem--toggle-size-request">
      <title>The "toggle-size-request" gtk.MenuItem Signal</title>

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

      <variablelist>
	<varlistentry>
	  <term><parameter>menuitem</parameter>&nbsp;:</term>
	  <listitem><simpara>the menuitem that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>requisition</parameter>&nbsp;:</term>
	  <listitem><simpara>the pointer to the location to put the size
request</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 "toggle-size-request" signal is emitted when a new size
request is needed.</para>

    </refsect2>

  </refsect1>

</refentry>
