WINDOW CREATE
Create Thoroughbred Basic Window
This directive defines a Thoroughbred Basic Window and all its attributes to the Thoroughbred Basic Windows Manager and activates that Thoroughbred Basic Window.
Syntax
Section titled “Syntax”WINDOW CREATE ( width, height, col1, row1 ) [ attributes]width- is any positive integer in the range of 1 to the maximum number of columns on the screen, designating the total width of the Thoroughbred Basic Window, including the border.
height- is any positive integer in the range of 1 to the maximum number of rows on the screen, designating the total height of the Thoroughbred Basic Window, including the border.
col1- is any positive integer in the range of 0 to the maximum number of columns on the screen minus 1, designating the leftmost screen column in which this Thoroughbred Basic Window starts.
row1- is any positive integer in the range of 0 to the maximum number of rows on the screen minus 1, designating the topmost screen row in which this Thoroughbred Basic Window starts.
attributes- describe any additional aspects of the Thoroughbred Basic Window such as title, border type, initialization, etc. The general format for attributes is "KEYWORD=value" as described in the following table.
Remarks
Section titled “Remarks”This directive is generally available starting with release level 8.1.
Starting with release 8.2, the maximum number for width and height is 1000. The maximum number for col1 and row1 is 999.
Starting with release 8.2, when creating a Thoroughbred Basic Window that is larger than or out of range of the terminal display, part or none of the Thoroughbred Basic Window may be displayed.
Starting with release 8.2, the color setting attributes “INITCOLOR=” AND
“BORDERCOLOR=” can have a number value from 0 to 255 as in the Thoroughbred Basic Window directive WINDOW COLOR. Similarly, the attribute setting attributes “SELECTATR=”, “INITATR=”, and “BORDERATR=” can have a number value from 0 to 15 as in the Thoroughbred Basic Window directive WINDOW ATTR provided the attribute is supported by the setting.
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.
The “PANELCOUNT=” attribute is generally available starting with release level 8.2.
The format for attributes is:
Keyword- Description
"BORDER="- describes the border style:
NONE = no border; default
LG = line graphics box
CHAR x = use the character x as the border
CLEAR = defines a border of space characters
"BORDERATR="- sets the attributes of the border:
NV = normal video; default
RV = reverse video
BL = blink
FG = foreground intensity
BG = background intensity
attributes may be compounded, e.g.
RV+BL+BG = reverse video, blink, background
"TITLE="- the title to be placed in the top border row; default is no title; if TITLE= is specified, the Thoroughbred Basic Window has a border
"TITLEAT="- positions the title within the top border row:
LEFT = left justified; default
CENTER = centered
RIGHT = right justified
"NAME="- allows the programmer to provide a 1 to 8 character name for this Thoroughbred Basic Window which can be used in directives and functions to refer to the Thoroughbred Basic Window being defined; default is to allow the Thoroughbred Basic Windows Manager to assign a random, unique name which is the 8-byte string of a number.
"INIT="- describes how to initialize the area within the Thoroughbred Basic Window:
NONE = performs no initialization
CHAR x = fills the Thoroughbred Basic Window with the character x
CLEAR = space fills the Thoroughbred Basic Window; default
"INITATR="- describes the initial attributes of the area within the Thoroughbred Basic Window:
NV = normal video; default
RV = reverse video
BL = blink
FG = foreground intensity
BG = background intensity
attributes may be compounded, e.g.
RV+BL+BG = reverse video, blink, background
"WRAP="- sets autowrap conditions:
YES = wrap from the end of one line to the start of the next line; default
NO = all characters after the last character on a print line are lost
"SCROLL="- sets autoscroll conditions:
YES = scroll screen up one row each time wrap occurs on the last Thoroughbred Basic Window position; default
NO = position cursor at top left whenever wrap occurs on the last Thoroughbred Basic Window position
"SELECTATR="- this is the attribute that the Thoroughbred Basic Window border assumes (see BORDERATR above) when this Thoroughbred Basic Window is selected; when not selected the border assumes the BORDERATR attribute; default uses the same attribute as BORDERATR.
"PAINTMODE="- describes how the Thoroughbred Basic Window is painted onto the screen at create time or erased from the screen at delete time. Note that when the Thoroughbred Basic Windows Manager automatically updates areas of the screen due to Thoroughbred Basic Window command activity, the updated area is always painted TOPDOWN.
TOPDOWN = paints or erases the Thoroughbred Basic
Window from top to bottom and left to right; default.
MIDDLEOUT = paints the Thoroughbred Basic Window from the center row towards the top and bottom of the Thoroughbred Basic Window (alternating between successively higher and lower rows); erases the Thoroughbred Basic Window in the opposite direction (from top and bottom towards the middle).
CIRCLEIN = paints and erases the Thoroughbred Basic Window in a clockwise fashion, from the outside towards the center, starting with the upper left corner of the Thoroughbred Basic Window.
"PANELCOUNT="- a positive integer in the range of 0 to 15 designating the maximum number of panels to be maintained within this Thoroughbred Basic Window; default = 0; panels are similar to Thoroughbred Basic Windows within a Thoroughbred Basic Window (see the WINDOW PANEL directive).
"CONTENTS="- a string containing the attribute maps of data to be displayed within the Thoroughbred Basic Window; default is no preset display; the format of this string is identical to the format of the string returned from the WIN (GET) function (see WIN (GET) function and WINDOW PUT directive).
"INITCOLOR="- describes the initial color of the area within the Thoroughbred Basic Window. The following are the values used for this attribute:
BACKGR = The color following this value is the background color. If there is no color following this value, then the background color is set to the current background color. Similarly, if the background color is the only one set, then the foreground color is set to the current foreground color:
Color values are: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LGRAY, GRAY, LBLUE, LGREEN, LCYAN, LRED, LMAGENTA, YELLOW AND WHITE. e.g. BACKGR=RED+YELLOW
“BORDERCOLOR=” sets the color of the border. The following are the values used
for this attribute:
BACKGR = the color following this value is the background color. If there is no color following this value, then the background color is set to the current background color. Similarly, if the background color is the only one set, then the foreground color is set to the current foreground color.
Color values are: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LGRAY, GRAY, LBLUE, LGREEN, LCYAN, LRED, LMAGENTA, YELLOW AND WHITE. e.g. BACKGR=RED+YELLOW
"LICOLOR="- describes the color associated with the low intensity attribute. The following are values used for this attribute:
BACKGR = The color following this value is the background color. If there is no color following this value, then the background color is set to the current background color. Similarly, if the background color is the only one set, then the foreground color is set to the current foreground color:
Color values are: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LGRAY, GRAY, LBLUE, LGREEN, LCYAN, LRED, LMAGENTA, YELLOW AND WHITE. e.g. BACKGR+RED+YELLOW
As stated above, the general format for attributes is “KEYWORD=value”. Multiple attributes can be chained into a single string bounded by quotes (” “) and separated by the vertical bar symbol (called the “pipe” symbol in UNIX), “|”. A reverse video, line graphics border could then be represented by the following attribute list (with no embedded spaces):
"BORDER=LG | BORDERATR=RV".Allowance is also made for use of a separator other than the vertical bar symbol. If the attribute string starts with SEP=character, then that character is interpreted as the separator. Using the example just given, the following string creates the same effect, using the exclamation mark (“!”) as the separator (again with no embedded spaces):
"SEP= ! BORDER=LG ! BORDERATR=RV"Examples
Section titled “Examples”WINDOW CREATE (40,24,0,0) "BORDER=CHAR *", "BORDERATR=NV","TITLE=LEFT HALF", "TITLEAT=CENTER", "NAME=LEFTHALF","INIT=CLEAR", "INITATR=RV", "WRAP=YES", "SCROLL=YES"creates a Thoroughbred Basic Window, named LEFTHALF, which represents the left half of an 80-column by 24-row screen, with a border of asterisks and the title LEFT HALF centered in the top border row, with autowrap and autoscroll, clearing the Thoroughbred Basic Window initially to reverse video spaces.
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