List of Import References :
See BOOL
See BTUnion
See Char
See Com
See DENOTATION
See Int
See Nat
See Option
See Real
See Seq
See Set
See String
See Void
See WinConfig
See WinInternal
See WinTclTk
This structure provides menus.
SIGNATURE WinMenu
$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)
IMPORT String ONLY string Com[window] ONLY com IMPORT WinConfig ONLY point:SORT WinInternal ONLY view:SORT config:SORT window:SORT wconfig:SORT
A menu is a special kind of window which displays a special set of views, called menu items. A menu is created by one of the functions below:
FUN menu : items -> com[window] FUN menu : wconfig ** items -> com[window]
In contrast to windows, a newly created menu is initially in the
state withdrawn. To display the menu, the command Wd set state(_)
shouldn't be used; instead, use the post
and unpost
configurations below. The variant post(Pt)
is a shortcut
for posting the menu window and setting its position:
FUN post : wconfig FUN post : point -> wconfig FUN unpost : wconfig
The following window configuration specifies, that the menu window should support a tear-off entry at the top:
FUN tearOff : bool -> wconfig
Menu items are quite similar to views: basic items such as
buttons are configured and combined into compound using the functions
with
and ++
:
SORT items FUN ++ : items ** items -> items FUN with : items ** config -> items
The following basic item types are provided:
FUN button : items FUN checkButton : items FUN radioButton : items FUN separator : items FUN cascade : items
Menu items in generally provided the following configurations:
activeBackground activeForeground background bitmap font foreground image selectColor selectImage state underline
bind enable regulate select sync
The selectColor
, selectImage
and select
configurations are only available for check-buttons and radio-buttons.
The bind
configurations are only available for button items.
The label
configuration specifies the text to be displayed
in an item. It is not available for a separator.
FUN label : denotation -> config FUN label : string -> config
The accelerator
configurations specify a string to be
displayed at the right side of a menu item, which is also bound
as keyboard shortcut to invoke the item. Not available for separators.
FUN accelerator : denotation -> config FUN accelerator : string -> config
The submenu
configurations specify the submenu to be bound
to a cascade item. Only available for cascade items.
FUN submenu : items -> config FUN submenu : wconfig ** items -> config
A menu-button view displays a click-button with a hard-wired responsive behavior to display the given menu when it is invoked.
FUN menuButton : items -> view FUN menuButton : wconfig ** items -> view
next node: WinEmitter,
prev node: WinButton,
up to node: Subsystem Opal Windows