CALL io.pul.dwn.spw (menu, $list, $entry, key, $name, $file, idbty, irec, iacc, inorun, index)
This routine can be called only during the system initialization process. pulldown menu definitions developed by Adept are contained in the module initialization routines (BASMOD.OV2, VISMOD.OV2, etc.). System customizers should add new calls to this routine in their own initialization routines.
menu Real value (interpreted as an integer) that specifies the number of the pulldown menu to which the new entry is to be added. Menu numbers must be greater than or equal to zero. Number of menu group that this pulldown will be added to. The default menu groups are:
0 *none* Standard windows
1 ai.pmu Top of screen
2 mu.pmu Menu editor
3 ed.pmu Sequence editor
4 vw.pmu Vision window
5 du.pmu DBM utilities
6 vc.pmu Restricted to use by the vision windowYou may also define your own pulldown menu groups.
$list Name of the top-level pulldown item. If this name has not been used previously in the menu group, a new top-level item is created.
$entry Name of an individual item in the pulldown defined by $list. A maximum of 30 items can be created for each list.
key Key-press command that is generated when the pulldown entry is selected. This parameter must be set to ky.m.menu, ky.menu, ky.m.spawn, ky.spawn, ky.seq, or ky.m.seq.
The values ky.menu, ky.spawn, and ky.seq are used for generating a menu page, spawn routine, or control sequence that supersedes the current activity. For example, if a menu page is being displayed and a pulldown entry is selected that has ky.menu specified, a new "pop-up" menu page will be generated on top of the existing menu page.
The values ky.m.menu, ky.m.spawn, and ky.m.seq are equivalent to executing a Shift+Exit (Shift+F4) followed by a ky.menu, ky.spawn, or ky.seq command, respectively. These commands terminate any executing activity and then display a new menu page, call a new spawn routine, or call a new control sequence.
$name Name of the menu page, spawn routine or control sequence to be invoked (must be 15 characters or less). This name (which can be an empty string) cannot be longer than 15 characters. If a menu page is to be displayed and $name is not specified, the page name is extracted from the first array element of the "menu page name" field of the record currently opened in the primary database (see below). If no page is specified and the primary database does not contain a "menu page name" field, the page name "main" is assumed.
$file Menu file name, overlay file name, or resource module name. This name, which can be an empty (null) string, cannot be longer than 12 characters.
If a menu page is to be displayed and both $name and $file contain empty strings, the file name will be extracted from the second array element of the "menu page name" field of the primary database (see below).
If a spawn routine is to be executed, a file name should be specified only if the program is contained in an overlay (that is, the program is not memory-resident).
If a control sequence is to be executed and the resource module is left undefined, then that control sequence must be a part of the default module as specified on the "control sequence module" record of either the MOWINI.DB or VWINI.DB initialization databases.
idbty Optional primary database type for menu command and spawn routines. Default is 0. See System Database Descriptions for further details.
irec Optional record number or subroutine "arg". For menu commands, this is the number of the record in the primary database that is to be opened for editing, zero to edit the currently opened record. For spawn routines, the is the value of the spawn routine "arg". Defaults is 0.
iacc Optional operator access level required for invoking this entry (0 to 7). Default is 1.
inorun Optional flag that indicates if the item is unselectable if a sequence is running. A non-zero value indicates the item cannot be selected during execution.
index Optional index for any associated flags word. The index can range from 0 to 63. If the index is 0 or unspecified, no flags word is referenced. The bits in the referenced flags-word array element control special attributes of the pulldown entry. The special attributes include forcing any associated entries to be disabled, and drawing a check mark in the first column of the label for all associated entries. See the description of io.pul.dwn.sfg( ).
The settings of the flags words can be altered by calling the routine io.pul.dwn.sfg( ). Each time an entry is displayed, its flags word is referenced and any special processing that is indicated is performed.
The same flags-word array element can be referenced by multiple entries.
This routine creates a pulldown menu entry that, when activated, either displays a new menu page or executes a spawn routine or a control sequence. This type of pulldown entry produces exactly the same effect as a menu or spawn-routine button or a sequence button on a menu page.
This routine can be called only during the system initialization process, and must be executed once for each pulldown menu entry of this type. Once a pulldown menu entry is defined, it stays in effect until the AIM system is stopped and restarted.
If this routine specifies a pulldown menu or pulldown list that does not exist, the menu and/or list is created as necessary. Within each menu and list, the order of appearance of each list or entry is dictated by the order in which calls to this routine and io.pul.dwn.evt( ) are executed. Within a pulldown menu, when a new list is created, it is placed to the right of all existing lists. Within each pulldown list, when a new entry is specified, it is placed below the existing entries.
This routine constructs the appropriate command IO buffer qualifier and data section given the following information:
1. The key-press command ("ky.__ ") that is generated when the pulldown menu item is selected.
2. The name of the menu page, spawn routine or control sequence that is invoked if a new menu page is to be brought up or control is to be passed to a menu spawn routine or control sequence.
3. The name of the disk file that contains the menu page or the optional name of the overlay file that contains the spawn routine or the resource module for the control sequence.
4. Optional operator access level required to invoke this pulldown item.
5. Optional flag that indicates if the item is unselectable when a sequence is running.
6. Optional index for a flags word that can be used to control special attributes of the pulldown item (e.g., turn on check mark, force unselectable).
io.pul.dwn.evt (menu, $list, $entry, key, int1, int2, int3, acc, norun, index)
io.pul.dwn.sfg (menu, index, flags)