TOPMENU section
The TOPMENU
section defines a pull-down menu with options that are
bound to actions.
Syntax
TOPMENU [
topmenu-identifier]
[
( topmenu-attribute [
,...]
) ]
group
[...]
END
- topmenu-identifier defines the name of the top menu (optional).
- topmenu-attribute can be:
STYLE
,TAG
.
GROUP group-identifier [
( group-attribute [
,...]
) ]
{
command
|
placeholder
|
group
|
separator
}
[...]
END
- group-identifier defines the name of the group, it is mandatory.
- group-attribute is one of:
STYLE
,TEXT
,IMAGE
,COMMENT
,TAG
,HIDDEN
.
COMMAND command-identifier [
( command-attribute [
,...]
) ]
- command-identifier defines the name of the action to bind to, it is mandatory.
- command-attribute is one of:
STYLE
,TEXT
,IMAGE
,COMMENT
,TAG
,HIDDEN
,ACCELERATOR
,AUTOHIDE
.
AUTOCOMMANDS ( CONTENT = {
ACTIONS |
PROGRAMS |
WINDOWS }
)
ACTIONS
stands for action views to be rendered for all default action views shown in the action panel.PROGRAMS
stands for the list of current programs displayed by the front-end.WINDOWS
stands for the list of windows created by the current program.
SEPARATOR [
separator-identifier]
[
( separator-attribute [
,...]
) ]
- separator-identifier defines the name of the separator (optional).
- separator-attribute is one of:
STYLE
,TAG
,HIDDEN
.
Form attributes
ACCELERATOR
, AUTOHIDE
, COMMENT
, HIDDEN
, IMAGE
, STYLE
, TEXT
, TAG
.
Style attributes
Common: backgroundColor
, border
, fontFamily
, fontSize
, fontStyle
, fontWeight
, textColor
, textDecoration
.
Class-specific: none.
Usage
The TOPMENU
section is used to define a pull-down menu in a form.
The TOPMENU
section must appear in the sequence described in form file structure.
The TOPMENU
section is optional.
In a TOPMENU
section, you build a tree of GROUP
elements
to design the pull-down menu. A GROUP
can contain COMMAND
,
SEPARATOR
or GROUP
children. A COMMAND
defines a pull-down menu option that triggers an action when it is selected. In the topmenu
specification, command-identifier defines which action a menu option is bound
to. For example, if you define a topmenu option as "COMMAND zoom
", it can be
controlled by an "ON ACTION zoom
" clause in an interactive instruction.
The topmenu commands are enabled depending on the actions defined by the current interactive
instruction. For example, you can define a topmenu option with the action name "cancel" to bind the
pull-down item to this predefined dialog action. Topmenu commands can be automatically hidden when
the corresponding action is disabled, by using the AUTOHIDE
attribute for the
command.
An accelerator name can be defined for a topmenu command; this accelerator name will be used for display in the command item. You must define the same accelerator in the action defaults section for the action name of the topmenu command.
TOPMENU
elements can include AUTOCOMMANDS
place holders, with a
mandatory CONTENT
attribute, to define if the auto-commands must show action views
for the current actions not bound to an explicit action view (CONTENT=ACTIONS
), to
show the list of current running programs (CONTENT=PROGRAMS
), or to show the list
of opened windows of the current program (CONTENT=WINDOWS
).
TOPMENU
elements can get a STYLE
attribute in order to use a
specific rendering and decoration, based on presentation style definitions.
Example
TOPMENU tm ( STYLE="mystyle" )
GROUP form (TEXT="Form")
COMMAND help (TEXT="Help", IMAGE="quest")
COMMAND quit (TEXT="Quit")
END
GROUP edit (TEXT="Edit")
COMMAND accept (TEXT="Validate", IMAGE="ok", TAG="acceptMenu")
COMMAND cancel (TEXT="Cancel", IMAGE="cancel")
END
GROUP records (TEXT="Records")
COMMAND append (TEXT="Add", IMAGE="plus")
COMMAND delete (TEXT="Remove", IMAGE="minus")
COMMAND update (TEXT="Modify", IMAGE="accept")
SEPARATOR (TAG="lastSeparator")
COMMAND search (TEXT="Search", IMAGE="find")
END
GROUP windows (TEXT="Windows")
AUTOCOMMANDS (CONTENT=WINDOWS)
END
END