All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

define-menu

Macro
Summary

Defines a menu function.

Package

capi

Signature

define-menu function-name ( self ) title menu-body &rest menu-options

Description

The macro define-menu defines a function called function-name with a single argument self that will make a menu. The parameters title , menu-body and menu-options take the same form as the :menus section of define-interface.

Example
(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)
See also

define-interface
menu
undefine-menu


CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017

NextPrevUpTopContentsIndex