GUI ScreenIO for Windows |
Optional code statements are used to label and classify optional blocks of COBOL code in your template.
%name:type:
where name is the label of this block of COBOL code, and type is used to specify its context; that is, whether it applies to a control, an event, or some other situation.
Type may be used by the program generator as an implied conditional; see below.
Optional code types that are specific to certain entities carry an implied conditional that the entity must be present in the panel in order for the imperative statement to be executed, even if an imperative statement explicitly includes the entity.
For example, an optional code block that is specific to a listview control (SUPPORT-CODE:LISTVIEW) will only be included if a listview is defined on the panel.
Type | Description |
BUTTON-SWITCH: | Defines code to manage a pushbutton that may be enabled or
disabled by your program.
Note: This code will need to be modified in the generated program to implement the behavior you require in your application. If subject of !!INCLUDE: the generator will: Include the code that follows this statement once for each pushbutton that may be enabled/disabled by your program. %name:BUTTON-SWITCH: Example:%BUTTON-SWITCH-CODE:BUTTON-SWITCH:
|
EVENT-CODE: | Defines code to manage an event.
Note: This must be coordinated with the structure of your PANEL-LOOP: code; if you use EVALUATE in your panel loop, then this would insert a WHEN clause; if you used IF statements, you'd insert an IF/ELSE/END-IF. You will find it easier to use EVALUATE. If subject of !!INCLUDE: the generator will: Include the code that follows this statement once for each menu or pushbutton event that may be returned by the panel. Usually included in the PANEL-LOOP. %name:EVENT-CODE: Example:%HANDLE-EVENT:EVENT-CODE:
|
FIELD-NAME:field-name | Defines code to manage controls (data fields).
Note: FIELD-NAME code is not included if a SUPPORT-CODE block is available for the field. If subject of !!INCLUDE: the generator will: If field-name is absent,
%name:FIELD-NAME:field-name Example:%FIELDLOADER:FIELD-NAME:
|
HOT-EVENT: | Defines code to manage a hot field event.
If subject of !!INCLUDE: the generator will: Include the code that follows this statement once for each hot field event that may be returned by the panel. Usually included in the PANEL-LOOP. %name:HOT-EVENT: Example:%HANDLE-HOT-EVENT:HOT-EVENT:
|
IMAGE-EVENT: | Defines code to manage an image field event.
If subject of !!INCLUDE: the generator will: Include the code that follows this statement once for each image field event that may be returned by the panel. Usually included in the PANEL-LOOP. %name:IMAGE-EVENT: Example:%HANDLE-IMAGE-EVENT:IMAGE-EVENT:
|
MENU-SWITCH: | Defines code to manage a menu item that may be enabled,
disabled, checked, or unchecked by your program.
Note: This code will need to be modified in the generated program to implement the behavior you require in your application. If subject of !!INCLUDE: the generator will: Insert the snippit that follows this statement once for each menu item that may be enabled/disabled or checked/unchecked by your program. %name:MENU-SWITCH: Example:%MENU-SWITCH-CODE:MENU-SWITCH:
|
MISC-CODE: | Defines general-purpose code. It is useful for
defining second-level drivers for use by other entities.
If subject of !!INCLUDE: the generator will: Insert the code that follows this statement when it is explicitly included using an imperative statement. %name:MISC-CODE: |
PANEL-COPYS: | Causes the code generator to insert all of your panel
copybooks at this location.
You may modify this to include the subdirectory where your copybooks are located, although it is better practice to specify this as a compiler option rather than to hard-code it in your program. %name:PANEL-COPYS: |
PANEL-LOOP: | Defines code to manage a panel. The standard logic
for handling a GUI ScreenIO panel consists of a loop that calls GUI
ScreenIO to display the panel.
If subject of !!INCLUDE: the generator will: Include this code where it is requested. %name:PANEL-LOOP: Example:%DRIVER-PARAGRAPH:PANEL-LOOP:
|
SELECTOR-EVENT: | Defines code to manage a selector field event.
If subject of !!INCLUDE: the generator will: Include the code that follows this statement once for each selector field event that may be returned by the panel. Usually included in the PANEL-LOOP. %name:SELECTOR-EVENT: Example:%HANDLE-SELECTOR-EVENT:SELECTOR-EVENT:
|
SEL-CHANGE: | Defines code to manage a selection-change field event.
If subject of !!INCLUDE: the generator will: Insert the code that follows this statement once for each selection-change event that may be returned by the panel. Usually included in the PANEL-LOOP. %name:SEL-CHANGE: Example:%HANDLE-SELECTION-CHANGE:SEL-CHANGE:
|
SUPPORT-CODE:controltype | Defines code to manage specific types of controls;
presently, COMBOBOX, LISTBOX, LISTVIEW, and TREEVIEW controls.
Note: This code generally appears as a performed routine in the program; it is usually necessary to coordinate the names of paragraphs generated by this type of entity with the code that invokes it. If subject of !!INCLUDE: the generator will: Include the code that follows this statement once when it is explicitly included, generally according to a conditional statement which tests for a specific type of control (see the conditional statement CONTROLTYPE). %name:SUPPORT-CODE:controltype |
USER-CODE: | Defines standard user code.
If subject of !!INCLUDE: the generator will: Include the code that follows this statement in the generated program. %name:USER-CODE: |
© 2000-2019 Norcom, all rights reserved |