Secondary Windows

You create secondary windows inside your main terminal window. If the secondary window has been correctly defined and is activated, the user can perform normal Windows manipulation functions, such as:

  • Entering data.

  • Minimising/maximising the window.

  • Re sizing and re-positioning the window.

This section describes how to create, destroy, activate, hide and show secondary windows.

Scaling

You can scale secondary windows, by defining the number of columns and rows in the window, then defining the window's actual size. By default, the scaling is 1, and the secondary window is created just large enough to hold the terminal window inside it.

This shows a secondary window, with top left corner at (3,3), holding a terminal window of width 40, height 10, and title “Hello”.

Creating a Secondary Window

To create a secondary window, use the following AiF escape sequence:

ESC_29 ; 1 ; top ; left ; h1 ; wid1 {; wid2} {; h2}  {; fg} {; bg} {; mod} {; bord} {; bar} {; min} {; max} {; orig} {; size} {; page} w id ; title ESC\

Where:

Top

Window top. Cell offset.

When orig = 1, this is the pixel row of the top/left of the window, i.e. one more than the number of pixels visible above the top of the sub window frame.

When orig = 2, this is one more than the number of pixels of the application window, including the window frame, visible above the top/left of the window frame.

When orig = 3, this is the row/column number measured in character cells within the base window of the top row/ first column of characters in the subwindow. The window border is drawn above this position.

Left

Window left. Cell offset.

When orig = 1, this is the pixel row of the top/left of the window, i.e. one more than the number of pixels visible above the top of the sub window frame.

When orig = 2, this is one more than the number of pixels of the application window, including the window frame, visible above the top/left of the window frame.

When orig = 3, this is the row/column number measured in character cells within the base window of the top row/ first column of characters in the subwindow. The window border is drawn above this position.

h1

Number of columns in terminal window. If h1 and wid1 is smaller than h2 and wid2, the font will be scaled down so the correct number of cells will still appear in the subwindow.

wid1

Number of rows in terminal window. If h1 and wid1 is smaller than h2 and wid2, the font will be scaled down so the correct number of cells will still appear in the subwindow.

wid2

Window width - use to scale the window horizontally.

When size = 2 and wid2 is smaller than wid1, the subwindow is initially drawn with a width of wid2 character cells (measured by the cell size of the base window). If size = 1 or wid2 is greater than wid1, wid2 and h2 will have no effect.

h2

Window height - use to scale the window vertically.

Fg

Foreground colour of terminal window 1..16, *=16

bg

Background colour of terminal window 1..16, *=1

mod

Modality: 1 = modeless, 2* = modal.

bord

Border type: 1 = none; 2* = thin, not resizeable, 3 = thick, resizeable.

bar

Title bar type: 1 = none; 2* = normal.
If you have a title bar, a default thin border is used by default, although you can have a thick border using bord.

min

1*= do not show a minimise box.
2 = show a minimise box.
3 = do not show a minimise box but show close.
4 = show minimise and close.

max

1*= do not show a maximise box.
2 = show a maximise box.
3 = do not show maximise box and create the window hidden.
4 = Show maximise box and create the window hidden.

The window will become modeless if windows are created hidden

orig

Window position:
1 = relative to the screen, in pixels.
2 = relative to the application window, in pixels.
3* = relative to the main terminal window, in character cells.

size

Interpretation of secondary window size:
1 = pixel size of whole window, including non-client parts.
2* = size in cells of the displayed terminal window, to which the non-client parts are added.

page

 

Specify the number of backpages where:

0* =an active page and the number of backpages which have been specified in Configure, Edit from the HostAccess menu.
1= an active page and no backpages.
2 =an active page and 1 backpage.
3 = an active page and 2 backpages and so on.

Id

Control id of the secondary window.

title

Title.

Example of how to create a secondary window.

To create a secondary window at (3,3), holding a terminal window of size 40x10, use the following AiF escape sequence:

ESC_29 ; 1 ; 3 ; 3 ; 10 ; 40 w Help ; Hello ESC\

The Windows window will be made exactly the right size to hold the terminal window inside it.

The control id is 'Help'; the title will be 'Hello'

This will produce the following display on your terminal window:

Destroying a Secondary Window

To destroy secondary windows, use the following AiF escape sequence:

ESC_29 ; 2 w id ESC\

Where id is the window id.

Activating a Secondary Window

To activate secondary windows, use the following AiF escape sequence. This will bring the active window to the front.

ESC_29 ; 3 w id ESC\

Where id is the window id.

Setting Focus for Output in a Secondary Window

To set the focus for host output to a secondary window, use the following AiF escape sequence. This sequence is useful for controlling host output to different windows as the user may change the focus of the secondary window manually by clicking on the active window.

ESC_29 ; 3 ; 1 w id ESC\

Hiding/Showing a Secondary Window

To hide or show a secondary window, use the following AiF escape sequence:

ESC_33 ; 2 ; show w id ESC\

Where:

Note: show

1 = Hidden.
2 = Minimised.
3* = Normal.
4 = Maximised.

Note: id

Toolbox/window id.