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 When When |
Left |
Window left. Cell offset. When When When |
h1 |
Number of columns in terminal window. If |
wid1 |
Number of rows in terminal window. If |
wid2 |
Window width - use to scale the window horizontally. When |
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. |
min |
1*= do not show a minimise box. |
max |
1*= do not show a maximise box. The window will become modeless if windows are created hidden |
orig |
Window position: |
size |
Interpretation of secondary window size: |
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. |
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.
|
Note: id
|
Toolbox/window id. |