3.29 menu%
Implements: labelled-menu-item<%>
Implements: menu-item-container<%>
A menu% object is a submenu within a menu% or
popup-menu%, or as a top-level menu in a
menu-bar%.
(->newmenu% (label_) (parent_) [(help-string_)] [(demand-callback_)])menu%object
label: string (up to 200 characters)
parent:menu%,popup-menu%, ormenu-bar%object
help-string=#f: string (up to 200 characters) or#f
demand-callback=: procedure of one argument: avoidmenu%objectCreates a new menu with the given label.
If
labelcontains 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 viaon-menu-char. A double-ampersand inlabelis replaced by a literal (non-navigation) ampersand. Under X and Mac OS X, ampersands in the label are parsed in the same way as for Windows, but no mnemonic underline is displayed.If
help-stringis not#f, the menu has a help string. Seeget-help-stringfor more information.The
demand-callbackprocedure is called by the defaulton-demandmethod 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 X, the items of a ``Help'' menu are folded into the standard help menu. In addition, under Mac OS X, 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 labelled-menu-item<%>
overrides on-demand from menu-item-container<%>
restore from menu-item<%>
set-help-string from labelled-menu-item<%>
set-label from labelled-menu-item<%>