menu-item% : class? | ||
superclass: object% | ||
|
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.
| ||||||||||||||||||||||||||||
→ (is-a?/c menu-item%) | ||||||||||||||||||||||||||||
label : label-string? | ||||||||||||||||||||||||||||
parent : (or/c (is-a?/c menu%) (is-a?/c popup-menu%)) | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
shortcut : (or/c char? symbol? false/c) = #f | ||||||||||||||||||||||||||||
help-string : (or/c label-string? false/c) = #f | ||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||
|
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 &s in label.
If shortcut is not #f, the item has a shortcut. See get-shortcut for more information. The shortcut-prefix argument determines the set of modifier keys for the shortcut; see get-shortcut-prefix.
If help 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.