DEFINITION Objc; (* SJ *)

(* aes module objc *)


CONST (* object types *)
      BOX* = 20;     TEXT* = 21;  BOXTEXT* = 22;   IMAGE* = 23;
      PROGDEF* = 24; FRAME* = 25; BUTTON* = 26;    BOXCHAR* = 27;
      STRING* = 28;  FTEXT* = 29; FBOXTEXT* = 30;  ICON* = 31;
      TITLE* = 32;

      (* colours *)
      WHITE* = 0;    BLACK* = 1;

      (* Fonts *)
      NORMAL* = 3;   SMALL* = 5;

      (* Justification *)
      LEFT* = 0;     RIGHT* = 1;  CENTER* = 2;

      (* state bits *)
      SELECTED* = 0; CROSSED* = 1; CHECKED* = 2; DISABLED* = 3;
      OUTLINED* = 4; SHADOWED* = 5;

      (* flag bits *)
      SELECTABLE* = 0; DEFAULT* = 1; EXITDIAL* = 2; EDITABLE* = 3;
      RADIOBUTTON* = 4; LASTOBJECT* = 5; TOUCHEXIT* = 6; HIDDEN* = 7;
      INDIRECT* = 9;

      (* edittypes *)
      INIT* = 1; SHOW* = 2; FINISH* = 3;

      (* hvdir *)
      HOR* = 0; VERT* = 1;

      (* place *)
      OUTSIDE* = 0; INSIDE* = 1;

TYPE  tedinfo*      = RECORD
                       Text*,Template*,Valid* : Str.ptr;
                       Font*,junk1,Just*      : INTEGER; (* see CONST *)
                       Color*,junk2,Thick*    : INTEGER;
                       TextLen*,TemplateLen*  : INTEGER;
                     END(*RECORD*);
      tedinfoptr*   = POINTER TO tedinfo;

      iconblk*      = RECORD
                       MaskData*,IconData* : LONGINT;
                       IconText* : Str.ptr;
                       IconChar* : INTEGER;
                       CharX*,CharY* : INTEGER;
                       IconX*,IconY*,IconW*,IconH* : INTEGER;
                       TextX*,TextY*,TextW*,TextH* : INTEGER;
                       Reserved : INTEGER;
                     END(*RECORD*);
      iconblkptr*   = POINTER TO iconblk;

      bitblk*       = RECORD
                       Data* : LONGINT;
                       W*,H*,X*,Y* : INTEGER;
                       Color* : INTEGER;
                     END(*RECORD*);
      bitblkptr*    = POINTER TO bitblk;

      applblk*      = RECORD
                       ProgramCode*  : LONGINT;
                       Parameter*    : LONGINT;
                     END(*RECORD*);
      applblkptr*   = POINTER TO applblk;

      parmblk*      = RECORD
                       Tree*         : LONGINT;
                       Index*        : INTEGER;
                       Prv*,Curr*    : INTEGER;
                       X*,Y*,W*,H*   : INTEGER;
                       ClipX*,ClipY* : INTEGER;
                       ClipW*,ClipH* : INTEGER;
                       Parameter*    : LONGINT;
                     END(*RECORD*);
      parmblkptr*   = POINTER TO parmblk;

      object*       = RECORD
                       Next*,Head*,Tail*,Type* : INTEGER;
                       Flags*,State* : INTEGER;
                       ObSpec*       : LONGINT;
                       X*,Y*,W*,H*   : INTEGER;
                     END(*RECORD*);
      ptr*         = POINTER TO object;


PROCEDURE GetPtr* (Tree : S.PTR; Index : INTEGER) : ptr;

(* returns pointer to object with the index Index *)


PROCEDURE GetState* (Tree : S.PTR; Index : INTEGER) : SET;


PROCEDURE SetState* (Tree : S.PTR; Index : INTEGER; State : SET);


PROCEDURE GetFlags* (Tree : S.PTR; Index : INTEGER) : SET;


PROCEDURE SetFlags* (Tree : S.PTR; Index : INTEGER; Flags : SET);


PROCEDURE GetSpec* (Tree : S.PTR; Index : INTEGER) : LONGINT;

(* returns the objects specific data *)


PROCEDURE Add* (Tree : S.PTR; Parent,Child : INTEGER);


PROCEDURE Delete* (Tree : S.PTR; Object : INTEGER);


PROCEDURE Draw* (Tree : S.PTR; Startob,Depth,ClipX,ClipY,ClipW,ClipH : INTEGER);


PROCEDURE Find* (Tree : S.PTR; Startob,Depth,Mx,My : INTEGER) : INTEGER;


PROCEDURE Offset* (Tree : S.PTR; Object : INTEGER; VAR Xoff,Yoff : INTEGER);


PROCEDURE Order* (Tree : S.PTR; Object,Newpos : INTEGER);


PROCEDURE Edit* (Tree : S.PTR; Object : INTEGER; Char : INTEGER;
                 Pos,Type : INTEGER; VAR Next : INTEGER);


PROCEDURE Change* (Tree : S.PTR; Object,ClipX,ClipY,ClipW,ClipH,NewState : INTEGER);


PROCEDURE Watchbox* (Tree : S.PTR; Object,InState,OutState : INTEGER) : INTEGER;


PROCEDURE Slidebox* (Tree : S.PTR; Parent,Object,Direc : INTEGER) : INTEGER;


END Objc.
