[an error occurred while processing this directive]
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 boxescontent
= a character stringattribute
= { fgcolour
, bgcolour
, border
, bdcolour
, relief
, alignment
}For a textbox window,
region
= a boxcontent
= a character stringattribute
= { fgcolour
, bgcolour
, border
, bdcolour
, relief
, alignment
}For a DoNaLD window,
region
= a boxcontent
= a drawing (name of the 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 boxcontent
= an image (name of the image variable)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
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]