A menu item is an individual item in a menu or menu component, and instances of
are created automatically by define-interface.
An object used for lookup of help. Default value
A character, integer or symbol specifying a mnemonic for the menu item.
is non-nil it should a function which is called before the
is displayed and which determines whether or not the
is selected. By default
is called on the interface of the
, but this argument can be changed by passing the menu-object initarg
. The default value of
Callbacks are made in response to a user gesture on a
(see menu-object) are found by looking for a non-nil value, first in the
, then the menu-component (if any) and finally the menu. This allows a whole menu to have, for example,
without having to specify this in each item. Some items could override this by having their
slot non-nil if needed.
To specify a mnemonic in the menu item, you can use the initarg
, or the initargs
. These initargs are all interpreted just as in menu.
help-key is interpreted as described for element.
If accelerator is a plist then its keys are keywords naming some or all of the supported libraries (as returned by default-library). The plist's values are characters or strings which the system interprets as above, except that no check is made that the keyboard shortcut is valid for the platform.
has a special default value
, which means that, depending on interface-keys-style for the interface, a standard accelerator is added if the item title matches a standard menu command.
, when true, makes the
an "alternative item". Alternative items are invoked if modifiers are held while selecting the "main item". These modifiers are defined by the item's
. The main item is the one before the first alternative item, and each alternative item must be within the same menu and menu component. For an example see
and for more information see the section "Alternative menu items" in the
LispWorks CAPI User Guide
enabled-function-for-dialog determines whether the item is enabled when a dialog is on the screen. Items in the menu bar menus and sub-menus are disabled by default while a dialog is on the screen on top of the active window. You can override this by specifying enabled-function-for-dialog . The value can be one of:
The item is enabled whenever there is a dialog.
The item is disabled whenever there is a dialog.
Do the same as when there is no dialog. This depends on the enabled-function (see menu-object).
A function that is called instead of the
to decide if the item should be enabled. It is called with one argument, by the default the menu interface, which can be overriden by the initarg
(see menu-object for details).