3.2 Menu facilities

The menu facilities are centred around the concept of menubars. In guienv, there may be any number of menubars: an application menubar, and a menubar associated with each window. In both cases, these menubars are specified as instances of the menubar pattern:

menubar implements the facilities for defining menubars.

The application menu can be specified by further binding the menubarType virtual. If a standard application menubar is what you want, just further bind to standardMenuBar.

StandardMenubar defines the following important attributes:

The application menubar can be changed and accessed through the applicationMenubar attribute.

The individual menus in a menubar is specified as instances of the pattern menu. menu defines the following important attributes:

The pattern menuItem is the facility for defining the individual items in a menu. Most attributes (name, key, checked, etc.) define the visual appearance of the menu item. Besides the following important attributes are defined:

The separator pattern is a special menuItem that inserts a vertical line in the menu to separate groups of items.

The menuItem pattern assumes that the same actions always must be executed when a menu item is selected. If however, we want a more dynamic behaviour, the pattern dynamicMenuItem must be used. This pattern allows actions to be associated dynamically with the particular menu item. dynamicMenuItem idefines the following important attributes:

The actions to be associated with a dynamicMenuItem must be instances of the menuAction pattern.


Lidskjalv: User Interface Framework - Reference Manual
© 1994-2004 Mjølner Informatics
[Modified: Monday October 23rd 2000 at 9:41]