#ifndef __EUDORATYPES_R__
#define __EUDORATYPES_R__

type 'Nag#' {
        integer = $$Countof(NagArray);
        array NagArray {
                integer;
        };
};

type 'FUtf' as 'STR ';
type 'FUcf' as 'STR ';

type 'HLIT' {
	integer = $$Countof(HLITArray);
	array HLITArray {
		unsigned hex integer;
		fill byte;
		char;
		pstring;
	};
};

type 'FEAT' {
	literal longint;
	literal longint;
	byte noSubfeature, hasSubfeature;
	align word;
	pstring;
	pstring;
};
	
type 'EuSc' {
	wide array {
		unsigned integer;
		unsigned integer;
		unsigned integer;
		unsigned integer;
		unsigned integer;
		unsigned integer;
		unsigned integer; };
};

type 'QTno'
{
	integer = $$Countof(CreatorTypeArray);
	array CreatorTypeArray
	{
		literal longint;
		literal longint;
	};
};

/*----------------------------eTAB ¥ Geometry of a Eudora Tab Template-----------------------------------*/

type 'eTAB' {
    integer = 0;																						// Version 0
		literal longint;																				// Application Owner
		literal longint;																				// Tab Owner
		literal longint;																				// Tab Signature
    pstring;                                                // Tab title
    integer;																								// Icon suite ID
    integer;																								// Horizontal Margin
    integer;																								// Vertical Margin
    
    integer = $$CountOf(ObjectArray);			                   // Array size
    array ObjectArray {
    		switch {
    			case fieldObject:
    					key integer = 1;
    					longint;																			// Object flags
    					pstring;																			// tag
      			  pstring;																			// UI Label
      			  pstring;																			// Field name for things like printing & drag'n'drop
      			  integer;																			// Label width or PETE height in the case of an "above field" label
      			  integer labelFlushDefault = 0,								// Label justification
      			  				labelCenter				= 1,
      			  				labelFlushRight		= -1,
      			  				labelFlushLeft		= -2;
      			  longint;																			// Label flags
							longint;																			// PETE flags for the field
      			  
							integer = $$CountOf(PositionArray);		        // Array size
      			  array PositionArray {
      			  		switch {
      			  			case left:
      			  					key integer = 1;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case top:
      			  					key integer = 2;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case right:
      			  					key integer = 3;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case bottom:
      			  					key integer = 4;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case height:
      			  					key integer = 5;
      			  					integer;														// height

      			  			case width:
      			  					key integer = 6;
      			  					integer;														// width
      			  					
      			  			case horizontal:
      			  					key integer = 7;
      			  					integer alignLeft				= 0,					// left align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignRight			= 2;					// right align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags

      			  			case vertical:
      			  					key integer = 8;
      			  					integer alignTop				= 0,					// top align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignBottom			= 2;					// bottom align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags
      			  		};
							};
    			case controlObject:
    					key integer = 2;
    					longint;																			// Object flags
    					pstring;																			// tag
    					pstring;																			// title
      			  pstring;																			// Field name for things like printing & drag'n'drop
    					integer;																			// value
    					integer;																			// min
    					integer;																			// max
    					integer;																			// procID for the control
    					longint;																			// refcon
    					longint;																			// Control object flags
    					longint;																			// Control behavior flags
    					pstring;																			// Behavior string one
    					pstring;																			// Behavior string one
      			  
							integer = $$CountOf(PositionArray);		        // Array size
      			  array PositionArray {
      			  		switch {
      			  			case left:
      			  					key integer = 1;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case top:
      			  					key integer = 2;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case right:
      			  					key integer = 3;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case bottom:
      			  					key integer = 4;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case height:
      			  					key integer = 5;
      			  					integer;															// height

      			  			case width:
      			  					key integer = 6;
      			  					integer;															// width
      			  					
      			  			case horizontal:
      			  					key integer = 7;
      			  					integer alignLeft				= 0,					// left align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignRight			= 2;					// right align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags
      			  					
      			  			case vertical:
      			  					key integer = 8;
      			  					integer alignTop				= 0,					// top align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignBottom			= 2;					// bottom align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags
      			  		};
							};
    			case controlResourceObject:
    					key integer = 3;
    					longint;																			// Object flags
    					pstring;																			// tag
      			  pstring;																			// Field name for things like printing & drag'n'drop
    					integer;																			// 'CNTL' resource ID
    					longint;																			// Control behavior flags
    					pstring;																			// First behavior related name
    					pstring;																			// Second behavior related name
      			  
							integer = $$CountOf(PositionArray);		        // Array size
      			  array PositionArray {
      			  		switch {
      			  			case left:
      			  					key integer = 1;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case top:
      			  					key integer = 2;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case right:
      			  					key integer = 3;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case bottom:
      			  					key integer = 4;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case height:
      			  					key integer = 5;
      			  					integer;															// height

      			  			case width:
      			  					key integer = 6;
      			  					integer;															// width
      			  					
      			  			case horizontal:
      			  					key integer = 7;
      			  					integer alignLeft				= 0,					// left align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignRight			= 2;					// right align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags
      			  					
      			  			case vertical:
      			  					key integer = 8;
      			  					integer alignTop				= 0,					// top align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignBottom			= 2;					// bottom align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags
      			  		};
							};
    			case pictureObject:
    					key integer = 4;
    					longint;																			// Object flags
    					pstring;																			// tag
      			  pstring;																			// Field name for things like printing & drag'n'drop
    					literal longint;															// Drag flavor we'll accept
      			  
							integer = $$CountOf(PositionArray);		        // Array size
      			  array PositionArray {
      			  		switch {
      			  			case left:
      			  					key integer = 1;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case top:
      			  					key integer = 2;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case right:
      			  					key integer = 3;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case bottom:
      			  					key integer = 4;
      			  					integer;															// Delta (or percentage when relToWidth or relToHeight)
      			  					integer tabObject				= -1;					// relative to this object
      			  					integer relToNothing		= 0,					// relative to this coordinate of the parent object
      			  									relToLeft				= 1,
      			  									relToTop				= 2,
      			  									relToRight			= 3,
      			  									relToBottom			= 4,
      			  									relToHorzCenter	= 5,					// Absolute horizontal center
      			  									relToVertCenter	= 6,					// Absolute vertical center
      			  									relToWidth			= 7,					// Delta contains percentage of width
      			  									relToHeight			= 8;					// Delta contains percentage of height
      			  					longint;															// Relativity flags

      			  			case height:
      			  					key integer = 5;
      			  					integer;															// height

      			  			case width:
      			  					key integer = 6;
      			  					integer;															// width
      			  					
      			  			case horizontal:
      			  					key integer = 7;
      			  					integer alignLeft				= 0,					// left align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignRight			= 2;					// right align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags
      			  					
      			  			case vertical:
      			  					key integer = 8;
      			  					integer alignTop				= 0,					// top align relative to another object
      			  									alignCenter			= 1,					// center align relative to another object
      			  									alignBottom			= 2;					// bottom align relative to another object
      			  					integer tabObject				= -1;					// relative to this object
      			  					longint;															// Relativity flags
      			  		};
      			  };
				};
		};
};
#endif
