
1 CAPI Reference Entries
menu-object is the superclass of all menu objects, and provides functionality for handling generic aspects of menus, menu components and menu items.
callbacks
titled-menu-object
enablednil, the menu object is disabled, and cannot be selected.
popup-callbackCallback before the menu appears.
enabled-function Returns non-nil if the menu is enabled.
enabled-slotnil.
callback
callback-data-functionA function to return data for the callback.
menu-object-enabled
menu-popup-callback
popup-callback (if there is one) is called with the menu object and it is allowed to make arbitrary changes to that object.
nil if the menu object is enabled.
enabled-slot is a short-hand means of creating anenabled-function which checks the value of a slot in the menu object's interface.
initarg is placed in theselection-callback,extend-callback andretract-callback slots unless these are given explicitly, and so will get called when the menu object is selected or deselected. Thecallback-data-function is a function that is called with no arguments and the value it returns is used as the data to the callbacks.
(capi:contain (make-instance
'capi:menu-item
:text "Press Me"
:enabled-function #'(lambda (item)
(eq (random 2)
1))))
menumenu-itemmenu-component

Generated with Harlequin WebMaker