A menu item with an icon
A GtkImageMenuItem is a menu item which has an icon next to the text label.
Note that the user can disable display of menu icons, so make sure to still fill in the text label.
Derives from
<gtk-menu-item>
.This class defines the following slots:
image
- Child widget to appear next to the menu text
<gtk-image-menu-item>
) (image <gtk-widget>
)Sets the image of image-menu-item to the given widget. Note that it depends on the show-menu-images setting whether the image will be displayed or not.
- image-menu-item
- a
<gtk-image-menu-item>
.- image
- a widget to set as the image for the menu item.
<gtk-image-menu-item>
) ⇒ (ret <gtk-widget>
)Gets the widget that is currently set as the image of image-menu-item. See
gtk-image-menu-item-set-image
.
- image-menu-item
- a
<gtk-image-menu-item>
.- ret
- the widget set as image of image-menu-item.
<gtk-widget>
)Creates a new
<gtk-image-menu-item>
with an empty label.
- ret
- a new
<gtk-image-menu-item>
.
mchars
) (accel_group <gtk-accel-group>
) ⇒ (ret <gtk-widget>
)Creates a new
<gtk-image-menu-item>
containing the image and text from a stock item. Some stock ids have preprocessor macros like<gtk-stock-ok>
and<gtk-stock-apply>
.If you want this menu item to have changeable accelerators, then pass in ‘
#f
’ for accel_group. Next callgtk-menu-item-set-accel-path
with an appropriate path for the menu item, usegtk-stock-lookup
to look up the standard accelerator for the stock item, and if one is found, callgtk-accel-map-add-entry
to register it.
- stock-id
- the name of the stock item.
- accel-group
- the
<gtk-accel-group>
to add the menu items accelerator to, or ‘#f
’.- ret
- a new
<gtk-image-menu-item>
.