Next Previous Up Top Contents Index

8.11 DUIM-Gadgets Module

<menu-box>

Open abstract instantiable class

Summary

A class that groups menu buttons.

Superclasses

<collection-gadget>

Init-keywords

update-callback:

An instance of type false-or(<function>).

Library

duim-gadgets

Module

duim-gadgets

Description

A class that groups menu buttons. Like the <button-box> class, you can use this class to create groups of menu buttons that are related in some way. A visual separator is displayed in the menu in which a menu box is inserted, separating the menu buttons defined in the menu box from other menu buttons or menu boxes in the menu.

An example of the way in which a menu box may be used is to implement the clipboard menu commands usually found in applications. A menu box containing items that represent the Cut, Copy, and Paste commands can be created and inserted into the Edit menu.

Internally, this class maps into the menu Windows control.

Support for dynamically modifying the contents of a menu box is provided in the form of an update callback, If this is supplied using the update-callback: init-keyword, then it is invoked just before the menu box is displayed (this usually occurs at the same time that the menu of which the menu box is a part is displayed). This callback is free to make changes to the contents of the menu box, which will then appear when the update callback is complete.

Operations

None.

Example

*menu-box* := contain(make(<menu-box>, 
                           items: range
                                    (from: 0, to: 5)));

See also

<check-menu-box>, page 539

<push-menu-box>, page 628

<radio-menu-box>, page 632


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index