menu-item%
Implements: selectable-menu-item<%>
A menu-item% is a plain string-labelled menu item. Its
parent must be a menu% or popup-menu%. When the
user selects the menu item, its callback procedure is called.
( -> new menu-item% (label _) (parent _) (callback _) [(shortcut _)] [(help-string _)] [(demand-callback _)])menu-item% object
label : string (up to 200 characters)
parent : menu% or popup-menu% object
callback : procedure of two arguments: a menu-item% object and a control-event% object
shortcut = : character or #f#f
help-string = : string (up to 200 characters) or #f#f
demand-callback = : procedure of one argument: a voidmenu-item% object
Creates a new menu item in parent. The item is initially shown,
appended to the end of its parent. The callback procedure is
called (with the event type 'menu) when the user selects
the menu item (either via a menu bar,
popup-menu in window<%>, or
popup-menu in editor-admin%).
See
set-label for information about mnemonic ampersands (``&'') in label.
If shortcut is not #f, the item has a shortcut. See
get-shortcut for more information.
If help-string is not #f, the item 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.
Methods
delete
get-parent
is-deleted?
restore
All Methods
command from selectable-menu-item<%>
delete from menu-item<%>
enable from labelled-menu-item<%>
get-help-string from labelled-menu-item<%>
get-label from labelled-menu-item<%>
get-parent from menu-item<%>
get-plain-label from labelled-menu-item<%>
get-shortcut from selectable-menu-item<%>
get-x-shortcut-prefix from selectable-menu-item<%>
is-deleted? from menu-item<%>
is-enabled? from labelled-menu-item<%>
on-demand from labelled-menu-item<%>
restore from menu-item<%>
set-help-string from labelled-menu-item<%>
set-label from labelled-menu-item<%>
set-shortcut from selectable-menu-item<%>
set-x-shortcut-prefix from selectable-menu-item<%>