Execution model

  1. General
  2. Window structure

General

ProWesS is a truly event driven window manager. The programmer is responsible for setting up the window (specifying what has to be in it), and then activating that window (passing control to ProWesS). ProWesS will then draw the window and wait for events to happen. All events are processed by objects which have been put in the window. The objects either have a fixed behaviour for a particular event, or accept functions which can process the event. The exact behaviour of the object depends on its type.

The event handler can then influence the system, for example by telling it that the window should be put asleep, or that control has to be passed back to the application (in which case the window is removed from the screen).

Event handlers can also change something inside the window, like change the appearance of some objects, or change the size and/or existence of some parts of the window. ProWesS will automatically redetermine the sizes of the objects when this is necessary, and the relevant parts of the window are also automatically redrawn when needed. This is done when control is passed back from the event handler to ProWesS.

In fact a ProWesS system is in one of three possible states :

While a system is activated, it is either waiting or handling an event.

Of course an application program can own several systems simultaneously, and they can even be activated, but only one of the systems will be waiting for or handling events (the one that was activated last).

The system is an underlying structure which combines all the objects in it. ProWesS therefore always needs an object to know which system is referred to.

Window Structure

In ProWesS a system (which is displayed as a window), consists of objects. Each object has a type, and types are divided in two groups. The groups are :

ProWesS automatically tries to make a window look good by fitting the regions in it, and if the window should be larger than the minimum size to fit everyhing inside, scaling is automatic. These two operations are related, and hints can be given to make it works as you want. The regions in the window are organised in a hierarchy. At each level regions are either positioned next to each other, or below each other. This is called the primary direction. The primary direction changes with each level of nesting, starting with horizontal (row). Each region has two variables, a scale factor and a windowfit status (they can be changed using the PW_WINDOWFIT and PW_SCALE_FACTOR tags).

The windowfit status determines whether the size of a region has to be adjusted in the secondary direction. The scale factor determines how the size of a region is adjusted in the primary direction. If there is some extra space here, then this extra space is divided among the regions according to the scale factors. If the scale factor for one of the regions is one, and the scale factor for another region is three, then that last region will be increased in size by three times as much as the first region (in absolute figures). This is also demonstrated in the next picture.

When ProWesS displays a window, it will be drawn with a border. When the pointer moves over this border, the pointer will change into a diagonal arrow which points both ways. This is the scaleborder. If you generate a HIT on this border (by pressing the left mouse button), you can move the window. If you press DO (right mouse button), then you have the opportunity to change the size of the window (unless the window is not scalable, in which case you can just move the window again).

It may happen that the window does not fit on screen. ProWesS will just display as much as is possible, and you can scroll the invisible part into view by pressing <control shift alt cursor key>.


PROGS, Professional & Graphical Software
last edited February 7, 1995