checkable-menu-item%
Implements: selectable-menu-item<%>
A checkable-menu-item% is a string-labelled menu item that
maintains a check mark. Its parent must be a menu% or
popup-menu%. When the user selects the menu item, the
item's check mark is toggled and its callback procedure is called.
( -> new checkable-menu-item% (label _) (parent _) (callback _) [(shortcut _)] [(help-string _)] [(demand-callback _)] [(checked _)])checkable-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 voidcheckable-menu-item% object
checked = : boolean#f
Creates a new menu item in parent. The item is initially shown,
appended to the end of its parent, and unchecked. The callback
procedure is called (with the event type 'menu) when the
menu item is selected (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.
By default, the menu item is initially unchecked. If checked is
true, then
check is called so that the menu item is initially checked.
Methods
check
is-checked?
All Methods
check from checkable-menu-item%
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-checked? from checkable-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<%>