All Manuals > CAPI User Guide and Reference Manual > 8 Creating Menus

NextPrevUpTopContentsIndex

8.2 Presenting menus

The most common way of presenting menus is in the menu bar. This is done by putting the menus in the menu bar of an interface, typically by using :menu-bar in define-interface. It is also possible to set the menu bar dynamically using (setf interface-menu-bar-items).

On Cocoa, you may want to define the application menu, the menus that are shown when no interface is active, and maybe a Dock context menu. For these, you will need to define your own subclass of cocoa-default-application-interface, and use set-application-interface on an instance of this class. See entry for cocoa-default-application-interface.

Pane-specific menus are invoked automatically by the system for the appropriate user gesture. See Popup menus for panes for a full discussion of the mechanism that finds the menu to raise.

There is also a special pane popup-menu-button, which raises a menu when clicked.

In addition, you can raise a menu programmatically by calling display-popup-menu.


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

NextPrevUpTopContentsIndex