A window declaration has the following syntax:
A window defined as +window is created when the program starts. A window defined as –window is not. The create command is used at run time to create such a window.
The objects (buttons, textboxes, tables, etc) which are to appear in this window are defined as clauses, which have further property clauses of their own. So a more specific structure is:
The window_id is the identifying name by which the window is subsequently referenced. It must be unique as an unqualified identifier within the program, and the usual identifier naming rules apply.
An object declared with a + (e.g. +listbox) is created when the parent window is created. An object declared with a – (e.g. –textbox) is not.
The style flag WS_INVISIBLE determines whether a window or window control, once created, is visible or not. The show command makes the window or control visible, creating it automatically if necessary.
Window and window object definitions are usually created and maintained by means of the Sculptor program designer. They can be kept in a separate include file.
The x and y co-ordinates in a window’s definition specify its initial position. They are integer values, defining the position of the top left hand corner (origin) of the window, relative to the origin of the window’s parent. Position may be measured on a pixel grid or a character grid.
The default parent of all windows is the desktop, whose origin is the top left corner of the screen (position 0,0). A different parent can be assigned by means of the parent = clause. The x and y in a control’s definition specify the control’s position relative to the origin of its parent window.