
@c %start of fragment

@deftp Class <gtk-menu-item>
Derives from @code{<gtk-item>}.

This class defines the following properties:

@table @code
@item submenu
The submenu attached to the menu item, or NULL if it has none

@end table

@end deftp

@defop Signal <gtk-menu-item> activate 
Emitted when the item is activated.

@end defop

@defop Signal <gtk-menu-item> activate-item 
Emitted when the item is activated, but also if the menu item has a submenu. For
normal applications, the relevant signal is "activate".

@end defop

@defop Signal <gtk-menu-item> toggle-size-request  (arg0@tie{}@code{<gpointer>})
@end defop

@defop Signal <gtk-menu-item> toggle-size-allocate  (arg0@tie{}@code{<gint>})
@end defop

@deffn Function gtk-menu-item-new  @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
Creates a new @code{<gtk-menu-item>}.

@table @var
@item ret
the newly created @code{<gtk-menu-item>}

@end table

@end deffn

@deffn Function gtk-menu-item-new-with-label  (label@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
Creates a new @code{<gtk-menu-item>} whose child is a @code{<gtk-label>}.

@table @var
@item label
the text for the label

@item ret
the newly created @code{<gtk-menu-item>}

@end table

@end deffn

@deffn Function gtk-menu-item-new-with-mnemonic  (label@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
Creates a new @code{<gtk-menu-item>} containing a label. The label will be
created using @code{gtk-label-new-with-mnemonic}, so underscores in @var{label}
indicate the mnemonic for the menu item.

@table @var
@item label
The text of the button, with an underscore in front of the mnemonic character

@item ret
a new @code{<gtk-menu-item>}

@end table

@end deffn

@deffn Function gtk-menu-item-set-right-justified  (self@tie{}@code{<gtk-menu-item>}) (right_justified@tie{}@code{bool})
@deffnx Method set-right-justified
Sets whether the menu item appears justified at the right side of a menu bar.
This was traditionally done for "Help" menu items, but is now considered a bad
idea. (If the widget layout is reversed for a right-to-left language like Hebrew
or Arabic, right-justified-menu-items appear at the left.)

@table @var
@item menu-item
a @code{<gtk-menu-item>}.

@item right-justified
if @samp{@code{#t}} the menu item will appear at the far right if added to a
menu bar.

@end table

@end deffn

@deffn Function gtk-menu-item-set-submenu  (self@tie{}@code{<gtk-menu-item>}) (submenu@tie{}@code{<gtk-widget>})
@deffnx Method set-submenu
Sets the widget submenu, or changes it.

@table @var
@item menu-item
the menu item widget

@item submenu
the submenu

@end table

@end deffn

@deffn Function gtk-menu-item-set-accel-path  (self@tie{}@code{<gtk-menu-item>}) (accel_path@tie{}@code{mchars})
@deffnx Method set-accel-path
Set the accelerator path on @var{menu-item}, through which runtime changes of
the menu item's accelerator caused by the user can be identified and saved to
persistant storage (see @code{gtk-accel-map-save} on this). To setup a default
accelerator for this menu item, call @code{gtk-accel-map-add-entry} with the
same @var{accel-path}. See also @code{gtk-accel-map-add-entry} on the specifics
of accelerator paths, and @code{gtk-menu-set-accel-path} for a more convenient
variant of this function.

This function is basically a convenience wrapper that handles calling
@code{gtk-widget-set-accel-path} with the appropriate accelerator group for the
menu item.

Note that you do need to set an accelerator on the parent menu with
@code{gtk-menu-set-accel-group} for this to work.

@table @var
@item menu-item
a valid @code{<gtk-menu-item>}

@item accel-path
accelerator path, corresponding to this menu item's functionality, or
@samp{@code{#f}} to unset the current path.

@end table

@end deffn

@deffn Function gtk-menu-item-remove-submenu  (self@tie{}@code{<gtk-menu-item>})
@deffnx Method remove-submenu
Removes the widget's submenu.

@table @var
@item menu-item
the menu item widget

@end table

@end deffn

@deffn Function gtk-menu-item-select  (self@tie{}@code{<gtk-menu-item>})
@deffnx Method select
Emits the "select" signal on the given item. Behaves exactly like
@code{<gtk-item-select>}.

@table @var
@item menu-item
the menu item

@end table

@end deffn

@deffn Function gtk-menu-item-deselect  (self@tie{}@code{<gtk-menu-item>})
@deffnx Method deselect
Emits the "deselect" signal on the given item. Behaves exactly like
@code{<gtk-item-deselect>}.

@table @var
@item menu-item
the menu item

@end table

@end deffn

@deffn Function gtk-menu-item-activate  (self@tie{}@code{<gtk-menu-item>})
@deffnx Method activate
Emits the "activate" signal on the given item

@table @var
@item menu-item
the menu item

@end table

@end deffn

@deffn Function gtk-menu-item-toggle-size-request  (self@tie{}@code{<gtk-menu-item>}) @result{}@tie{} (requisition@tie{}@code{int})
@deffnx Method toggle-size-request
Emits the "toggle_size_request" signal on the given item.

@table @var
@item menu-item
the menu item

@item requisition
the requisition to use as signal data.

@end table

@end deffn

@deffn Function gtk-menu-item-toggle-size-allocate  (self@tie{}@code{<gtk-menu-item>}) (allocation@tie{}@code{int})
@deffnx Method toggle-size-allocate
Emits the "toggle_size_allocate" signal on the given item.

@table @var
@item menu-item
the menu item.

@item allocation
the allocation to use as signal data.

@end table

@end deffn

@deffn Function gtk-menu-item-get-right-justified  (self@tie{}@code{<gtk-menu-item>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-right-justified
Gets whether the menu item appears justified at the right side of the menu bar.

@table @var
@item menu-item
a @code{<gtk-menu-item>}

@item ret
@samp{@code{#t}} if the menu item will appear at the far right if added to a
menu bar.

@end table

@end deffn

@deffn Function gtk-menu-item-get-submenu  (self@tie{}@code{<gtk-menu-item>}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
@deffnx Method get-submenu
Gets the submenu underneath this menu item, if any. See
@code{gtk-menu-item-set-submenu}.

@table @var
@item menu-item
a @code{<gtk-menu-item>}

@item ret
submenu for this menu item, or @samp{@code{#f}} if none.

@end table

@end deffn


@c %end of fragment
