[an error occurred while processing this directive]

Understanding the Scout Notation

Scout describes a display as (potentially) overlapping windows. For example, if display disp is defined as

disp = < win1 / win2 >

this means that display disp consists of two windows win1 and win2, should win1 and win2 overlap, win1 overlays win2.

The best way of understanding what Scout windows are is through the formula below:

window = region X content X attributes

A window defines a region in which something will be displayed in a certain way. There are four kinds of windows in the current Scout notation: text window, textbox window, DoNaLD window and image window. Because of the different nature of the windows, their definitions of region, content and attributes may differ.

For a text window,

region (called a frame) = list of boxes
The string is filled into the first box, the remaining characters are filled into the second box and so on.
content = a character string
- a character string
attribute = { fgcolour, bgcolour, border, bdcolour, relief, alignment }
These attributes indicate the colour of the text string, the colour of the background, whether the boxes have borders, the border colour, the kind of border and the alignment of strings in relation to the boxes respectively. The acceptable reliefs are raised, sunken flat, ridge and groove.

For a textbox window,

region = a box
content = a character string
attribute = { fgcolour, bgcolour, border, bdcolour, relief, alignment }
As for the text window, but the alignment attribute defaults to LEFT.

For a DoNaLD window,

region = a box
- a box
content = a drawing (name of the drawing)
- a drawing
attribute = { xmin, ymin, xmax, ymax, fgcolour, bgcolour, border, bdcolour relief }
xmin, ymin, xmax, ymax defines the coordinate system of the drawing; fgcolour and bgcolour defines the foreground and background colour, border determines whether to draw borders of the box, bdcolour defines the border colour and relief how the border is drawn.

For an image window,

region = a box
- a box
content = an image (name of the image variable)
- an image
attribute = { bgcolour, border, bdcolour relief }
bgcolour defines the colour to be filled when the image is not large enough to cover the whole area of the window. border determines whether to draw borders of the box. bdcolour defines the border colour and relief how the border is drawn.

The sensitive attribute is common to all four types of windows. It is used to declare that a window is sensitive to mouse and keypress actions. When this attribute is ON, a mouse action or a keypress action within the region of this window will cause a definition to be generated. If a mouse action occurs in a window and it is a DoNaLD or image window, then the window name concatenated with _mouse will be the name of the variable to be defined; if it occurs in a text window, the window name concatenated with _mouse_ followed by the box number will be the variable name. The value assigned to the appropriate variable records the nature and the location of the mouse action. It is a 5-tuple of (button, type, state, x, y) where

button
the button number pressed or released;
type
the button action (4 = pressed, 5 = released);
state
the state before the button action occurred (shift (+1), caplock (+2), control (+4), meta (+8) and was-pressed (+256)). For example, if a button is released while the shift and control keys are depressing, state will be 1 + 4 + 256 = 261;
x, y
the x- and y- coordinates of the mouse in the coordinate system of the window in which the mouse action occurred.

As with mouse events, a stroke on the keyboard will generate a definition. Instead of _mouse or _mouse_ followed by a box number, the variable name of the generated definition will end with _key or _key_ followed by a box number. The value defined will also be a 5-tuple: (key, type, state, x, y), where key is the ascii code of the key pressed.

In principle, there could be many types of windows, many more attributes and many ways of defining regions. The current notation only demonstrates the principle of using definitions in describing screen layout.

[an error occurred while processing this directive]