$MENU_BAR

Assign the position, video attributes, and behavior of menu bars.

$MENU_BAR {=} Location{,Background}{,Item}{,Mnemonic}{,TRIG}

Arguments

  • Location—indicates whether the menu bar appears at the top or bottom of the application screen in character mode. Use T to indicate the top of the screen and B for bottom. It is recommended to use the top of the screen, not the bottom.
  • Background—video attributes of the menu background.
  • Item—video attributes of the menu item that currently has focus.
  • Mnemonic—video attributes of the highlighted mnemonic letter of menu items.
  • TRIG—causes ^PULLDOWN to activate the form-level pullDown trigger if that trigger contains ProcScript; otherwise, it activates the application-level pullDown trigger.

    Caution: It is strongly recommended that you do not use pullDown triggers; they are provided for compatibility with pre-Version 5.2 applications.

Defaults

Assignment file: Any application assignment file
Section: [SETTINGS]
Default value: None

Description

$MENU_BAR enables you to determine where and how the menu bar should appear without modifying any of the application definitions. The setting in the assignment file overrides whatever is defined elsewhere in the application.

Many of these definitions are meaningless when the application is running in a GUI environment, since the GUI itself often determines how menu bars appear and behave. In these cases, only the TRIG parameter is relevant. In general, you should use the $MENU_BAR setting only in character mode or to help switch between character mode and various GUIs.

The Background, Item, and Mnemonic arguments each specifiy one or more video attribute codes. For more information, see Video Attributes .

You can define more than one video attribute for each of the Background, Item, and Mnemonic parameters. When combining video attributes, separate them with commas and enclose them in parentheses, as shown in the example.

The default, as used under character mode, is T,INV,BRI.

TRIG

When TRIG is present, the moment when a pullDown trigger is activated depends on how the application is running:

  • In character mode, ^PULLDOWN activates a pullDown trigger when the application-level menu bar is activated:
    • If only an application-level menu bar has been declared, the first ^PULLDOWN activates the pullDown trigger.
    • If both an application-level and form-level menu bar have been declared, the first ^PULLDOWN activates the form-level menu bar without activating the pullDown trigger. The second ^PULLDOWN (which toggles to the application-level menu bar) activates a pullDown trigger.
    • If only a form-level menu bar has been declared, ^PULLDOWN never activates the pullDown trigger.
  • In GUI mode, ^PULLDOWN activates the pullDown trigger whenever any menu bar is activated.

The TRIG parameter allows backward compatibility with pre-Version 5.2 applications that activate a pullDown trigger when the structure editor function ^PULLDOWN is encountered. Without TRIG, any ProcScript in pullDown triggers is ignored.

$MENU_BAR

To make the menu bar appear at the top of the screen with menu items displayed as purple letters on a white background (40 + 7) and the active menu item displayed brightly with white letters on a purple background (56 + 5) with the menu mnemonic underlined, use the following assignment:

$MENU_BAR = TOP, COL=47, (BRI,COL=61), UND