Difference between revisions of "MENU"

From Recital Documentation Wiki
Jump to: navigation, search
(Products)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
Menus
 
 
 
 
==Purpose==
 
==Purpose==
 
Activate the currently defined menu
 
Activate the currently defined menu
Line 28: Line 24:
  
 
==See Also==
 
==See Also==
[[@...MENU]], [[MENU AT]], [[MENU COMMAND]], [[MENU FIELDS]], [[MENU FILES]], [[MENU FORMAT]], [[MENU FRAME]], [[MENU QUERY]], [[MENU SCOPE]], [[SET SCREENMAP]], [[MENU()]], [[MENUITEM()]]
+
[[@...MENU]], [[MENU AT]], [[MENU COMMAND]], [[MENU FIELDS]], [[MENU FILES]], [[MENU FORMAT]], [[MENU FRAME]], [[MENU QUERY]], [[MENU SCOPE]], [[MENU()]], [[MENUITEM()]], [[SET MCONFIRM]], [[SET SCREENMAP]], [[SET WRAP]]
 
+
  
 
==Description==
 
==Description==
Line 74: Line 69:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Menus]]
 
[[Category:Menus]]
 
[[Category:Menus Commands]]
 
[[Category:Menus Commands]]

Latest revision as of 14:43, 12 November 2009

Purpose

Activate the currently defined menu


Syntax

MENU

[EXIT]

[HELPFILE <.hlp filename> | (<expC1>)]

[NOREFRESH]

[OFF]

[PULLRIGHT]

[QUIT]

[SAVE]

[SCREENMAP]


See Also

@...MENU, MENU AT, MENU COMMAND, MENU FIELDS, MENU FILES, MENU FORMAT, MENU FRAME, MENU QUERY, MENU SCOPE, MENU(), MENUITEM(), SET MCONFIRM, SET SCREENMAP, SET WRAP

Description

The MENU command activates a series of menu options which have previously been defined with the @...MENU command. The menu options are displayed at the locations on the screen as specified by the @...MENU commands. A menu option can be selected by moving to the required option with the cursor and pressing the [RETURN] key, or entering the first letter of the option. If there is more than one menu option starting with the same letter, then the nearest option with the specified letter is selected.

If a selection is made on a menu item which does not have any commands associated with it, the menu is exited, the MENU() function returns the menu option number selected, starting at 0, and the MENUITEM() function returns the menu option as a character string. If no selection was made, then MENU() returns -1 and MENUITEM() returns "". These two functions can be used on exiting from a MENU or in the menu COMMAND lines.

If SET MCONFIRM ON has been invoked, the cursor will wait on the menu option that matches the key pressed. That menu option will only be executed when the [RETURN] key is pressed.


Keyword Description
EXIT The menu is exited after the first selection rather than being reactivated and refreshed. If the command NOEXIT is included anywhere in the selected menu item commands, it will overwrite the EXIT keyword. When the EXIT keyword and the NOEXIT command are used in conjunction, they can cause some menu items to keep the MENU active and others to leave the MENU once the command has been executed.
HELPFILE <.hlp> A helpful text file can be associated with the menu. The <.hlp filename> will be displayed in a read-only window for viewing when the [HELP] key is pressed. The window will be labeled "Operating instructions." The file name can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then ".hlp" is assumed. The command, INSTRUCT, must be set ON when using this option.
NOREFRESH Refreshing of a menu item after executing its command is disabled.
OFF The display of messages in the message line is disabled.
PULLRIGHT Any pulldown menus are displayed to the right of their corresponding menu options. If PULLRIGHT is not specified, pulldown menus are displayed directly below their corresponding menu options. Cursor movements handle subsequent selection of menu options.
QUIT When the QUIT option is specified, the [ABANDON] key exits the menu.
SAVE The menu options are not released and can be activated by another MENU command.
SCREENMAP The screen is handled as if SCREENMAP is ON even when it is OFF.


When a pulldown menu is activated, the [CURSOR UP] and [CURSOR DOWN] keys operate within the pulldown menu itself and the [CURSOR RIGHT] and [CURSOR LEFT] keys move between the options of the menu from which the pulldown was activated.


Example

@0,0 menu "Status";
  command "do statotal";
  help "Total amount of goods ordered for the account prefix."
menu quit


Products

Recital