1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkMenuItem
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-10-11 18:08:35 +00:00
|
|
|
The widget used for item in menus
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
The #GtkMenuItem widget and the derived widgets are the only valid
|
|
|
|
childs for menus. Their function is to correctly handle highlighting,
|
|
|
|
alignment, events and submenus.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
As it derives from #GtkBin it can hold any valid child widget, altough
|
|
|
|
only a few are really useful.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
2008-11-06 17:34:30 +00:00
|
|
|
<refsect2 id="GtkMenuItem-BUILDER-UI">
|
|
|
|
<title>GtkMenuItem as GtkBuildable</title>
|
|
|
|
<para>
|
|
|
|
The GtkMenuItem implementation of the GtkBuildable interface
|
|
|
|
supports adding a submenu by specifying "submenu" as the "type"
|
|
|
|
attribute of a <child> element.
|
|
|
|
</para>
|
|
|
|
<example>
|
|
|
|
<title>A UI definition fragment with submenus</title>
|
|
|
|
<programlisting><![CDATA[
|
|
|
|
<object class="GtkMenuItem">
|
|
|
|
<child type="submenu">
|
|
|
|
<object class="GtkMenu"/>
|
|
|
|
</child>
|
|
|
|
</object>
|
|
|
|
]]></programlisting>
|
|
|
|
</example>
|
|
|
|
</refsect2>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>#GtkBin</term>
|
|
|
|
<listitem><para>for how to handle the child.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term>#GtkItem</term>
|
|
|
|
<listitem><para>is the abstract class for all sorts of items.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2000-02-29 18:43:54 +00:00
|
|
|
<term>#GtkMenuShell</term>
|
2000-02-28 21:39:41 +00:00
|
|
|
<listitem><para>is always the parent of #GtkMenuItem.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### STRUCT GtkMenuItem ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### SIGNAL GtkMenuItem::activate ##### -->
|
|
|
|
<para>
|
|
|
|
Emitted when the item is activated.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menuitem: the object which received the signal.
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkMenuItem::activate-item ##### -->
|
|
|
|
<para>
|
|
|
|
Emitted when the item is activated, but also if the menu item has a
|
|
|
|
submenu. For normal applications, the relevant signal is "activate".
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menuitem: the object which received the signal.
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkMenuItem::toggle-size-allocate ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menuitem: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkMenuItem::toggle-size-request ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menuitem: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
|
2008-07-05 20:30:16 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:accel-path ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2009-01-01 22:24:56 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:label ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2008-07-05 20:30:16 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:right-justified ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2007-06-16 02:02:37 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:submenu ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2009-01-01 22:24:56 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:use-underline ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2008-02-15 23:42:42 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:arrow-scaling ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:arrow-spacing ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkMenuItem:horizontal-padding ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkMenuItem:selected-shadow-type ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkMenuItem:toggle-spacing ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2008-07-05 20:30:16 +00:00
|
|
|
<!-- ##### ARG GtkMenuItem:width-chars ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_new ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
Creates a new #GtkMenuItem.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
@void:
|
2000-02-28 21:39:41 +00:00
|
|
|
@Returns: the newly created #GtkMenuItem
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_new_with_label ##### -->
|
|
|
|
<para>
|
2001-05-11 17:13:44 +00:00
|
|
|
Creates a new #GtkMenuItem whose child is a #GtkLabel.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-28 21:39:41 +00:00
|
|
|
@label: the text for the label
|
|
|
|
@Returns: the newly created #GtkMenuItem
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2001-09-08 06:24:46 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_new_with_mnemonic ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@label:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_set_right_justified ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
|
|
|
@right_justified:
|
|
|
|
|
|
|
|
|
2008-07-22 00:39:10 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_get_right_justified ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2009-01-01 22:24:56 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_get_label ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_set_label ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
|
|
|
@label:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_get_use_underline ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_set_use_underline ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
|
|
|
@setting:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_set_submenu ##### -->
|
|
|
|
<para>
|
2007-06-13 15:21:10 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2007-06-16 02:02:37 +00:00
|
|
|
@menu_item:
|
|
|
|
@submenu:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2008-07-22 00:39:10 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_get_submenu ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2009-01-01 22:24:56 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_set_accel_path ##### -->
|
2008-07-22 00:39:10 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@menu_item:
|
2009-01-01 22:24:56 +00:00
|
|
|
@accel_path:
|
2008-07-22 00:39:10 +00:00
|
|
|
|
|
|
|
|
2009-01-01 22:24:56 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_get_accel_path ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2007-06-13 15:21:10 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2007-06-16 02:02:37 +00:00
|
|
|
@menu_item:
|
2009-01-01 22:24:56 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_select ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
Emits the "select" signal on the given item. Behaves exactly like
|
|
|
|
#gtk_item_select.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-28 21:39:41 +00:00
|
|
|
@menu_item: the menu item
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_deselect ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
Emits the "deselect" signal on the given item. Behaves exactly like
|
|
|
|
#gtk_item_deselect.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-28 21:39:41 +00:00
|
|
|
@menu_item: the menu item
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_activate ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
Emits the "activate" signal on the given item
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-28 21:39:41 +00:00
|
|
|
@menu_item: the menu item
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-11-14 16:36:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_menu_item_toggle_size_request ##### -->
|
|
|
|
<para>
|
2001-10-28 21:15:36 +00:00
|
|
|
Emits the "toggle_size_request" signal on the given item.
|
2000-11-14 16:36:20 +00:00
|
|
|
</para>
|
|
|
|
|
2001-10-29 20:43:01 +00:00
|
|
|
@menu_item: the menu item
|
2001-10-28 21:15:36 +00:00
|
|
|
@requisition: the requisition to use as signal data.
|
2000-11-14 16:36:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_menu_item_toggle_size_allocate ##### -->
|
|
|
|
<para>
|
2001-10-28 21:15:36 +00:00
|
|
|
Emits the "toggle_size_allocate" signal on the given item.
|
2000-11-14 16:36:20 +00:00
|
|
|
</para>
|
|
|
|
|
2001-10-29 20:43:01 +00:00
|
|
|
@menu_item: the menu item.
|
2001-10-28 21:15:36 +00:00
|
|
|
@allocation: the allocation to use as signal data.
|
2000-11-14 16:36:20 +00:00
|
|
|
|
|
|
|
|