"In the U.S.A. they have Bill Clinton, Johnny Cash and Bob Hope.
In Sweden we have Carl Bildt, no cash and no hope."
Eero Koskinen, Finnish immigrant
YOUR SECOND GFA BASIC 3.XX MANUAL
- or -
HOW I LEARNED TO STOP WORRYING AND LOVE GFA-BASIC
PART 25
CHAPTER TWENTY-THREE - WINDOWS
by Han Kempen
GFA-windows
GFA-Basic has four "easy" windows for not too complicated jobs.
Draw an imaginary cross on the screen. The intersection of the
two lines is determined by the coordinates in 'OPENW n,x,y'. If
you show more than one GFA-window on the screen, you should
realize that resizing one window automatically changes the size
of the other three windows as well. Use the AES window-commands
if you need independent (GEM-)windows.
The four GFA-windows reserve the top line for the menu-line of a
pulldown menu. If you use your own GEM-windows, you should
protect the menu-line yourself, e.g. with 'OPENW 0'.
The GFA-windows are numbered 1 - 4 by GFA-Basic. Let's call this
the window-index of a GFA-window. A window also has a number
that's used by GEM. Let's call this the window-handle of the GEM-
window. In a listing you can spot a window-index easily because
the number is preceded by '#'. Except after OPENW:
OPENW 1 ! open GFA-window #1
OPENW #1,x,y,w,h,a ! also opens GFA-window #1
The first command is used after some manipulation of the
WINDTAB-parameters. The second command changes these parameters
directly, so you can ignore WINDTAB.
A standard-method for the use of one GFA-window looks like this:
TITLEW #1," Title " ! automatically centered
INFOW #1,"Information" ! left justified
(...) ! adapt WINDTAB-parameters for
GFA-window #1
OPENW 1 ! or use OPENW #1 with parameters
CLEARW #1
(...)
CLOSEW #1
CLOSEW 0 ! see paragraph 'CLOSEW'
CLOSEW
If you have opened a window in your program, always use 'CLOSEW
0' before returning to the editor. Otherwise you won't be able to
work normally in Direct Mode, although you can also type 'CLOSEW
0' in Direct Mode in order to restore everything to normal again.
In a compiled program you have to avoid 'CLOSEW 0', because TOS
will complain that too many files are open if you do use this
command. No, I don't know why.
If you use the AES window-commands, always call
WIND_CLOSE(handle) before WIND_DELETE(handle). Or use 'CLOSEW
handle'.
TITLEW
You can clear a title with:
TITLEW #n," "
Don't use "" instead of " ", or you won't be able to move the
window afterwards!
CLEARW
After 'CLEARW #n' all visible areas of the GFA-window with index
n are cleared, without activating the window. GFA uses
WIND_UPDATE and WIND_GET for this command. 'CLEARW n' both clears
and activates the GEM-window with handle n.
Disclaimer
The text of the articles is identical to the originals like they appeared
in old ST NEWS issues. Please take into consideration that the author(s)
was (were) a lot younger and less responsible back then. So bad jokes,
bad English, youthful arrogance, insults, bravura, over-crediting and
tastelessness should be taken with at least a grain of salt. Any contact
and/or payment information, as well as deadlines/release dates of any
kind should be regarded as outdated. Due to the fact that these pages are
not actually contained in an Atari executable here, references to scroll
texts, featured demo screens and hidden articles may also be irrelevant.