WINDOW OPEN
Documentation | Blog | Demos | Support
WINDOW OPEN
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Opens a window for use in subsequent window-handling commands.
Syntax
WINDOW OPEN [window] [AT position] [SIZE winsize] [FOR form] [IN parent]
Parameters
window | Window can be: name The name of the window that you want to open. Zim looks up the name in the currently accessed directories in the usual way. A compiled WINDOW OPEN command using name contains the unambiguous name of the window (including a reference to an application directory) that was found at compile time. (expr) A character string or an expression that evaluates to a character string that is to be used at run time as the name of the window. The parentheses must be entered. A compiled WINDOW OPEN command using (expr) can refer to many windows, at the risk of encountering an ambiguous window name (i.e., no directory specified when versions of the window are available in two or more directories). WINDOW OPEN cannot be used to open a window defined in a foreign directory. |
position | Position can be: row col Numbers or expressions that evaluate to numbers. Complex expressions must be enclosed in parentheses. Specify the location of the window by explicitly setting the row and column in pixels for the upper left-hand corner of the window. position Specifies the position of the window by giving a general placement instruction. Can be TOP, TOP LEFT, TOP RIGHT, CENTER, LEFT, RIGHT, BOTTOM, BOTTOM LEFT, or BOTTOM RIGHT. For pop-up windows, the specified location is relative to the screen. For clipped windows, the location is relative to the client area of the parent window. |
winsize | Size can be: height width Numbers, or expressions that evaluate to numbers. Height identifies the height, in pixels, of the window’s client area; width identifies the width, in pixels, of the window’s client area. MAXIMIZE Opens a clipped window so that it fills the client area of parentwin, or a pop-up window so that it fills the screen. MINIMIZE Opens a clipped window so that it appears as an icon near the bottom, left-hand corner of parentwin, or a pop-up window so that it appears as an icon near the bottom left-hand corner of the screen. |
form | Form is the name of a form or display on which the logical dimensions of the window are based. Can be: formname Where formname is a form (or display) object name. The software looks up formname in the currently accessed directories in the usual way. A compiled WINDOW OPEN command using formname contains the unambiguous name of the form (including a reference to an application directory) that was found at compile time. (expr) A character string, or an expression that evaluates to a character string, that is to be used at run time as a form object name. The parentheses must be entered. The name of the form is determined at run time. A compiled WINDOW OPEN command using (expr) can refer to many forms, at the risk of encountering an ambiguous form name (i.e., no directory specified when versions of the form are available in two or more directories). The FOR clause overrides the default logical dimensions of the window object. |
parent | Parent is the name of an open window that is to be the parent of the window being opened. The child window must have the attribute Clipped To Parent set. Can be: name The name of the parent window. The software looks up name in the currently accessed directories in the usual way. A compiled WINDOW OPEN command using name contains the unambiguous name of the window (including a reference to an application directory) that was found at compile time. (expr) A character string, or an expression that evaluates to a character string, that is to be used at run time as the name of the parent window. The parentheses must be entered. A compiled WINDOW OPEN command using (expr) can refer to many windows, at the risk of encountering an ambiguous window name (i.e., no directory specified when versions of the window are available in two or more directories). |
Comments
WINDOW OPEN opens the specified window and establishes its initial position and its physical and logical dimensions.
The window being OPENed becomes the current window, but it does not automatically appear on the screen. To appear on the screen, the window must be activated either explicitly by a WINDOW ACTIVATE command, or implicitly by an input request (e.g., FORM INPUT, INPUT, MENU INPUT).
WINDOW OPEN makes the window available for output. Forms can be open and displayed in the window, and output from commands such as REPORT FROM, LIST, OUTPUT, and so on, can be sent to the window. The output appears only when the window is activated.
If the AT clause is omitted, the window appears at the position defined for it in the Object Dictionary.
A window’s position is always relative to its physical parent. The physical parent of a clipped window is another window (parentwin). The physical parent of a pop-up window is the terminal.
If the arguments to the AT clause are such that the window opens out of bounds, the position is adjusted automatically so that the window remains entirely within the parent’s boundaries.
If the SIZE clause is omitted, the dimensions of the window’s client area are determined from the window’s definition in the Object Dictionary.
If either dimension in a SIZE clause is negative, the window is sized to maximize the associated dimension within parentwin with respect to the specified row and col position.
If the FOR clause is omitted, the logical dimensions of the window are determined from the window’s definition in the Object Dictionary.
If the IN clause is omitted, the newly opened window automatically becomes a “child” of the application window (BACKSCREEN).
The IN clause tells Zim to clip the window being opened to the parent, provided that the child window has the Clipped to Parent attribute set. Otherwise, the child window will be opened as usual.
WINDOW OPEN [re]sets the fields of the ThisWindow system variable.
See Also
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |