23. WINDOWS 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.