Root Control Features

This section describes some escape sequences that may be used to manage the 'root' control. This is not really a control at all, but an interface to manipulate behavioural aspects of the underlying terminal character display area in so far as they relate to embedded controls.

To use these functions, you must first create the one and only 'root control'. Once created, subsequent attempts to create it are ignored.

Once created, you can use some of the standard control management escapes on it (such as the event management escape, if you're interested in, say, when the root is tabbed to).

Creating the Root Control

To create the one and only 'root' control, use the following AiF escape sequence:

ESC_25 w ESC\

It has the fixed id string 'root'.

Reading From the Root Control

To read a value from the 'root' control, use the following AiF escape sequence:

ESC_26 ; 1 w ESC\

A value will be returned to the host. The value returned is the 'tab in permitted' state of the root, sent in the following format:

<STX>value<CR>

Where:

Value

1 = tab-in is permitted.
2 = tab-in is not permitted.
? = error detected.

Manipulating the Root Control

To disable or enable 'tab-in' to the root, use the following AiF escape sequence:

ESC_27 ; 1 ; {tabin} w ESC\

Where:

tabin

1 = disable 'tab-in' to the root.
2* = enable 'tab-in'.

Naming a Base Control Group

To name a control group to which all subsequently created controls will be automatically added, use the following AiF escape sequence:

ESC_28 ; 1 w group ESC\

Where:

group

The name of the control group. If this control group does not exist, it will be created.

Setting Default Foreground/Background Colours

To set the default foreground and background colours for use when subsequent controls are created, use the following AiF escape sequence:

ESC_28 ; 2 {; fore} {; back} {; grayed} w ESC\

Where:

fore

Foreground colour, in range 1-16.

*=16.

back

Background colour, in range 1-16.

*=1.

grayed

Grayed colour, in range 1-16.

*=5, for subsequently created controls.

Forcing Palette Reconstruction

To force palette reconstruction (back to the original default setup), use the following AiF escape sequence:

ESC_28 ; 3 w ESC\

This is useful in some situations after removing/adding 256 colour bitmaps. All controls showing bitmaps will be redrawn when this happens.