Graphical vs Textual Modes

As previously discussed, ACUCOBOL-GT marries two diverse technologies: text-only displays and graphical displays.

When we talk about an ACCEPT or DISPLAY statement, the term textual refers to the forms of these verbs that handle text-based elements. Specifically, textual refers to Format 1 of both verbs, plus any referenced Format 1 Screen Section items. The term graphical refers to the forms of these verbs that handle controls. Specifically, this includes Format 14 of the DISPLAY verb, Format 7 of the ACCEPT verb, and Format 2 of any referenced Screen Section items. Note that a LABEL control (which is a block of text) is considered a graphical element, not a textual display.

When thinking about the textual display, you may find that it helps to think of it as a rigid grid of character cells. Each cell in the grid holds one character, and the cell's size and location is fixed. This simulates the nature of text-only monitors. In this mode, you can display five characters starting at column 1 and expect the fifth character to be placed in column 5.

The graphical display is then layered on top of the textual display. The graphical display is not rigid. You can place elements anywhere on the screen, not just in the fixed character cells. In this mode, displaying a label of five characters starting at column 1 will not necessarily place the fifth character in column 5 (because the label's font may be variable-pitch). See Coordinates for more information on screen coordinates.

Two COBOL reserved words are available to mark Screen Section entries for use in the graphical or textual environment. These reserved words are: GRAPHICAL and CHARACTER. These markings have the effect of restricting the display of the elements nested within them. The elements contained in a GRAPHICAL Screen Section entry are displayed only when the program is run on a graphical system. The contents of a CHARACTER Screen Section entry are displayed only when the program is run on a character-based system. When the program attempts to execute a marked entry on a system of the opposite type, that entry is ignored (for an extended description of these labels and their use, see Screen Description Entry in the ACUCOBOL-GT Reference Manual).