|
|
The optional set of frame descriptors can include any valid frame descriptor, in any order. Each of these descriptors should only be used once in a menu definition file. If defined more than once in the set, the last one is used. In the following explanations, FALSE is defined as the word ``false,'' irrespective of case, or a non-zero return code. The notation TRUE is defined as all values other than FALSE as defined above (for example, true, TRUE, yes, 0).
altslks
descriptor
defines whether
SLKs 9 through 16 are displayed
when the frame is initially opened.
If
altslks
evaluates to TRUE,
SLKs 9 through 16 will be displayed.
The default, if this descriptor
is not defined, is FALSE, which causes SLKs 1 through 8 to be displayed.
autosort
defines whether the items in a menu should be sorted.
This might be sensible in international
applications when menu items should appear in alphabetical order
irrespective of the current locale.
begrow
and
begcol
descriptors define
the original position of the top left corner of the menu frame
in the user's work area.
(begrow=0 and begcol=0 evaluates to the upper left corner of
the work area.)
These descriptors accept values of type position:
begrow
only)
begrow
only)
begrow
and
begcol
to be integer values causes the frame to appear in the given position.
If either
begrow
or
begcol
evaluates to
center
,
then the other can only be an integer value
or
center
.
Any other value is ignored and the descriptor defaults
to
center
.
If neither is
center
,
then the value of
begrow
determines the value of
begcol
;
if
begrow
is
current
,
distinct
,
any
,
or an invalid value, then
begcol
defaults to
any
.
If
begrow
is a valid integer,
begcol
can be a valid integer;
if
begcol
is an invalid integer in this case,
it defaults to
any
.
If integer values are supplied and either begrow or begcol are
outside the screen boundary, a default value of any will be used.
close
descriptor is evaluated when the menu is closed and/or when the user exits from
the FMLI application.
The close descriptor is of type null, which means its only
purpose is to obtain the side effects of backquoted expressions
coded in its definition.
columns
descriptor defines the number of items
displayed in a row of a menu frame.
It must evaluate to a positive integer;
if it does not,
columns
will be ignored.
It will also be ignored if
description
is defined for any menu item.
If neither columns nor rows is defined,
menu dimensions will be determined by the interpreter.
Given
columns
,
the number of rows needed to display the items in the menu
is calculated.
If there is a conflict between the value provided by the
rows
descriptor and the calculated value, the calculated value
takes precedence.
Menu item names will be truncated, if required, to fit in the
specified columns.
(See
``Programming tips and known problems''
for a complete discussion of the method used by FMLI to
calculate rows and columns.)
done
descriptor defines the action to be executed when
the user presses
<ENTER>
in a multi-select menu.
This descriptor is ignored in a single-select menu.
It can be replaced for as long as the frame is current by a message generated by the message built-in utility with the -f option. (See the message(1fmli) manual page.)
help
descriptor specifies what will happen when a user asks for help
while in the menu.
Since this descriptor is evaluated when the user requests
help, the specification of what help is displayed can be
determined through parameters that are set interactively.
init
descriptor defines whether the menu frame will be opened.
If this descriptor is not defined, it defaults to TRUE,
which means the menu frame will be opened.
If
init
evaluates to FALSE, the menu frame will not be opened,
but the close descriptor will be evaluated.
If init evaluates to FALSE on an update, the frame
is closed, unless it is an initial frame.
If defined among the frame descriptors in a menu definition file, that value of interrupt is inherited by all sets of item descriptors and all sets of SLK descriptors in the menu, unless it is redefined for a specific item or SLK.
lifetime
descriptor defines when the menu frame will be closed (that is, removed from
the work area).
It is evaluated whenever the menu is
opened, closed, made current, or made non-current.
The acceptable values are:
menu
descriptor defines the title of the menu that appears in the
frame's title bar.
If not defined in the frame definition file, it
defaults to Menu.
It will be truncated if it is longer than DISPLAYW-6.
multiselect
descriptor defines whether the menu is a multi-select menu.
A multi-select menu allows the user to select more than
one menu item.
When this descriptor evaluates to TRUE,
the SLK
<F2>
will map to the mark command,
and the nature of the
action
descriptor changes
for all items (see the description of action in
``Item descriptors for menus'').
oninterrupt is subject to an inheritance hierarchy: if not defined anywhere in your application, the default value `message Operation interrupted!` nop applies throughout. If explicitly defined at any inheritance level, then executables in action and done descriptors at or above that inheritance level will inherit that defined value. (See ``Interrupt signal handling'' for complete information.)
For example, if defined among the frame descriptors in a menu definition file, the value of oninterrupt is inherited by all sets of item descriptors and all sets of SLK descriptors in the menu, unless it is redefined for a specific item or SLK.
reread
is not defined, it defaults to FALSE.
If reread evaluates to TRUE, the menu will be periodically updated
by rereading its description file when
the checkworld command is executed.
checkworld is executed when a SIGALRM alarm occurs
(every $MAILCHECK seconds).
Other times
checkworld
is executed include when a frame is
opened, closed, or navigated to.
(See checkworld
in
``Built-in variables''.)
When checkworld occurs,
all frames whose reread descriptor evaluates to TRUE will be updated.
(However, the menu descriptor is not reread.)
Execution of checkworld may cause the message line to clear.
rows
descriptor defines the desired number of rows long
a menu frame will be.
It must evaluate to an integer value greater than 0 and less
than DISPLAYH-2;
if it does not,
rows
will be ignored.
If neither this descriptor nor columns is defined,
menu dimensions will be determined by FMLI.
Given
columns
,
the number of rows needed to display the items in the menu
is calculated.
If there is a conflict between the value provided by the
rows
descriptor and the calculated value, the calculated value
takes precedence.
(A table summarizing these calculations can be found in
``Programming tips and known problems''.)