menu%
Implements: menu-item-container<%>
Implements: labelled-menu-item<%>
A menu% object is a submenu within a menu% or
popup-menu%, or as a top-level menu in a
menu-bar%.
( -> new menu% (label _) (parent _) [(help-string _)] [(demand-callback _)])menu% object
label : string (up to 200 characters)
parent : menu%, popup-menu%, or menu-bar% object
help-string = : string (up to 200 characters) or #f#f
demand-callback = : procedure of one argument: a voidmenu% object
Creates a new menu with the given label.
If label contains an ampersand (``&''), it is handled
specially; under Windows, the character following an ampersand is
underlined in the displayed menu title to indicate a keyboard
mnemonic. Pressing and releasing the Alt key switches to
menu-selection mode in the menu bar where mnemonic characters are
used for navigation. An Alt combination might select a specific menu
via on-menu-char. A double-ampersand in
label is replaced by a literal (non-navigation)
ampersand. Under X and Mac OS, ampersands in the label are parsed
in the same way as for Windows, but no mnemonic underline is
displayed.
If help-string is not #f, the menu has a help string. See
get-help-string for more information.
The demand-callback procedure is called by the default
on-demand method with the object itself.
If the menu has the label ``Help'' in a menu bar, it is treated specially on some platforms. Under Mac OS, the items of a ``Help'' menu are folded into the standard help menu. In addition, under Mac OS, if the name of the first item in the ``Help'' menu starts with ``About'', then the menu item is duplicated as the first item under the Apple menu.
All Methods
delete from menu-item<%>
enable from labelled-menu-item<%>
get-help-string from labelled-menu-item<%>
get-items from menu-item-container<%>
get-label from labelled-menu-item<%>
get-parent from menu-item<%>
get-plain-label from labelled-menu-item<%>
is-deleted? from menu-item<%>
is-enabled? from labelled-menu-item<%>
on-demand from menu-item-container<%>
overrides on-demand from labelled-menu-item<%>
restore from menu-item<%>
set-help-string from labelled-menu-item<%>
set-label from labelled-menu-item<%>