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 <!-- ##### SECTION Stability_Level ##### -->
39 <!-- ##### STRUCT GtkMenuItem ##### -->
45 <!-- ##### SIGNAL GtkMenuItem::activate ##### -->
47 Emitted when the item is activated.
50 @menuitem: the object which received the signal.
52 <!-- ##### SIGNAL GtkMenuItem::activate-item ##### -->
54 Emitted when the item is activated, but also if the menu item has a
55 submenu. For normal applications, the relevant signal is "activate".
58 @menuitem: the object which received the signal.
60 <!-- ##### SIGNAL GtkMenuItem::toggle-size-allocate ##### -->
65 @menuitem: the object which received the signal.
68 <!-- ##### SIGNAL GtkMenuItem::toggle-size-request ##### -->
73 @menuitem: the object which received the signal.
76 <!-- ##### ARG GtkMenuItem:accel-path ##### -->
81 <!-- ##### ARG GtkMenuItem:right-justified ##### -->
86 <!-- ##### ARG GtkMenuItem:submenu ##### -->
91 <!-- ##### ARG GtkMenuItem:arrow-scaling ##### -->
96 <!-- ##### ARG GtkMenuItem:arrow-spacing ##### -->
101 <!-- ##### ARG GtkMenuItem:horizontal-padding ##### -->
106 <!-- ##### ARG GtkMenuItem:selected-shadow-type ##### -->
111 <!-- ##### ARG GtkMenuItem:toggle-spacing ##### -->
116 <!-- ##### ARG GtkMenuItem:width-chars ##### -->
121 <!-- ##### FUNCTION gtk_menu_item_new ##### -->
123 Creates a new #GtkMenuItem.
126 @Returns: the newly created #GtkMenuItem
129 <!-- ##### FUNCTION gtk_menu_item_new_with_label ##### -->
131 Creates a new #GtkMenuItem whose child is a #GtkLabel.
134 @label: the text for the label
135 @Returns: the newly created #GtkMenuItem
138 <!-- ##### FUNCTION gtk_menu_item_new_with_mnemonic ##### -->
147 <!-- ##### FUNCTION gtk_menu_item_set_right_justified ##### -->
156 <!-- ##### FUNCTION gtk_menu_item_set_submenu ##### -->
165 <!-- ##### FUNCTION gtk_menu_item_set_accel_path ##### -->
174 <!-- ##### FUNCTION gtk_menu_item_remove_submenu ##### -->
182 <!-- ##### FUNCTION gtk_menu_item_select ##### -->
184 Emits the "select" signal on the given item. Behaves exactly like
188 @menu_item: the menu item
191 <!-- ##### FUNCTION gtk_menu_item_deselect ##### -->
193 Emits the "deselect" signal on the given item. Behaves exactly like
197 @menu_item: the menu item
200 <!-- ##### FUNCTION gtk_menu_item_activate ##### -->
202 Emits the "activate" signal on the given item
205 @menu_item: the menu item
208 <!-- ##### FUNCTION gtk_menu_item_toggle_size_request ##### -->
210 Emits the "toggle_size_request" signal on the given item.
213 @menu_item: the menu item
214 @requisition: the requisition to use as signal data.
217 <!-- ##### FUNCTION gtk_menu_item_toggle_size_allocate ##### -->
219 Emits the "toggle_size_allocate" signal on the given item.
222 @menu_item: the menu item.
223 @allocation: the allocation to use as signal data.
226 <!-- ##### MACRO gtk_menu_item_right_justify ##### -->
228 Sets the menu item to be right-justified. Only useful for menu bars.
231 @menu_item: the menu item
234 <!-- ##### FUNCTION gtk_menu_item_get_right_justified ##### -->
243 <!-- ##### FUNCTION gtk_menu_item_get_submenu ##### -->