SeeView Manual
SeeView Language Elements
HP NonStop SeeView Manual—526355-004
5-7
Menus
Example 5-4 is an example of a SeeView program that associates a default production
with a list of device types, or objects, in a menu. In this program, the directives have
these functions:
•
?MENU DevTypes declares the names of device types. Only the Expand object
requires an explicit production because the object name Expand is unknown to
PUP. The other object names, Disk, Tape, Term, and Printer, are known to PUP.
•
?PROC Listdev displays a list of devices of the selected device type in a window
beside the caller’s menu by using the PUP LISTDEV command.
•
?PROC HelpDev displays a simple advisory help message indicating what will
happen when you press Return or Shift-Return.
•
?SECT Main displays the initial device type menu and associates the default
production “CALL Listdev(#MENUTEXT)” with the menu.
You execute a default production when you point the cursor to a menu item that does
not contain a production symbol and press Return.
Shift Productions
When you select a menu item and press Shift-Return, a shift production is executed.
The WINDOW statement in the Main section of Example 5-4 declares both a default
production and a shift production. To invoke the shift production, select one of the
menu items (Disk, Tape, Term, Printer, or Expand) and press Shift-Return. In this
example, when you select Disk and press Shift-Return, ?PROC HelpDev displays the
following message:
Shift-Return displays help, Return displays disk
Default productions and shift productions provide a powerful way of associating
procedural rules with entire sets of menu items and the objects that they represent.
Pull-Down Menus
Menus can display other menus and windows through the use of the WINDOW
statement. See Example 5-5.
?SECT Main { Declare main sect to do setup
{---------}
PAGE 2; { On terminal page number 2.
WINDOW DevTypes { Declare a menu window with a
MENU "CALL Listdev(#MENUTEXT)"{ default production
,"CALL HelpDev(#MENUTEXT)"{ shift production
CACHE /disk/ UNTIL /*/ { where #menutext is the text
SIZE 13; { in the selected menu.
Example 5-4. Example of a Default and Shift Production (page 2 of 2)