The character-based version of the runtime system emulates graphical windows and controls by displaying characters with particular attributes that approximate the look and feel of a graphical system.
The following standard characters are used by default to represent various graphical components:
"-", "|", "+", "=", "*", ".",
"^", "v", "<", ">", " ", "#"
Terminals that support a line drawing set or a special extended character set, or both, can be configured to use these special characters. The configuration method is similar to the one used for line drawing, described in Line Drawing.
To support the substitution of line drawing characters and extended characters, there are two terminal database (a_termcap) functions: GO-GUI-MAP and GF-GUI-MAP.
The GO-GUI-MAP function uses a list of standard characters that correspond to line segments and other special characters when displayed in the terminal's graphics mode. This is similar to the GM function used for line drawing. The Terminal Manager turns the terminal's graphics mode on by sending the GO code. The GO code is followed by normal characters which are interpreted by the terminal into their corresponding special characters. When all of the special character elements have been displayed, the terminal is set back to normal mode with GF.
The GF-GUI-MAP function provides a method for specifying substitute standard characters for some or all of the graphical components. When these characters are used, they are displayed in normal (not graphics) mode. The Terminal Manager gives preference to the characters specified in GO-GUI-MAP. If a character in the list is preceded with \0 (backslash, zero), the Terminal Manager uses the corresponding character in the GF-GUI-MAP. If the character cannot be determined from the GO-GUI-MAP or GF-GUI-MAP functions (either list may be incomplete or there may be a \0 in the same position in both lists), the Terminal Manager uses the default character. For more information about defining the list of special characters, see the entry for GUI_CHARS in Appendix H. Configuration Variables.
The characters listed in the GO-GUI-MAP and GF-GUI-MAP correspond, in order, to the following graphical components. The character in parentheses is the default character:
1. | System menu button | (*) |
2. | Floating window title left corner | (+) |
3. | Floating window title right corner | (+) |
4. | Floating window title fill character | (=) |
5. | Minimizer | (.) |
6. | Maximizer | (^) |
7. | Scroll bar up button | (^) |
8. | Scroll bar down button | (v) |
9. | Scroll bar left button | (<) |
10. | Scroll bar right button | (>) |
11. | Scroll bar page area | ( ) |
12. | Scroll bar thumb | (#) |
13. | Left entry field box and check box character | ([) |
14. | Right entry field box and check box character | (]) |
When a program executes, the runtime system evaluates the terminal's display capabilities and determines the special display attributes to apply to select control elements. These control elements include the control's key letter, push-button text, and a key letter that is part of the push-button text when the user presses the button with the mouse. The runtime system applies the first supported capability to each element as follows.
Key letter:
Selected push-button text:
Key letter in selected push-button text:
If the selected push-button text attribute is reverse video, apply to the key letter:
If the selected text attribute is underline, apply to the key letter:
If the selected text attribute is intensity toggle, apply to the key letter:
Intensity toggle (key letter is indistinguishable from the other text)