•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The GFA-Basic Compendium
Author      : GFA Systemtechnik GmbH
Version     : GFABasic.HYP v2.98 (12/31/2023)
Subject     : Documentation/Programming
Nodes       : 899
Index Size  : 28056
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Document not found
@help       : Help
@options    : +g -i -s +z
@width      : 75
@hostname   : STRNGSRV
@hostname   : CAB     
@hostname   : HIGHWIRE
@hostname   : THING   
View Ref-FileWINDTAB
WINDTAB(i,j)

i, j: iexp

The value of WINDTAB gives the address of the Window Parameter table, where the
information which determines the appearance of a window is stored. The next
piece of information following the table is the coordinates of the graphics
origin.

The table consists of 68 bytes and is constructed in word (2-byte) format. The
use of the table is shown at the end of the section in a sample program, where
the parameters of the window to be created are placed directly into the window
table and the window then opened with a simple OPENW instruction.

WINDTAB, in a similar way to INTIN(), etc., can be used as a two-dimensional
array, WINDTAB(). The first index refers to the number of the window (1 to 4,
or 0). Zero is a special case and refers to the Desktop. The second index is:

    0  Handle
    1  Attributes
    2  x-coordinate
    3  y-coordinate
    4  Width
    5  Height

The Window Parameter table can also be modified by using
'DPOKE WINDTAB+offset', the offsets have the following meanings:

    Offset  Description
     0      Window 1: Handle
     2      Window 1: Attributes (see structure below)
     4      Window 1: x-coordinate
     6      Window 1: y-coordinate
     8      Window 1: Width
    10      Window 1: Height
    12-22   Window 2: Handle, Attributes, x, y, w, h
    24-34   Window 3: Handle, Attributes, x, y, w, h
    36-46   Window 4: Handle, Attributes, x, y, w, h
    48-58   Window 0: Handle (-1), Attributes (0), x, y, w, h (Desktop window)
    60-62   Coordinates of the 'join point' of the four windows (OPENW x,y)
    64-66   Origin for graphic instructions (CLIP OFFSET x,y)

The graphic origin is applicable to AES, Line-A, and direct VDI calls but PUT,
GET, and BITBLT always use the top left corner of the screen as their origin.

The window attribute word is constructed bit by bit, with each set bit denoting
the presence of a particular window component.

    Bit  Component
     0   Window title
     1   Close box (top left)
     2   Full box (top right)
     3   Move line, with which the window can be moved
     4   Information line
     5   Size box (bottom right)
     6   Up arrow
     7   Down arrow
     8   Vertical slider bar (right)
     9   Left arrow
    10   Right arrow
    11   Horizontal slider bar (bottom)

Example:

    ' It is also possible to imply WINDTAB manipulation
    ' using the OPENW #n,x,y,w,h,attr instruction,
    ' where with Version 2 only WINDTAB was available.
    '
    OPENW #1,100,120,200,70,&HFFF
    '
    ' corresponds to
    '
    DPOKE WINDTAB+2,&HFFF
    DPOKE WINDTAB+4,100
    DPOKE WINDTAB+6,120
    DPOKE WINDTAB+8,200
    DPOKE WINDTAB+10,70
    OPENW 1
    '
    ' or
    '
    WINDTAB(1,1)=&HFFF
    WINDTAB(1,2)=100
    WINDTAB(1,3)=120
    WINDTAB(1,4)=200
    WINDTAB(1,5)=70
    OPENW 1

--> Three methods for opening a window are shown. This example is not meant to
    be executed.

Memo: The editor has a bug and does not catch negative window numbers.
      The WINDTAB structure is 34 words (68 bytes) in size.
      This function has the following limits: WINDTAB(0-4,0-5)
      Only the first 30 words (60 bytes) can be read/written with WINDTAB().

      If you do not use any of the GFA window commands, the first 64 bytes
      (0-63) can be used to store any data you like.
      Example:
        CHAR{WINDTAB}="Test"
        PRINT CHAR{WINDTAB}
        ' or...
        BYTE{WINDTAB}=2
        PRINT BYTE{WINDTAB}

      Avoid OPENW, CLOSEW, CLEARW, FULLW, TITLEW, INFOW, TOPW, W_HAND(), and
      W_INDEX() or your data could be clobbered.