1 05/02/90  menu_get_choice
 2 
 3 Syntax as a command:  menu_get_choice menu_name {-control_args}
 4 
 5 
 6 Syntax as an active function:  [menu_get_choice menu_name {-control_args}]
 7 
 8 
 9 Function:  gets a menu choice, given the menu called "menu_name" on
10 display in a window, from the user and prints or returns it.
11 
12 
13 Arguments:
14 menu_name
15    is the name that was assigned to the menu when it was stored.
16 
17 
18 Control arguments:
19 -default_fkeys STR, -dfkeys STR
20    specifies the keys to be used if the terminal does not have function
21    keys or the proper set of function keys.  See "Notes on Function
22    Keys" below.
23 -function_keys STR, -fkeys STR
24    specifies the keys to be used to simulate function keys.  This
25    control overrides any function key definitions already established
26    for the terminal.  See "Notes on Function Keys."
27 -io_switch STR, -is STR
28    specifies the name of an I/O switch for a window, where STR is the
29    name of an I/O switch for a window.  The default is user_i/o.
30 
31 
32 -pathname PATH, -pn PATH
33    is the pathname of the value segment (of which the value suffix is
34    assumed) in which the menu is stored.  If not given, the user's
35    default value segment (>udd>Project_id>Person_id>Person_id.value) is
36    searched for the menu.
37 
38 
39 Notes on function keys:  Many terminals have function keys.  On many of
40 these terminals (such as the Honeywell VIP7801), they are labeled "F1",
41 "F2", etc.  If you type one of these function keys, menu_get_choice
42 returns the string "F*", where * is a one- or two-digit number
43 signifying which function key was pressed.  It is possible to specify
44 your own set of keystrokes to be used in lieu of the terminal's
45 function keys, or to specify a set of keystrokes to be used if the
46 terminal does not have enough function keys.  These are done by using
47 -dfkeys and -fkeys, which are followed by a string.  Each character in
48 this string is used to simulate a function key.  The first character is
49 used to simulate function key 0, the next to simulate function key 1,
50 etc.  To simulate a given function key, type esc-C, where C is the
51 character corresponding to the function key.  Thus, if the string is
52 "0123456789", typing esc-2 returns F2.
53 
54 
55 The -fkeys control argument is used to designate keystrokes to be used
56 instead of any that might be defined for the terminal; if given, then
57 the simulation of function keys always takes place.
58 
59 
60 The -dfkeys control argument is given if you want to use the
61 terminal-defined function keys if possible, but wish to specify key
62 sequences to be used to simulate function keys if necessary.  Each
63 character in the string following -dfkeys corresponds to one function
64 key.  If the character is a space, it means it makes no difference if
65 the terminal has a function key corresponding to that position.  If the
66 character is not a space, that character is employed to simulate a
67 function key if necessary.  If the terminal does not have a function
68 key for every nonspace character in the string, then the -dfkeys string
69 is used to simulate function keys.
70 
71 
72 For example, if the string " ?p q" is specified with the -dfkeys
73 argument, it means that you do not care whether the terminal has a
74 function key 0, or a function key 3, but you wish to use function keys
75 1, 2, and 4.  If any one or more of these three function keys is not
76 defined for the terminal type then the -dfkeys string is used to create
77 the function key definitions.  IE., esc-?  substitutes for F1, esc-p
78 substitutes for F2, esc-q substitutes for F4, and no other function
79 keys are available.  However, if all three of these function keys are
80 available then no substitution is made and all the function keys
81 defined for the terminal type are available.
82 
83 
84 If neither the -fkeys nor the -dfkeys control arguments are used, and
85 the terminal has no function keys then the default function key string
86 used is "0123456789".
87