Menu Header Screen
Each menu record has a Header that controls the overall behavior of the menu. When "Header" is selected from the Menu Editor Options menu, the Header form is displayed.
You will step through this form and fill in the parameters that define your menu. It is helpful to keep the following default functions and keystrokes in mind:
F1 |
<HELP> |
F2 |
<CANCEL> or <EXIT> |
F3 |
<GOLD KEY> |
F4 |
<EXECUTE> |
F5 |
<SEARCH> |
F6 |
<HOT KEY> |
F8 |
<JUMP> |
Notice on the Header form illustrated above that some of the field labels are terminated with : and some with >. The > character marks a jump field. Press Tab or <JUMP> to jump over the parameters between > characters.
Menu Header Screen Parameter Descriptions
Type<Jump>
Eight different types of menus are supported. Press <SEARCH> to select from a list of types. The menu types are:
Type |
Description |
0 |
Horizontal Menu. Items in the menu are organized side-by-side on one horizontal line. Space between the columns can be set by the argument "h=nn". The default is two spaces. |
1 |
Horizontal, Spreadsheet Style. This menu is displayed on two lines. The first line is a horizontal menu (Type 0). The second line is a prompt message that can change when each menu item is highlighted. The prompt line contains the default Prompt message, the Prompt message for the item, or the items defined in a submenu. |
2 |
Horizontal, Linked Submenus. This is the same as Type 0, except that submenus are anticipated. A submenu may be defined for any item in the menu. The BASIS Menu Editor uses the Arguments in the Header (Sliding, Cascading, etc.) to resolve the position and orientation of the submenu relative to the calling menu item. If "Col=" and "Row=" are specified for the submenu, they will be ignored. For Sliding submenus, the submenu box will be connected into the calling menu box. |
3 |
Vertical. Items in the menu are organized vertically in one left-justified column. |
4 |
Vertical, Linked Submenus. Identical to Type 3, except that submenus are anticipated. A submenu may be defined for any item in the menu. The BASIS Menu Editor uses the arguments in the Header (Sliding, Cascading, etc.) to resolve the position and orientation of the submenu relative to the calling menu item. If "Col=" and "Row=" are specified for the submenu, they will be ignored. For Sliding submenus, the submenu box will be connected into the calling menu box. |
5 |
Two Dimensional. Items in the menu are arranged in rows and columns. The number of columns is specified in the argument by "d=nn". By default, items are placed left-to-right in columns until a row is filled. Then, another row is started. |
6 |
Two Dimensional, Linked Submenus. Identical to Type 5, except that submenus are anticipated. A submenu may be defined for any item in the menu. The BASIS Menu Editor uses the arguments in the Header (Sliding, Cascading, etc.) to resolve the position and orientation of the submenu relative to the calling menu item. If "Col=" and "Row=" are specified for the submenu, they will be ignored. For Sliding submenus, the submenu box will be connected into the calling menu box when possible. |
8 |
Traditional. This example is based on a two-dimensional menu. Items in the menu are automatically numbered. A selection is made by keying in the item number or by highlighting the item with the cursor keys. The menu search feature does not function in Traditional menus. |
Style
Specifies the configuration of the menu box or border.
0 |
No Border (default) |
1 |
Full Border |
2 |
Top open |
3 |
Bottom open |
4 |
Left side open |
5 |
Right side open |
When correctly positioned on the screen, the open-sided menus may be nested to display pull-apart menus. The open side will overlay (blanking out) the border of another menu in the same row or column. The open sides terminate in outward facing corner characters to complete an opening in the border of the underlying menu.
When linked Sliding submenus are specified (menu Types 2, 4, and 6), the submenu should be defined with a full border. The BASIS Menu Editor will connect the submenu to the calling menu box automatically. Linked, Cascading submenus overlay the calling menu box.
Arguments (ARGS)
This is a string of arguments that primarily define the behavior of the menu. Most of the arguments relate to submenus and other specialized menus. Simple menu definitions will require few, if any, arguments.
Arguments are case sensitive and may be entered in any sequence. Although delimiters are not required, separate the arguments by spaces or commas to make the string more readable. The arguments are:
Argument |
Description |
S=n |
Slide submenus relative to the calling menu item. (For linked submenus only.) Position submenu relative to the calling item one column or one row: |
|
1 Down |
|
2 Up |
|
3 Left |
|
4 Right |
|
"S=0" or "S" mean overlay. |
C=n |
Cascade submenus relative to calling menu item. (For linked submenus only.) Offset submenu relative to the calling item: |
|
1 Down and right |
|
2 Up and right |
|
3 Down and left |
|
4 Up and left |
|
"C" means overlay. |
o=nn |
Offset distance for Cascading menus. Offset is 2 columns per row. |
a |
No Auto Menu. By default, submenus are displayed automatically when the calling item is highlighted with the cursor keys. This argument displays submenus for this menu only when the calling item is selected by the user. |
c |
2D Columnwise. This argument specifies that menu items be placed sequentially down the columns rather than across the row. This argument is for Two Dimensional and Traditional menus only. |
d=nn |
2D Columns. If a two-dimensional menu is specified, this argument is required. It specifies the number of columns to be defined. If more columns are defined than can be displayed, the menu scrolls horizontally. |
e |
No Escape. Causes the menu to ignore all keystrokes, except those that select a menu item. The <CANCEL>, or <EXIT>, key is disabled. This requires the user to select an item before exiting the menu. |
f |
Fall off. Any keystroke that is not valid for this menu is treated as an exit. |
h=nn |
Horizontal Spacing. Specifies the number of horizontal spaces between menu items. This argument is for Horizontal, Two-Dimensional, and Traditional menus only. |
k |
Pushkey. This causes the menu to treat any keystroke that is not valid for this menu as an exit, and push the keystroke to the input buffer. This argument can be used in submenus to pass the keystroke to the calling menu. |
P |
Pop on Select. Drops the menu window when any item within it is selected. The default is to leave the window on the screen. |
p |
Pop on Exit. Drops menu window any time the menu is exited. The default is to leave the window on the screen. |
|
Menus rely on the P and p arguments to control when they are dropped. If no pop argument is provided, the menu remains on the screen until the application drops it. |
r |
Reverse. Displays the menu in reverse video. All parts of the menu are reversed, except the border. |
s |
Shadow. Displays a shadow below and to the right of the menu. The shadow is independent of the menu box and may be added to either boxed or nonboxed menus. |
w |
No Wrap. This causes the menu to ignore attempts to move the cursor past the end of the menu. The default is for cursor movements past the end of the menu to wrap around. |
! |
Secure. Disables the !, *, and ^ special keys. The default behavior is to handle special keys in the following manner: |
|
! Prompt for an operating system command and execute it. |
|
* or ^ Prompt for a PRO/5 program name and CALL it. |
Title
This parameter is menu title, which is, by default, positioned in the upper left of the menu border. On horizontal menus, if the menu is not in a box, or if the title ends in a colon, the title is placed before the selections.
If the Title begins with an @ character, a line is drawn under the title text, and the text is centered above the line. If the menu is boxed, this completes a title box at the top of the menu. For example:
Header:
Title=@Title
Column
This parameter is the starting column for the menu. To center the menu horizontally on the screen, use -1. To position the menu relative to the right of the screen, use any value from -2 through -99. To position the menu at the column of the current cursor position, use -100.
Row
This parameter is the top row for the menu. To center the menu vertically on the screen, use -1. To position the menu relative to the bottom of the screen, use any value from -2 through -99. To position the menu at the row of the current cursor position, use -100.
Rows
This parameter will normally be 0 (to calculate the height dynamically, based on menu parameters). Users can require the menu to contain a specific number of rows by keying in a positive number here. To end the menu n rows above the bottom of the screen, enter -n here.
Columns
This parameter will normally be 0 (to calculate the width dynamically, based on menu parameters). Users can require the menu to be a specific number of columns by keying in a positive number here. To end the menu n columns before the right side of the screen, enter -n here.
Border
This parameter specifies the color code for the menu border. The color code identifies both a foreground color and a background color. The default is specified in the (MENU_BORDER) configuration global, or the border is the current color setting of the current device. Press the <SEARCH> key, or see Color Codes for more detail.
Window
This parameter specifies the color code of the menu window. If the menu has a border, the window is the area inside the border; otherwise, it is the show area of the menu. The (MENU_WINDOW) configuration global specifies the default, or the window is the current color setting of the current device. Press the <SEARCH> key, or see Color Codes for more detail.
Select
This parameter specifies the display color code of the highlighted menu item. The default is specified in the (MENU_SELECT) configuration global. Press the <SEARCH> key, or see Color Codes for more detail.
HighChar
This parameter is the ASCII character that indicates which character in the menu item to highlight and use as the selection character. There is no default. The HighChar character is entered just left of the character to be highlighted in the Item parameter on the Detail screen. For example, assume that a tilde "~" is entered as the HighChar:
Detail Items
~John
Ja~mes
Josa~fina
The selection character of a menu item can also be identified by entering its character position in the Detail screen Highlight parameter. If both a HighChar character and the Highlight parameter are used, the right-most character will be highlighted. If neither is used, the first character of the item is the selection character.
While this feature will be provided in any future release, the implementation may change. It could become necessary to revise menu definitions that use the HighChar parameter.
Newline
This parameter indicates the break point for multiline menu titles and menu items. It can be used in both the Title parameter of the Header screen and the Item parameter of the Detail screen. Place the new line character in the first position to the left of the string you want to be on the next line.
Titles must begin with the @ character for the new line character to be recognized. This is not required in menu items. The default is the EUS Toolkit new line character.
ColChar
This parameter indicates the break point for separating titles and menu items into columns. It can be used in both the Title parameter of the Header screen and the Item parameter of the Detail screen. Place the column character in the first position to the left of the string you want in the next column. There is no default.
Titles must begin with the @ character for the column character to be recognized. This is not required in menu items.
While this feature will be provided in any future release, the implementation may change. It could become necessary to revise menu definitions that use the ColChar parameter.
Prompt<Jump>
This parameter is the global prompt message to be displayed at the bottom of the screen, unless overridden at the detail level. Global prompt messages beginning with "+" are appended to detail prompt messages. Global prompt messages ending with "+" are inserted in front of detail prompt messages.
Helpfile
This parameter is a string expression that names the file to be used when the user presses <HELP> while in this menu. If the string expression is specified in either of the two formats shown below, the global string (HELPFILE) is used to locate an ASCII help-screen file. Use the first format to access an indexed helpfile; and the second format to access a searchable helpfile:
helpfile@key |
Indexed ASCII helpfile |
helpfile;helpitem |
Searchable ASCII helpfile |
If neither format is used, or if the global string (HELPFILE) does not specify the path to an indexed helpfile, the helpfile is presumed to be a TAOS form.
Default
This parameter identifies the menu item to be highlighted when the menu is first displayed. Enter the selection character of the default menu item. It must be an upper-case letter. This item is selected if the user presses the Enter key without making another selection.