Returns and sets window parameters. Only for porting of GFA-BASIC 16 programs.
WindGet i, a[,b[,c...]]
a = Wind_Get(i)
WindSet i, a[,b[,c...]]
i:integer expression;
a, b, c:variables;
WindGet i, a, .. reads various window related parameters. The first parameter specifies the position to start reading. The number of variables that follow, determine the number window parameters to read. Wind_Get() only returns one parameter.
In addition to retrieving window information, WindSet can be used to set a number (marked with * in the list below).
i | Parameter |
---|---|
0 | outer X-coordinate |
1 | outer Y-coordinate |
2 | outer width |
3 | outer height |
4 | inner X-coordinate |
5 | inner Y-coordinate |
6 | inner width |
7 | inner height |
8* | position of vertical slider (0..1000) |
9* | size of slider area |
10* | |
11* | size of slider area |
12 | reads the window attributes (as set with OpenW) |
13* | reads the attributes of the pressed window button (from WINDSET) |
14 | character height (for example 8, 14, 16) |
15 | not available, was: character set address |
16 | not available, was: number of top window |
17 | not available, was: number of second to top window |
18 | not available, was: number of second to bottom window |
19 | not available, was: number of bottom window |
20 | text width |
The asterisk indicates which parameters can be changed with WindSet.
Local Int ha, hi, wa, wi, xa, xi, ya, yi
OpenW 1, 0, 0, 400, 300, -1
Win_1.AutoRedraw = 1
WindGet 0, xa, ya, wa, ha
WindGet 4, xi, yi, wi, hi
Print xa`ya`wa`ha
Print xi`yi`wi`hi
Print Wind_Get(8)``Wind_Get(9)
Print Wind_Get(10)``Wind_Get(11)
Print Hex(Wind_Get(12), 8)
Print Wind_Get(14)
Print Wind_Get(20)
WindSet 9, 2000 : WindSet 11, 1500
Print Wind_Get(9), Wind_Get(11)
Do
Sleep
Until Me Is Nothing
The position and size of a window can be modified with MoveW and SizeW.
{Created by Sjouke Hamstra; Last updated: 25/10/2014 by James Gaite}