DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Introduction to the Form and Menu Language Interpreter (FMLI)

Frame definition files

A frame definition file is a file made up of statements recognized by the fmli command interpreter. Three types of frames can be defined in FMLI: menu frames, form frames, and text frames. FMLI recognizes the type of frame you are defining based on the contents of the frame definition file and certain file naming conventions. The following sections briefly describe these three types of frames. Detailed explanations of how to write frame definition files can be found in ``Frame definition files''.

Menu frames

A menu in FMLI is a method for displaying a list of selections in a frame, determining the user's selection, and taking action based on the selection. The title bar of a menu frame displays a default name for the menu (Menu) or one you define, and an identification number assigned to the frame by FMLI.

Single-column and Multi-column Menus

By default, FMLI presents menus with 10 or fewer items in a single left-justified column; if the number of items is greater than 10, FMLI attempts to create a multi-column menu with a 3:1 aspect ratio of width to height. You can explicitly define the number of rows and/or columns you want in a menu (see ``Menus'', for a description of the way FMLI calculates rows and columns in menus). Menu items are presented in a single scrollable column if an entire menu cannot fit on the screen at once. Appropriate scroll symbols appear in the scroll box in the right-hand border of the frame.

Single-select and multi-select menus

You can define a menu to be either single-select or multi-select. In a single-select menu, the user can select only one item. When the user presses <ENTER> (the key or SLK) while the cursor is positioned on a menu item, the backquoted expression associated with the item is evaluated, and any FMLI command associated with the item is executed.


NOTE: Depending on the keyboard being used, the carriage-return key may be called <ENTER>, <<Return>>, or something else. Throughout this guide <ENTER> is used to represent the carriage-return key.

In a multi-select menu, the user can select more than one item. When the user presses <MARK> (the key or SLK) while the cursor is positioned on a menu item, the item is marked with an asterisk (*) to its left, and the backquoted expression associated with the item is evaluated. Any FMLI command associated with the item is ignored. When, after having marked all desired items, the user presses <ENTER>, the done descriptor is evaluated, and any FMLI commands defined by the descriptor are executed. Backquoted expressions, descriptors, and FMLI commands are discussed in ``The Form and Menu Language''.

Form frames

A form in FMLI is a method for displaying and prompting for information. To the user, a form looks like a fill-in-the-blanks questionnaire. The title bar of a form frame displays a default name for the form (Form) or one you define, and a frame ID number assigned to the frame by FMLI. A form comprises fields, which have two parts: a field label (the name of the field) and an area in which to enter a value for the field. You can define default field values that are displayed in the input area whenever the form is opened or updated.

Multi-line and scrollable fields

You can define the field input area to be multi-line and/or scrollable. A scrollable form field allows users to enter more input in the field than its display area is sized for. If a scrollable multi-line field is current, appropriate vertical scroll symbols appear in the bottom right border of the frame: ^, v, or both. For a scrollable single-line field, appropriate horizontal scroll symbols appear to the right of the display area: <, >, or = if there is more information before and after the information currently displayed.

Multi-page forms

A form can be more than one page long, in which case it can scroll a page at a time. The up and down symbols in the scroll box inform users that they are positioned on the first page, the last page, or one of the middle pages of a form. If you want to indicate the page more precisely, you can include a label such as Page 2 of 5 in a form, as described under the name entry in ``Form frame descriptors'' for more information.

Validating field values

In forms, you can use the field descriptor valid to validate the value a user enters in a field, or the descriptor validOnDone to validate the relationship between values of different fields (as when the validity of the value entered in field x depends on the value entered in field y), or both. In all cases, the user will not be able to save the form until the values pass the validation test.

Choices menu

A choices menu is a way to show users the valid choices for a field in a form. When you define a choices menu for a field, you can choose whether the user will toggle through the choices in the field itself, or whether the choices will be displayed in a pop-up menu. When a user selects a value from a pop-up choices menu, it is automatically entered in the field to which the menu applies.

Text frames

Text frames are primarily used to display read-only information, such as on-line help for the user. The title bar of a text frame displays a default name for the frame (Text) or one you define, and a frame ID number assigned to the frame by FMLI. The frame will be scrollable if all of its text will not fit in the display at one time; appropriate scroll symbols will appear in the scroll box in the right-hand border of the frame. If the text frame descriptor edit evaluates to TRUE, users will be able to change the text in the frame.

Text frames may be defined with text frame definition files, just as menus and forms are. Simple text frames may also be specified using a shorter notation, without a frame definition file, using the textframe command.


Next topic: Application level definition files
Previous topic: Programming with FMLI

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004