DEFINE WINDOW
Contents
- 1 Purpose
- 2 Syntax
- 3 See Also
- 4 Description
- 4.1 FROM <expN>,<expN> TO <expN>,<expN>
- 4.2 CLOSE | NOCLOSE
- 4.3 COLOR <color code> | COLOR SCHEME <color scheme number>
- 4.4 COMMAND | ERROR | SYSTEM | TRACE
- 4.5 DOUBLE | NONE | PANEL
- 4.6 FILL <expC1>
- 4.7 FLOAT | NOFLOAT
- 4.8 FOOTER <expC2>
- 4.9 GROW | NOGROW
- 4.10 MINIMIZE | NOMINIMIZE
- 4.11 PROPERTIES <expC3>
- 4.12 SHADOW
- 4.13 TITLE <expC4>
- 4.14 ZOOM | NOZOOM
- 5 Example
- 6 Products
Purpose
Define the coordinates and attributes of a window
Syntax
DEFINE WINDOW <window-name>
FROM <expN1>, <expN2> TO <expN3>, <expN4>
[CLOSE | NOCLOSE]
[COLOR <color code> | COLOR SCHEME <color scheme>]
[COMMAND | ERROR | SYSTEM | TRACE]
[DOUBLE | NONE | PANEL]
[FILL <expC1>]
[FLOAT | NOFLOAT]
[FOOTER <expC2>]
[GROW | NOGROW]
[MINIMIZE | NOMINIMIZE]
[PROPERTIES <expC3>]
[SHADOW]
[TITLE <expC4>]
[ZOOM | NOZOOM]
See Also
@...GET, @...SAY, ACTIVATE SCREEN, ACTIVATE WINDOW, CLEAR WINDOWS, DEACTIVATE WINDOW, HIDE WINDOW, MODIFY MEMO, MOVE WINDOW, RELEASE WINDOWS, RESIZE WINDOW, RESTORE WINDOW, SAVE WINDOW, SHOW WINDOW, SET COLOR, SET COMMANDWINDOW, SET ERRORWINDOW, SET STATUS, SET TRACEWINDOW, SET WINDOW OF EDIT, SET WINDOW OF MEMO, WCOLS(), WEXIST(), WONTOP(), WOUTPUT(), WROWS(), WTITLE(), WVISIBLE()
Description
The DEFINE WINDOW command is used to specify the coordinates, and attributes for a window. A window is an area of the screen designated for output and input. There is no limit to the number of defined windows. The <window-name> is the name that will be used to identify the window when using the other WINDOW commands.
FROM <expN>,<expN> TO <expN>,<expN>
Initial display of the window is positioned with the numeric expressions <expN1-expN4>. These numeric expressions define the coordinates by row and column number for the top left and bottom right corners of the window.
CLOSE | NOCLOSE
The CLOSE | NOCLOSE keywords are included for FoxPro compatibility only.
COLOR <color code> | COLOR SCHEME <color scheme number>
The COLOR <color code> can define colors for standard characters, enhanced characters, and the frame of the window. Each of the three definitions consists of "/" separated color codes. The definitions are comma separated. Colors are assigned using the following letter codes:
Color | Attribute Letter |
---|---|
BLACK | N or blank |
BLUE | B |
GREEN | G |
CYAN | BG |
BLANK | X |
GREY | N+ |
RED | R |
MAGENTA | RB |
BROWN | GR |
YELLOW | GR+ |
WHITE | W |
The first set of letter codes, <foreground1,background1> , assigns the standard colors. The standard colors are used for @...SAYs that display when the window is activated. The second set of letter codes, <foreground2,background2> , assigns the enhanced colors that are used for the @...GETs in the activated window. The third set of letter codes, <foreground3,background3> , assigns colors for the frame, or border of the window. The default colors for window frames, @...SAYs, and @...GETs, are assigned with the SET COLOR command. When assigning color codes to the window, you may omit any of the three sets of codes by putting a comma in its place.
COMMAND | ERROR | SYSTEM | TRACE
The COMMAND keyword designates the window as a command window. Command windows contain the interactive command prompt, and when active, allow the input of commands. If the TITLE <expC> clause is not specified, command windows are labeled "Recital - command window." The SET COMMANDWINDOW command must be ON in order for command windows to operate. The ERROR keyword designates the window as an error window. Error windows are automatically activated when an error occurs. Error windows display the appropriate error message, and a button labeled "Confirm." Pressing the [RETURN] key deactivates the error window. If the TITLE <expC> clause is not specified, error windows are labeled "Recital - error window." The SET ERRORWINDOW command must be ON in order for error windows to operate.
The SYSTEM clause will define a window with the same characteristics as the Application Workbench system window.
The TRACE keyword designates the window as a trace window. Trace windows display each executing line of a currently running program. If the TITLE <expC> clause is not specified, trace windows are labeled with "Recital - trace window." The SET TRACEWINDOW command must be ON in order for trace windows to operate.
DOUBLE | NONE | PANEL
The DOUBLE keyword is used to border the window with a double rather than a single line. The PANEL keyword is used to draw the window border in reverse video. The NONE keyword is used to display the window without a border.
FILL <expC1>
The FILL clause will fill the background of the window with the <expC1>.
FLOAT | NOFLOAT
The FLOAT keyword enables the window to move on the screen. The MOVE WINDOW command specifies coordinates for moving a window. Windows may be moved to different coordinates, or moved from their current position by specified ordinates. Windows defined with the NOFLOAT keyword cannot be moved.
FOOTER <expC2>
The FOOTER <expC2> clause is included for langauge compatibility only.
GROW | NOGROW
The GROW keyword enables the window size to be changed. Windows many be resized to different coordinates, or resized based on specified ordinates using the RESIZE WINDOW command. A window defined with the NOGROW keyword cannot be resized.
MINIMIZE | NOMINIMIZE
The CLOSE | NOCLOSE keywords are included for FoxPro compatibility only.
PROPERTIES <expC3>
The DEFINE WINDOW command can include the optional PROPERTIES clause to configure the following properties of the window:
Property | Description |
---|---|
backColor | A valid color name |
foreColor | A valid color name |
borderStyle | Raised, Recessed, EtchedOut, EtchedIn, GroupBox, Solid |
text | Title text for a groupBox |
pixelX | Pixel X position of window |
pixelY | Pixel Y position of window |
pixelWidth | Pixel Width of window |
pixelHeight | Pixel Height of window |
The <expC3> consists of a character string containing semi-colon (;) separated property=value pairs, e.g.
"backcolor=black;forecolor=red;borderStyle=GroupBox;text='Window'"
The PROPERTIES clause only has effect when running under Recital Mirage.
SHADOW
The SHADOW keyword causes a shadow to appear along the right and bottom edges of the window. The color of the shadow can be specified with the SET COLOR command.
TITLE <expC4>
The TITLE <expC4> clause centers and highlights the specified character expression on the top line of the window. If the character expression is longer than the specified width of the window, the title is truncated on the right side.
ZOOM | NOZOOM
The ZOOM | NOZOOM keywords are included for language compatibility only.
A defined window is displayed to the screen with the ACTIVATE WINDOW or SHOW WINDOW commands. The SHOW WINDOW command displays a window without activating it. The ACTIVATE WINDOW command displays a window and activates it. When a window is activated, all subsequent output is displayed in that window. Only one window may be activated at a time. Activating additional windows does not clear the display of previously activated windows. The DEACTIVATE WINDOW command clears the display of activated windows, but leaves the window definition in memory. The RELEASE WINDOW command clears both the display and the definition of windows from memory. The SAVE and RESTORE WINDOW commands may be used to keep window definitions in a file that can be reused at any time.
Example
define window browse; from 2,2 to 12,43; title "BROWSE"; color n/bg; float; grow; shadow
Products
Recital Mirage Server, Recital Terminal Developer