•  Back 
  •  AES 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                                   Objects


Objects can be boxes, buttons, text, images, and more. An object tree is
an array of OBJECT structures linked to form a structured relationship to
each other. The OBJECT structure format is as follows:

typedef struct object
{
    WORD        ob_next;
    WORD        ob_head;
    WORD        ob_tail;
    UWORD       ob_type;
    UWORD       ob_flags;
    UWORD       ob_state;
    VOIDP       ob_spec;
    WORD        ob_x;
    WORD        ob_y;
    WORD        ob_width;
    WORD        ob_height;
} OBJECT;

Normally OBJECTs are loaded in an application resource file but it is
possible to create and manipulate them on-the-fly using the objc_add(),
objc_delete(), and objc_order() commands.

The first object in an OBJECT tree is called the ROOT object (OBJECT #0).
It's coordinates are relative to the upper-left hand corner of the
screen.

The ROOT object can have any number of children and each child can have
children of their own. In each case, the OBJECT's coordinates, ob_x, ob_y,
ob_width, and ob_height are relative to that of its parent. The AES call
objc_offset() can, however, be used to determine the exact screen
coordinates of a child object. objc_find() is used to determine the object
at a given screen coordinate.