A menu item is an individual item in a menu or menu component, and instances of
menu-item 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
menu-item is displayed and which determines whether or not the
menu-item is selected. By default
is called on the interface of the
menu-item, 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
menu-item, then the menu-component (if any) and finally the menu. This allows a whole menu to have, for example,
:data 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
:mnemonic, or the initargs
:mnemonic-escape. 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
:default, 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. For the full set of standard accelerators see Standard default accelerators.
is not supported when the
menu-item is in the
of a simple-pane.
, when true, makes the
menu-item 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 Alternative menu items.
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 overridden by the initarg
:setup-callback-argument (see menu-object for details).
CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017