Defines a menu function.
capi
define-menu function-name (self) title descriptions &rest initargs
function-name⇩ |
A symbol. |
self⇩ |
A symbol. |
title⇩ |
A string. |
descriptions⇩ |
Lisp forms describing menu items. |
initargs⇩ |
Keywords and values. |
The macro define-menu
defines a function called function-name with a single argument self that will make a menu from title, descriptions and initargs, which take the same form as the :menus
section of define-interface.
(capi:define-menu make-test-menu (self) "Test" ("Item1" "Item2" (:component ("Item3" "Item4") :interaction :single-selection) (:menu ("Item5" "Item6") :title "More Items"))) (setq interface (make-instance 'capi:interface)) (setf (capi:interface-menu-bar-items interface) (list (make-test-menu interface))) (capi:display interface)
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27