WINDOW PUT
Reprint Current Thoroughbred Basic Window
This directive reprints all or part of the current Thoroughbred Basic Window based on text, attribute, and/or color maps such as those returned from the WIN ( GET ) function.
Syntax
Section titled “Syntax”WINDOW PUT [delim-1] (map-string)
WINDOW PUT [delim-1] delim-2delim-1- determines the interpretation of map-string:
not specified = text, attribute, and color strings
ATTR = attribute string only
COLOR = color string only
TEXT = text string only
delim-2- determines how much of the extent specified by delim-1 is to be addressed:
blank = complete string for full Thoroughbred Basic Window CHAR = only those character positions specified (see below) ROW = only the row specified (see below)
map-string- is any string whose contents is interpreted based on delim-1. If delim-1 is not specified, map-string is included in delim-2.
Remarks
Section titled “Remarks”This function is generally available starting with release level 8.1.
The options available for delim-1 are:
delim-1- Description
not specified- Indicates that map-string contains substrings for text, attributes, as well as color based on the byte format for the full screen as shown below.
ATTR- Indicates that map-string contains only the attribute string; there must be no format bytes on the front, and the string length must be based on the delim-2 specifier.
COLOR- Indicates that map-string contains only the color string; there must be no format bytes on the front, and the string length is based on the delim-2 specifier.
TEXT- Indicates that map-string contains the actual text characters; there must be no format bytes on the front, and the string length is based on the delim-2 specifier.
The available options for delim-2 are (all column and row specifiers are zero-based):
delim-2- Description
blank- Indicates that delim-1 references the entire Thoroughbred Basic Window, starting at position 0,0 (upper left corner), progressing across each row, left to right, with the last character being the lower right corner of the Thoroughbred Basic Window.
- CHAR (col1, row1, length, map-string)
- Indicates that delim-1 references a specific string of characters starting at position col1, row1 progressing across each row, left to right, for a total number of characters specified by length. For delim-2 of CHAR, all 4 parameters must be specified.
Special values of col1/row1 are:
-1 = current col/row
Special values of length are:
-1 = from, and including, the specified cursor position through the end of the Thoroughbred Basic Window
-2 = from position 0,0 (upper left corner) to, and including, the specified cursor position
-3 = from, and including, the specified cursor position through the end of that row
-4 = from the first character in the specified row through, and including, the specified cursor position
ROW (row1, map-string)- Indicates that delim-1 references the specific row number given in row1. For delim-2 of ROW, both parameters must be specified. Special values of row1 are:
-1 = the row containing the current cursor position
-2 = the top row
-3 = the bottom row
If you use this directive but Thoroughbred Basic Windows is not enabled, an ERR=70 results. For information on how to enable Thoroughbred Basic Windows, please refer to the information on TCONFIG files and IPL files in the chapter on System Files in the Thoroughbred Basic Customization and Tuning Guide.
If this task is configured for Thoroughbred Basic Windows, only the standard set of Thoroughbred Basic terminal mnemonics should be used to send output to the terminal. Using direct hexadecimal escape sequences to control the terminal screen may cause the Thoroughbred Basic Windows Manager to lose knowledge of cursor position and character attributes. For more information on terminal mnemonics, please refer to the Thoroughbred Basic Customization and Tuning Guide.
Map-string is identical in format to the string used by the WIN GET function to retrieve an entire Thoroughbred Basic Window or portion thereof, optionally including attributes and color, to a specific text.
The format of the returned string when delim-1 is not specified is:
Byte(s)- Description
1 - 2- Binary number of Thoroughbred Basic Window maps to follow.
3 - 4- Binary number of bytes per Thoroughbred Basic Window map (does not include leading 2-byte map type).
5 - n- Map type and contents:
First 2 bytes: binary map type.
0 = text map
1 = attribute map
2 = color map
Third byte and beyond:
map characters, row by row, for length specified in bytes 3 - 4 of full string.
5 + 2 +
(value of 3 - 4) The next map.
The attribute map contains one byte for every byte of text. Each bit in the attribute byte signifies a different characteristic for the byte of text. Considering the rightmost bit to be bit 0, their meanings are:
bit 0 = 0 when background, 1 when foreground
bit 1 = 0 when normal video, 1 when reverse video
bit 2 = 0 when underline off, 1 when underline on
bit 3 = 0 when steady, 1 when blink
bit 4 = not used
bit 5 = 0 when graphics mode off, 1 when graphics mode on
bits 6-7 = not used
Examples
Section titled “Examples”WINDOW PUT ( CURRENT_WINDOW$ )If CURRENT_WINDOW$ contains a 30-byte string of
$00 02 00 0B 00 00 48 45 4C 4C 4F 20 57 4F 52 4C 44 00 01 00 00 00 200 00 00 00 00 00 00 00$ (the spacing is for clarity)
it represents an 11-byte Thoroughbred Basic Window containing “HELLO WORLD” with each character in background mode and outputs the 11-byte text and attributes to the current Thoroughbred Basic Window starting at the upper-left corner of the Thoroughbred Basic Window.
WINDOW PUT COLOR ROW ( -1, THIS_ROW_COLOR$ )outputs the string in THIS_ROW_COLOR$, containing the color bytes for a row of data, into the row in which the current cursor resides.
WINDOW PUT ATTR ( THIS_WINDOW_ATTR$ )outputs the attribute string for this entire Thoroughbred Basic Window.
WINDOW PUT ROW ( -1, THIS_COMPLETE_ROW$ )outputs text, attribute, and color strings, formatted, for the row containing the cursor.
See also
Section titled “See also”Other WINDOW directives
Additional WIN functions
From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF