SeeView Manual
SeeView Language Elements
HP NonStop SeeView Manual—526355-004
5-8
Menus
In the program in Example 5-5, the directives have these functions:
•
?MENU MyMenus declares the name of a text cache used for different menus. You
need not declare separate menu caches for each menu to be displayed. The
CACHE target option of the WINDOW statement enables you to navigate
through a cache searching for a target text object.
•
?PROC PullDown displays a list of menu options below the caller’s menu by using
the WINDOW [ ] MENU CACHE #target statement.
•
?PROC Listdev displays a list of selected devices in a window adjacent to the
caller's menu by using the PUP LISTDEV command.
•
?SECT Main displays the initial Devices and Utility menus.
Example 5-5. Example of Menus
?MENU MyMenus { Declare text cache "MyMenus"
{------------}
Devices <== CALL PullDown ("Disk", "CALL Listdev(#menutext)")
Disk
Tape
Term
Printer
Expand <== CALL Listdev ("type 63")
*
Utility <== CALL PullDown ( "TACL" )
TACL <== LINE 4; OPEN tacl;
FUP <== LINE 4; OPEN fup;
PUP <== LINE 4; OPEN pup;
VIEWSYS <== RUN viewsys
*
?PROC PullDown ( #target, #production )
{-------------------------------------}
PARM #target; { Target text in menu cache.
PARM #production; { Default production, if any
{ "" implies no default production.
BELOW; { Position BELOW caller's menu.
WINDOW [] MENU #production { [] references caller's menu.
HEAD ""
CACHE #target UNTIL /*/;
{ Window on that menu for #target.
?PROC Listdev ( #DeviceType ) { Declare procedure "Listdev"
{---------------------------}
PARM #DeviceType; { #DeviceType is callers parameter
TASK pup; { Assert PUP task/process.
BESIDE; { Position beside invoked menu.
WINDOW pup, "listdev " & #DeviceType { Window on Pup output from Listdev
NOCURSOR { Do nt move cursor to pup window.
NOFRAME; { Do not re-draw window if exists.
?SECT Main { Declare main sect to do setup
{---------}
PAGE 2; { On terminal page 2.
WINDOW MyMenus MENU HEAD "System" { Declare first pull-down menu
CACHE /devices/ FOR 1 SIZE 13;
RIGHT:13; { Move to right for next menu
WINDOW MyMenus MENU HEAD "System" { Declare second pull-down menu
CACHE /utility/ FOR 1 SIZE 13;










