Pre-defined standard windows

The following standard windows are pre-defined for use in screen form programs. They are all at the top level and have the desktop as their parent.

Pre-defined windows may be redeclared within a program and their initial properties changed. Redefinitions which are inappropriate for the window are ignored. If they are not so redeclared, then their default values are set at run time by the interpreter.


The task window wintask

The task window wintask is the main program window. Although it is pre-defined, it may be redeclared and its properties changed, by means of the structure:

+|–window wintask at x, y {
     clauses
}

Unless redefined as –window, it is created automatically when a program loads.

In versions of Sculptor earlier than 4.2, the task window wintask was created automatically even if redefined as –window. To retain the old behaviour, use the !compat create_wintask declaration.

The task window may be modified at run time, in the same way as any other window:

wintask->property = value

The task window has the following default properties:

Position

0, 0

Height (max, min, view)

25

Width (max, min, view)

80

Style

0

Palette

0 (use Windows defaults). If a pen is used in a task window clause, it is taken to refer to palette 11 (PAL_WINDOW).


The debug window windebug

This window is used to report errors of sufficient severity to exceed the current warning level (set by assignment to the Sculptor system variable sys.Warn). By default it uses palette 24 (PAL_DEBUG_WINDOW) and text is displayed with pen 21 (PEN_NORMAL).

It may redeclared, as may any other window, by the structure:

+|–window windebug at x, y {clauses}

It may also be modified at run time, in the same way as any other window:

windebug->property = value

This window is automatically created and destroyed by Sculptor as and when it is needed. Therefore it is more sensible, if redeclaring it, to define it as –window.

The default style for this window is 0.


The prompt window winprompt

This window is used by the prompt command to display prompt messages which require a response from the user. By default it uses palette 25 (PAL_PROMPT_WINDOW) and text is displayed with pen 21 (PEN_NORMAL). The prompt command uses winprompt as a template, cloning it each time the command is executed.

It is not possible to change the size of the prompt window, which is calculated at run time.

The prompt window may be redeclared, to change other attributes, by the structure:

–window winprompt at x, y {clauses}

It should never be declared as +winprompt.

The prompt window may also be modified at run time, in the same way as any other window:

winprompt->property = value

This window is automatically created and destroyed by Sculptor as and when it is needed. Therefore it is more sensible, if redeclaring it, to define it as –window.

The default style for this window is 0.


Changing position of standard windows

These standard windows are created and destroyed every time they are used. Normally they are centred on the screen. The constructions:

window_id->xcreate =
window_id->ycreate =

may be used to set the position of such windows. The next time the window is created it will appear with its top left corner at the co-ordinates specified. In order to return the window to a centred position, assign the value DEF_XY to xcreate and ycreate.


RELATED TOPICS

Windows