Page 256 Table of Contents Index Page 258
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 25. MENU FACILITIES
The visual representation of an item depends on the printer and presentation-type keyword
arguments. If presentation-type is supplied, the visual representation is produced by present
of the menu item with that presentation type. Otherwise, if printer is supplied, the visual
representation is produced by the printer function, which receives two arguments, the item and
a stream to do output on. The printer function should output some text or graphics at the
stream's cursor position, but need not call present. If neither presentation-type nor printer
is supplied, the visual representation is produced by princ of the display object. Note that if
presentation-type or printer is supplied, the visual representation is produced from the entire
menu item, not just from the display object. CLIM implementations are free to use the menus
provided by the underlying window system when possible; this is likely to be the case when the
printer and presentation-type are the default, and no other options are supplied.

associated-window is the CLIM window with which the menu is associated. This defaults to the
top-level window of the current application frame.

default-item is the menu item where the mouse will appear.

default-style is a text style that defines how the menu items are presented.

label is a string to which the menu title will be set.

printer is a function of two arguments used to print the menu items in the menu. The two
arguments are the menu item and the stream to output it on. It has dynamic extent.

presentation-type specifies the presentation type of the menu items.

cache is a boolean that indicates whether CLIM should cache this menu for later use. (Caching
menus might speed up later uses of the same menu.) If cache is true, then unique-id and id-
test
serve to uniquely identify this menu. When cache is true, unique-id defaults to items, but
programmers will generally wish to specify a more efficient tag. id-test is a function of two
arguments used to compare unique-ids, which defaults to equal. cache-value is the value that
is used to indicate that a cached menu is still valid. It defaults to items, but programmers may
wish to supply a more efficient cache value than that. cache-test is a function of two arguments


Page 256 Table of Contents Index Page 258
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E