The System type
The system is not really a type, but it can be queried or changed
through any object which is part of that system.
The Type Word
Since this is no type, you cannot create it - it always exists. So, there
is no type word for the creation of this object.
The tags
Here are the tags for this object. It is curious that you have any tags at
all, since the system cannot be created or changed. These tags are always
used with another object, whether it is for creation, change or query.
The creation tags
As was mentioned, these tags can be used when you create another object, and
determine something about the way this object is seen by the system.
- PW('POSITION_RIGHT_OF')
-
One parameter, the object which should be to the left of the newly created
object. This tag is only valid for region objects.
- PW('POSITION_LEFT_OF')
- One parameter, the object which should be to
the right of the newly created object. This tag is only valid for region
objects.
- PW('POSITION_ABOVE')
- One parameter, the object which should be below
the newly created object. This tag is only valid for region objects.
- PW('POSITION_BELOW')
- One parameter, the object which should be above
the newly created object. This tag is only valid for region objects.
- PW('POSITION_NEXT_ROW')
- The newly created object will be the first
object in a new row, which is positioned at the bottom inside the parent
object.
- PW('POSITION_NEXT_COLUMN')
- The newly created object will be the
first object in a new column, which is positioned at the right inside the
parent object.
- PW('SLEEP_OBJECT')
- The newly created object is the object which
should be displayed when the window is put to sleep. This tag is only valid
for region objects.
The change tags
Here again these tags are used with other objects.
- PW('OBJECT_AUXILIARY')
-
Each object can have an auxiliary value a (number), which is set to the
parameter. The auxiliary is normally used to store data which is needed for
the specific case of some of the action routines. These auxiliary variables
are only important in 'C' to write code without global variables, so that
the code is re-entrant. This isn't really necessary for SBasic!
-
PW('GLOBAL_AUXILIARY')
-
The system can also have an auxiliary value (a number), which is set to the
parameter. The auxiliary is normally used to store (a pointer to) the global
data structure. This auxiliary variable is important in 'C' to write code
without global variables, so that the code is re-entrant. It isn't really
necessary for SBasic.
- PW('SYSTEM_BREAKDOWN')
-
This command tells ProWesS to stop the activation of the window of which the
object is part. When the control is next returned to ProWesS, it will remove
the window from the screen, and the program can continue after the
PWActivate call. This behaves as if the user had quit the window.
- PW('POINTER')
-
Set the pointer which should be used in the window. The pointer is normally
restored when the current region is exited from. The parameter is a sprite.
- PW('WINDOWFIT')
-
Determine whether the object should be "windowfitted" or not, the parameter
should be either 1 (=TRUE) or 0 (=FALSE). Windowfitting is the action of
making the region fit inside the parent in the secondary direction (e.g. if
the parent is a row, then the secondary direction is the height). This tag
is only valid for region objects.
- PW('SCALE_FACTOR')
-
Set the scale factor for the object, the parameter should be a positive
number. The scale factor is used to make the objects fit inside the parent
in the primary direction. The remaining unused space is divided among the
objects according to the fraction (scale factor for current object / total
of scale factor for all children of parent). This tag is only valid for
region objects.
- PW('WINDOW_SIZE_PIX')
-
Set the preferred size of the window. This has two parameters, the x and y
size, both in pixels.
- PW('WINDOW_XSIZE_PIX')
-
Set the preferred width of the window. The parameter should be a number, in
pixels.
- PW('WINDOW_YSIZE_PIX')
-
Set the preferred height of the window. The parameter should be a number, in
pixels.
- PW('WINDOW_SIZE')
-
Set the preferred size of the window. This has two parameters, the x and y
size, both in PROforma numbers.
- PW('WINDOW_XSIZE')
-
Set the preferred width of the window. The parameter should be in PROforma
numbers, with a value between 0 and 720.
- PW('WINDOW_YSIZE')
-
Set the preferred height of the window. The parameter should be in PROforma
numbers, with a value between 0 and 540.
- PW('WINDOW_ORIGIN_PIX')
-
Set the prefered position of the window on the screen. This has two
parameters, the x and y position, both in pixels.
- PW('WINDOW_XORIGIN_PIX')
-
Set the prefered horizontal position of the window on the screen. The
parameter should be a number, in pixels.
- PW('WINDOW_YORIGIN_PIX')
-
Set the prefered vertical position of the window on the screen. The
parameter should be a number, in pixels.
- PW('WINDOW_ORIGIN')
- Set the prefered position of the window on the
screen. This has two parameters, the x and y position, both in PROforma
numbers.
- PW('WINDOW_XORIGIN')
-
Set the prefered horizontal position of the window on the screen. The
parameter should be a PROforma number, with a value between 0 and 720.
- PW('WINDOW_YORIGIN')
-
Set the prefered vertical position of the window on the screen. The
parameter should be a PROforma number, with a value between 0 and 540.
- PW('KEYPRESS')
-
This command is only valid for keypress objects. The parameter will be the
the CODE of the keypress to which the object reacts. The object will also
react to the secondary keypress (the different case keypress) if no other
keypress object exists which reacts to that other keypress as primary.
- PW('SYSTEM_SLEEP')
-
Tell ProWesS that the window should be put asleep. The SLEEP_OBJECT will
then be activated as current window, and the window will be put inside the
button frame (if that exists). See also
PW('SLEEP_OBJECT'),
PW('WINDOW_BUTTON')
.
- PW('WINDOW_BUTTON')
-
When this tag occurs, the window will automatically position itself inside
the button frame (if this is possible). If there is not enough room inside
the button frame, then the system will revert back to normal behaviour.
Please note that a window which is positioned inside the button frame cannot
be moved or scaled. This tag does not require a parameter.
- PW('WINDOW_NOSCALE')
-
This makes sure that the size of the window cannot exceed the minimum size.
Scaling thus becomes impossible. This tag does not need a parameter. When no
scaling is possible, a DO on the scaleborder will be interpreted as a
request to move the window.
- PW('WINDOW_NOXSCALE')
-
This makes sure that the horizontal size of the window cannot be changed.
Horizontal scaling thus becomes impossible. This tag does not need a
parameter. When no scaling is possible in either direction, a DO on the
scaleborder will be interpreted as a request to move the window.
- PW('WINDOW_NOYSCALE')
-
This makes sure that the vertical size of the window cannot exceed the
minimum. Vertical scaling thus becomes impossible. This tag does not need a
parameter. When no scaling is possible in either direction, a DO on the
scaleborder will be interpreted as a request to move the window.
- PW('CURSOR_SEPARATE')
-
This tag needs one parameter, 1 (=TRUE) or 0 (=FALSE), which determines
whether the cursor keys (and space and enter) are treated as separate, or as
ordinary mouse moves, hit and do.
- PW('CATCH_OBJECT')
-
The ProWesS systems passes keypresses which are not handled by any keypress
object to one of the objects in the system. This object can be set with this
tag. The parameter is another object i.e. the object designed to catch the
keypresses.
- PW('SYSTEM_ACTION_INIT')
-
This tag allows you to pass a routine which has to be executed by ProWesS
after the window is initialy drawn, but before the pointer is displayed
(thus before any events are caught). The parameter is an action routine,
such as
INIT_ROUTINE
. The object which is returned by the
PWactivate call in this case is the outline itself.
- PW('SYSTEM_ACTION_EVENT1
PW('SYSTEM_ACTION_EVENT2
PW('SYSTEM_ACTION_EVENT3
PW('SYSTEM_ACTION_EVENT4
PW('SYSTEM_ACTION_EVENT5
PW('SYSTEM_ACTION_EVENT6
PW('SYSTEM_ACTION_EVENT7
PW('SYSTEM_ACTION_EVENT8') -
Pass an action which has to be executed when the given software event is
generated for the job. The parameter is a routine. There are 8 routines
(
EVT1_ROUTINE ....EVT8_ROUTINE
) for this. The object which
"receives" the event can be any object in the system and is, of course,
returned in the object_hit parameter to the PWactivate call (an access point
to the window is needed). These events can only be generated and trapped on
SMSQ/E systems (v2.71 or later).
- PW_OBJECT_POINTER_START
-
This tag indicates that the pointer has to be centered inside this item when
the system is activated. When there is no object in the system which was
marked using this tag, then the pointer will be centered in the window. When
there are several objects which were marked, the pointer can be centered in
any one. This tag has no parameters.
- PW_OBJECT_AUTOSIZE
-
This tag indicates that the object on which it is applied can try to
increase its size to make more information visible. Only one object in the
system is allowed to increase its size this way. When there are several
objects which were marked, it is not decided which one can increase. This
tag has no parameters.
The Query Tags
- PW('OBJECT_AUXILIARY')
-
Each object can have an auxiliary value (a number), which is returned by
this query. The auxiliary is normally used to store data which is needed for
the specific case of some of the action routines. These auxiliary variables
are important in 'C' to write code without global variables, so that the
code is re-entrant. When the auxiliary value for the queried object is NULL,
then the auxiliary value of the owner is returned (recursively until either
no more owner or a non NULL value is encountered). Normally, SBasic is
intelligent enough that you shouldn't need this.
- PW('GLOBAL_AUXILIARY')
- The system can also have an auxiliary (int
sized) value, which is returned by this query. The auxiliary is normally
used to store (a pointer to) the global data structure. This auxiliary
variable is important in 'C' to write code without global variables, so that
the code is re-entrant. Normally, SBasic is intelligent enough that you
shouldn't need this.
- PW('SYSTEM_GSTATE')
- Sometimes, you may need a Gstate to query
PROforma about something (this is explained in PROforma). As a ProWesS
system always owns a gstate, there is no need to allocate a new one for
that. Therefore, this tag allows you to know the gstate which is currently
used by the system. The value returned is a number, the Gstate. Please note
that ProWesS may replace its gstate by another one at any time. Therefore,
it can not be guaranteed that the Gstate still exists after the next time
that control is given to ProWesS.
- PW('DEFAULT_FONT')
-
Query the ProWesS default font. The value filled in is a string with a
maximum length of PF_MAXFONTNAME. This is one of the rare cases
where a query will return a string instead of a number.
- PW('DEFAULT_FONTSIZE')
- Get the ProWesS default fontsize. This can
for example be used to know a good default size to display some text in a
canvas. The value filled in is a PROforma number.
- PW('DEFAULT_FOREGROUND')
- Get the ProWesS default foreground colour.
The value is of type "ColourRGB". Not used in SBasic.
- PW('DEFAULT_BACKGROUND')
- Get the ProWesS default background colour.
The value is of type "ColourRGB". Not used in SBasic.
- PW('DEFAULT_MIDDLEGROUND')
- Get the ProWesS default middleground
colour. The value is of type "ColourRGB". Not used in SBasic.
PROGS, Professional & Graphical Software
last edited 1996 1996 Sep 14 (wl)