•  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-File    Offset  Name      Type  Meaning
    00      ob_next   word  pointer to the next object
    02      ob_head   word  pointer to the first child
    04      ob_tail   word  pointer to the last child
    06      ob_type   word  type of object
    08      ob_flags  word  object information (see below)
    10      ob_state  word  status of the object (see below)
    12      ob_spec   long  pointer to further information (see below)
    16      ob_x      word  x-position of the object
    18      ob_y      word  y-position of the object
    20      ob_w      word  width of the object
    22      ob_h      word  height of the object

So the memory requirements of an object are these 24 bytes plus further
descriptive structures, e.g. TEDINFO or BITBLK structures.

OB_NEXT points to the following object on the same level, or, if it is the last
        object on that level, to the parent object, or contains -1 if none.

OB_HEAD points to the object's first child, or contains -1 if none.

OB_TAIL points to the object's last child, or contains -1 if none.

The value -1 in this context is also referred to as NIL (Not In List).

Depending on the value in OB_TYPE, OB_SPEC has the address of different data
structures, as shown in the following table:

    OB_TYPE  Name        OB_SPEC
    20       G_BOX       BOX information, see below
    21       G_TEXT      Pointer to TEDINFO graphic text
    22       G_BOXTEXT   Pointer to TEDINFO text-in-a-box
    23       G_IMAGE     Pointer to BITBLK bit image graphic
    24       G_USERDEF   Pointer to APPLBLK structure
    25       G_IBOX      BOX information, see below.
    26       G_BUTTON    Pointer to centered C-string, to go in a box
    27       G_BOXCHAR   BOX information, see below.
    28       G_STRING    Pointer to C-string menu item structure
    29       G_FTEXT     Pointer to TEDINFO editable graphic text
    30       G_FBOXTEXT  Pointer to TEDINFO editable text-in-a-box
    31       G_ICON      Pointer to ICONBLK structure
    32       G_TITLE     Pointer to C-string menu title structure
    33       G_CICON     Pointer to CICONBLK structure (AES => v3.3)
    34       G_SWBUTTON  Pointer to SWINFO structure (NAES)
    35       G_POPUP     Pointer to POPINFO structure (NAES)
    36       G_WINTITLE  Pointer to TEDINFO text-in-a-box (NAES, internal use)
    37       G_EDIT      ? (NAES, not implemented)
    38       G_SHORTCUT  Pointer to C-string, for proportional fonts (NAES)

For G_BOX, G_IBOX and G_BOXCHAR, OB_SPEC contains information concerning
character-content, border-type and color of the appropriate object. The upper 8
bits are only used by G_BOXCHAR and contain the ASCII code of the character to
appear in the box.

They contain the following values for the border:

             0 = no border
     1 to  128 = the border extends 1 to 128 pixels inside the object
    -1 to -128 = the border extends 1 to 128 pixels outside the object

The bit allocation for the object color word is:

    1111 2222 3444 5555

where:

    1 = Border color (0 to 15)
    2 = Text color (0 to 15)
    3 = Text mode (0 = transparent, 1 = overwritten)
    4 = Fill pattern (0 to 7)
    5 = Color of object interior (0 to 15)

    OB_FLAGS    Hex     Bit
    NORMAL      &H0000  -
    SELECTABLE  &H0001  0
    DEFAULT     &H0002  1
    EXIT        &H0004  2
    EDITABLE    &H0008  3
    RBUTTON     &H0010  4
    LASTOB      &H0020  5
    TOUCHEXIT   &H0040  6
    HIDETREE    &H0080  7
    INDIRECT    &H0100  8
    FL3DIND     &H0200  9      (AES 3.4)
    FL3DACT     &H0400  10     (AES 3.4)
    SUBMENU     &H0800  11
    FL3DBAK     &H0600  9 & 10 (AES 3.4)

    OB_STATE  Hex     Bit
    NORMAL    &H0000  -
    SELECTED  &H0001  0
    CROSSED   &H0002  1
    CHECKED   &H0004  2
    DISABLED  &H0008  3
    OUTLINED  &H0010  4
    SHADOWED  &H0020  5
    WHITEBAK  &H0040  6

The structures described in the preceding section are addressed in GFA-BasicGFA-Basic is the best BASIC for the Atari!
 3
with the following syntax (for both reading and writing):

    OB_NEXT(tree%,obj&)
    OB_HEAD(tree%,obj&)
    OB_TAIL(tree%,obj&)
    OB_TYPE(tree%,obj&)
    OB_FLAGS(tree%,obj&)
    OB_STATE(tree%,obj&)
    OB_SPEC(tree%,obj&)
    OB_X(tree%,obj&)
    OB_Y(tree%,obj&)
    OB_W(tree%,obj&)
    OB_H(tree%,obj&)
    OB_ADR(tree%,obj&)   !only works as a function

...where tree% is the address of the object tree and obj& the object number.
In addition the address of an individual object can be determined with
address=OB_ADR(tree%,obj&).

Memo: OB_TYPE() always reads and writes a word value. The following
      code can be used to read/write the extended and standard object types
      seperately.

' read/write extended object type
FUNCTION ob_extype(tr%,ob&)
  $F%
  RETURN BYTE{tr%+MUL(ob&,24)+6}
ENDFUNC
PROCEDURE ob_extype(tr%,ob&,ty&)
  BYTE{tr%+MUL(ob&,24)+6}=ty&
RETURN
' read/write standard object type
FUNCTION ob_type(tr%,ob&)
  $F%
  RETURN BYTE{tr%+MUL(ob&,24)+7}
ENDFUNC
PROCEDURE ob_type(tr%,ob&,ty&)
  BYTE{tr%+MUL(ob&,24)+7}=ty&
RETURN

OBJECT+, bfobspec+, obspec+, ob_flags+, ob_state+