SeeView Manual

SeeView Language Elements
HP NonStop SeeView Manual526355-004
5-4
Menus
The string intrinsics #MENULINE, #MENUCOL, #MENUWIDTH, #MENUHEIGHT,
#FKEYLINE, and #FKEYCOL give global information describing the calling menu’s
location, menu size, and function key coordinates. The string intrinsics #MENUTEXT,
#MENUINPUT, and #MENUTOKEN give global information about the calling menu’s
invocation, including the menu text, menu input, and menu token being pointed to.
The WITH taskid statement and various built-in string intrinsics provide task attribute
information, including task status, run-time errors, prompting state, object file name,
cache pages, cache lines, and window location and size. For a discussion of the WITH
statement and pound sign or octomorph (#), see Section 9, SeeView Statements and
Script Symbols.
Menus
The ?MENU directive declares the name of a text cache and the contents of that
cache. Each line of text following the ?MENU directive is stored in the text cache
associated with that name.
You can use the SORTED option to sort the cache records in ascending order. The
syntax for the SORTED option follows. It is described in detail under the TASK on
page 9-104.
SORTED [ "["start [:end ] "]" ]
The WINDOW statement displays the text stored in a cache. A window that references
a text cache can be a simple window that displays the text in the cache or a window
declared as a menu. When you declare a window as a menu, you can associate
SeeView statements and procedures with each line of text. When you point the cursor
to a line of text in a menu and press Return, the statements and procedures associated
with that line are executed.
Menu Productions
Menu productions represent menu items that you can invoke. Menu productions are
lines of text in a ?MENU cache that contain the left arrow symbol (<==). A menu
production can include one or more statements. To execute the statements associated
with the production, point the cursor to that line in a menu and press Return. When a
production includes a CALL statement, the statements in the called procedure are
executed.
For example, the following line in Example 5-3
is a menu production:
Disk <== CALL Listdev ("disc")
To invoke a production, point the cursor to that line in a menu and press Return. The
text to the left of the production symbol is the text that appears in the menu. To the
right of the production symbol are one or more statements that the SeeView interpreter
executes when you invoke the menu line with the Return key.