[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Add_Topic


Purpose   Adds a new topic to a menu.

Decln.    Add_Topic(var
          M:Nest_Menu;N:MenuStr;A:Boolean;Key:char;code:integer;Sub:MenuPtr
          );

Remarks   M is the name of the menu variable to which the topic will be
          added.
          N is the topic text, i.e. the string that will be displayed in
          the menu.
          A indicates if the topic is selectable or non-selectable. Set to
          true for normal selectable topics.
          Key is the character code of a hotkey that can be used to execute
          the topic. Set to #0 to disable the hotkey.
          Code is an integer code that will be passed to the despatcher
          procedure to indicate that the user selected this topic. Set the
          code to zero if a sub-menu is going to be called.
          Sub is the address of a sub-menu that is to be called if the
          topic is selected. Set to NIL if the topic executes a despatcher
          procedure rather than displaying a sub-menu.

          Add topics in the order that they are to appear. When a topic is
          added, the Toolkit assigns a topic number. This topic number is
          used to modify or delete topics.

Example

BEGIN
    ADD_TOPIC(PRINT,'RESET PRINTER',TRUE,#0,301,NIL);
    ADD_TOPIC(PRINT,'SET CONDENSED',TRUE,#0,302,NIL);
    ADD_TOPIC(PRINT,'REPORT MENU (ALT-R)',TRUE,#147,0,@REPORT);
END;

Three topics are added to the menu variable PRINT. When selected, the first
two topics call the despatcher with codes of 301 and 302, respectively. The
third topic calls the Report menu.

See Also: Initialize_Menu Modify_Topic Delete_A_Topic
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson