8.6 Using Menudef

Menudef has six different forms that you see as you are working with a menufile:

gifs/20000000.gif The Menu File Description form shows the commands associated with the menufile and may enable or disable built-in menu commands.

gifs/20000000.gif The Menu Description form shows the name of a menu and its commands.

gifs/20000000.gif The Menu Picture screen shows a menu as it appears with menu.

gifs/20000000.gif The Choice Description form shows the name of the choice (the text displayed on the menu) and its commands.

gifs/20000000.gif The Parameter Form Picture screen shows a parameter form as it appears with menu.

gifs/20000000.gif The Parameter Field Description form shows the name of the parameter field (the menu variable name) and its description.

There is one Menu File Description form in a menufile. It contains the optional commands that menu executes when the menufile is entered. Each menufile begins with a menufile statement. The menufile statement names the menufile and optionally enables or disables built-in menu commands.

There are one or more Menu Description forms, each one containing the name of the menu and optional commands that menu executes when the menu is entered. You can refer to a menu by its menu name in the Menu Description form. The Menu Description forms are ordered in the sequence they were added originally. This sequence determines the next and previous menus in menudef but has no effect on the order of menus in menu except for the first menu (without the -f flag).

Associated with each Menu Description form is a Menu Picture screen. The Menu Picture screen shows the menu as it is displayed by menu and consists of choices and background text. Choices are the items you want the operator to be able to select in a menu. Background text is any other text on the screen.

Each choice in a Menu Picture screen is associated with a Choice Description form. A Choice Description form describes a choice in a menu and consists of a name (the text seen in the Menu Picture screen) and commands that menu executes when the choice is selected.

Each Choice Description form can be associated with an optional Parameter Form Picture screen. A Parameter Form Picture screen shows the parameter form as it is displayed by menu and consists of parameter fields and background text.

Each parameter field in a Parameter Form Picture screen is associated with a Parameter Field Description form. Each Parameter Field Description form describes a parameter field accessible on an input form. Parameter fields describe menu variables you want the operator to enter values for. The values for the variables defined on the parameter form are available to the choice commands. Background text is any other text on the screen.

The screen below shows the relationships between the different screens in a menufile containing two menus: entry and report. When you enter menudef, you are initially in the Menu Definition form of the "first" menu entry in the example. The function keys required to get to the different screens are mentioned besides the arrows leading to the other screens.

gifs/00000001.gif