NextPrevUpTopContentsIndex

titled-menu-object

Class
Summary

The class titled-menu-object is a subclass of menu-object which supports titles, and it is used by menus, menu components and menu items.

Package

capi

Superclasses

menu-object

Subclasses

menu
menu-component
menu-item

Initargs

:title

The title for the object.

:title-function

A setup callback which returns the title for the object, and optionally a mnemonic for the title.

Accessors

menu-title
menu-title-function

Description

The simplest way to give a title to a titled-menu-object is to just supply a title string, and this will then appear as the title of the object.

Alternatively, a title-function can be provided which will be called when the menu is about to appear and which should return the title to use. By default title-function is called on the interface of the titled-menu-object , but this argument can be changed by passing the menu-object initarg setup-callback-argument .

To specify a mnemonic in the title returned by title-function , make title-function return the mnemonic as a second value. This value is interpreted in the same way as the mnemonic argument for menu.

Examples
(capi:contain (make-instance 'capi:menu-item
                             :title "Press Me"))
(capi:contain (make-instance
               'capi:menu-item
               :title-function #'(lambda (item)
                                   (princ-to-string
                                    (random 5)))))

LispWorks CAPI Reference Manual - 17 Mar 2008

NextPrevUpTopContentsIndex