/*
**      $VER: ixdt.h 1.0
**
**      structures, definitions etc.
**
**      Copyright (c) 1996 by Ivan Sturlic
*/

#ifndef IXDT_IXDT_H
#define IXDT_IXDT_H

/*
** NOTE: Use exec.library/AllocVec() for allocation of these structures
** and their fields
*/

struct iX_ChunkInfo {
                      char  *ci_data;         // pointer to text chunk 
                      ULONG ci_datalen;       // length of chunk
                      ULONG ci_entrynum;      // number of entries
                      UBYTE *ci_entry;        // pointer to entry array
                      ULONG *cie_position;    // entry positions in chunk
                      UWORD *cie_length;      // entry lengths
                    };

struct iX_Node {
                 struct iX_Node *Next;        // pointer to next node
  
  /* only these fields are allocated by iX Datatype */
  
                 long node_begin;             // node start position
                 long node_end;               // node end position
                 char *name;                  // name of node

  /* following fields are allocated by iX-Guide and must be NULL */
                
                 char *title;                 // title of node
                 char *toc;                   // table of contents
                 char *prev;                  // previous node
                 char *next;                  // next node
                 char *background;            // background (image or #rrggbb)
               };

/*
** Entry types recognized by iX-Guide
*/

#define ET_ATTR      1     // attribute
#define ET_WORD      2     // simple word
#define ET_RTRN      3     // return character
#define ET_SPC       4     // space character(s)
#define ET_TAG       5     // begining of multi tag (@{)
#define ET_STAG      6     // begining of single tag (@)
#define ET_END       255   // end of entry array

#define ET_DATABASE   21
#define ET_AUTHOR     22
#define ET_C          23
#define ET_VER        24
#define ET_MASTER     25
#define ET_FONT       26
#define ET_INDEX      27
#define ET_HELP       28
#define ET_WORDWRAP   29
#define ET_NODE       30
#define ET_DNODE      31 // *** same as NODE for now
#define ET_REMARK     32
#define ET_TITLE      33
#define ET_TOC        34
#define ET_PREV       35
#define ET_NEXT       36
#define ET_KEYWORDS   37 // ***
#define ET_ENDNODE    38
#define ET_WIDTH      39
#define ET_HEIGHT     40
#define ET_BACKGROUND 41 // NEW !!!
// 42 not used
#define ET_VSPACING   43 // NEW !!!
#define ET_TOP        44 // NEW !!!
#define ET_LEFT       45 // NEW !!!
#define ET_CONSOLE    46 // NEW !!!
// 47 not used
#define ET_ALIAS      48 // NEW !!!   some label as alias to some string (e.g. filenames, fonts...)
#define ET_IXF        49 // NEW !!!   turn on ix-guide formatting
#define ET_MACRO      50 // NEW !!!   macro definition
#define ET_TAB        51 // NEW !!!   tab size
#define ET_BODY       52 // NEW !!!   specify global textstyle, colors and alignement
#define ET_FG         101
#define ET_BG         102
#define ET_B          103
#define ET_UB         104
#define ET_I          105
#define ET_UI         106
#define ET_U          107
#define ET_UU         108
#define ET_D          109 // NEW !!! - distance object
#define ET_A          110 // NEW !!! - align
#define ET_LINK       111
#define ET_SYSTEM     112
#define ET_BEEP       113
#define ET_CLOSE      114
#define ET_PIC        115 // NEW !!!
#define ET_ALINK      116
#define ET_RX         117
#define ET_QUIT       118
#define ET_SC         119 // NEW !!!    text shadow color
#define ET_S          120 // NEW !!!    shadow text style
#define ET_US         121 // NEW !!!    end of shadow text
#define ET_BEGINML    122 // NEW !!!    begining of multiline object
#define ET_ENDML      123 // NEW !!!    end of multiline object
#define ET_HR         124 // NEW !!!    horizontal rule
#define ET_N          125 // return
#define ET_CL         126 // compact line
#define ET_UCL        127 // end of compact line
#define ET_RR         128 // real return means new line
#define ET_URR        129 // real return off 
// 130 not used
#define ET_UL         131 
#define ET_LI         132
#define ET_UUL        133
#define ET_IB         134 // image border on
#define ET_UIB        135
#define ET_PICT       136 // transparent image
#define ET_SAFF       137 // Simple Animation File Format
#define ET_MFONT      138 // @{font <x>} tag for changing fonts in the same line

#endif
