1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 the widget used for item in menus
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkMenuItem widget and the derived widgets are the only valid
10 childs for menus. Their function is to correctly handle highlighting,
11 alignment, events and submenus.
14 As it derives from #GtkBin it can hold any valid child widget, altough
15 only a few are really useful.
18 <!-- ##### SECTION See_Also ##### -->
23 <listitem><para>for how to handle the child.</para></listitem>
27 <listitem><para>is the abstract class for all sorts of items.</para></listitem>
30 <term>#GtkMenuShell</term>
31 <listitem><para>is always the parent of #GtkMenuItem.</para></listitem>
36 <!-- ##### STRUCT GtkMenuItem ##### -->
42 <!-- ##### FUNCTION gtk_menu_item_new ##### -->
44 Creates a new #GtkMenuItem.
47 @Returns: the newly created #GtkMenuItem
50 <!-- ##### FUNCTION gtk_menu_item_new_with_label ##### -->
52 Creates a new #GtkMenuItem whose child is a simple #GtlLabel.
55 @label: the text for the label
56 @Returns: the newly created #GtkMenuItem
59 <!-- ##### FUNCTION gtk_menu_item_set_submenu ##### -->
61 Sets the widget submenu, or changes it.
64 @menu_item: the menu item widget
68 <!-- ##### FUNCTION gtk_menu_item_remove_submenu ##### -->
70 Removes the widget's submenu.
73 @menu_item: the menu item widget
76 <!-- ##### FUNCTION gtk_menu_item_set_placement ##### -->
78 Specifies the placement of the submenu around the menu item. The placement
79 is usually #GTK_LEFT_RIGHT for menu items in a popup menu and
80 #GTK_TOP_BOTTOM in menu bars.
83 This function is useless in usual applications.
86 @menu_item: the menu item
87 @placement: the submenu placement
90 <!-- ##### FUNCTION gtk_menu_item_configure ##### -->
92 Sets whether the menu item should show a submenu indicator, which is a right
96 @menu_item: the menu item
97 @show_toggle_indicator: unused
98 @show_submenu_indicator: whether to show the arrow or not
101 <!-- ##### FUNCTION gtk_menu_item_select ##### -->
103 Emits the "select" signal on the given item. Behaves exactly like
107 @menu_item: the menu item
110 <!-- ##### FUNCTION gtk_menu_item_deselect ##### -->
112 Emits the "deselect" signal on the given item. Behaves exactly like
116 @menu_item: the menu item
119 <!-- ##### FUNCTION gtk_menu_item_activate ##### -->
121 Emits the "activate" signal on the given item
124 @menu_item: the menu item
127 <!-- ##### FUNCTION gtk_menu_item_toggle_size_request ##### -->
136 <!-- ##### FUNCTION gtk_menu_item_toggle_size_allocate ##### -->
145 <!-- ##### FUNCTION gtk_menu_item_right_justify ##### -->
147 Sets the menu item to be right-justified. Only useful for menu bars.
150 @menu_item: the menu item
153 <!-- ##### SIGNAL GtkMenuItem::activate ##### -->
155 Emitted when the item is activated.
158 @menuitem: the object which received the signal.
160 <!-- ##### SIGNAL GtkMenuItem::activate-item ##### -->
162 Emitted when the item is activated, but also if the menu item has a
163 submenu. For normal applications, the relevant signal is "activate".
166 @menuitem: the object which received the signal.
168 <!-- ##### SIGNAL GtkMenuItem::toggle-size-allocate ##### -->
173 @menuitem: the object which received the signal.
176 <!-- ##### SIGNAL GtkMenuItem::toggle-size-request ##### -->
181 @menuitem: the object which received the signal.