/****************************************************************************************


		MFRTypes.r


		Copyright (c)1990 - 1999 MetaCreations. All rights reserved.

											     
		Author:	Ray Dream
		Date:	?

		Revision History

		when		who			what & why
		==========	==========	======================================================
		4/5/99		Greg		Added PlainFlat tool style
		2/10/99		Greg		massive TBAR changes relating to draw styles, layouts
		1/9/99		tsh			move FTYP stuff to MCRTypes.r in $/MCCore/PublicAPI
		1/5/99		Greg		Added procedural shadow tag to TBAR 
		1/4/99		Yann		Removed 'illegal' #include of $/MCF/MFResDefines.h
		11/17/98	Greg		Added alwaysEnabled,normalEnabling to TBAR
		10/15/98	Greg		Removed image size from TBAR resource

****************************************************************************************/

#ifndef __MFRTYPES_R__
#define __MFRTYPES_R__


#include "MCRTypes.r"
	
//******************************************************************
//
// CMNU
//
										
type 'CMNU' {
	integer;
	fill word[2];
	integer textMenuProc = 0;
	fill word;
	unsigned hex bitstring[31] allEnabled = 0x7FFFFFFF;
	boolean disabled, enabled;
	pstring;
	wide array {
		pstring;
		byte noIcon;
		char noKey = "\0x00", hierarchicalMenu = "\0x1B";
		char noMark = "\0x00", check = "\0x12";
		fill bit;
		unsigned bitstring[7]	plain;
		align word;
		longint nocommand = 0;
		};
	byte = 0;
	};

//******************************************************************
//
// TxSt
//

type 'TxSt' {
	unsigned byte tsPlain=0, tsBold=1, tsItalic=2, tsUnderline=4, tsOutline=8,
				tsShadow=16, tsCondense=32, tsExtend=64;
	align word;
	integer;								// Size
	wide array [3] {						// Color
		unsigned hex integer;
		};
	pstring;								// Name
	};


//******************************************************************
//
// TBAR
//

#define tSeparator -1
#define tBeginToolGroup -2
#define tEndToolGroup -3
/*
type 'TBAR' {

	pstring;										// title
	integer noShadows = 0,
			shadows = 1;							// generate shadows?

	integer = $$CountOf(ToolArray);					// number of tools	
	wide array ToolArray {
		integer;									// tool ID
		pstring;									// tool name (used in tool tip)
		fill BYTE;
		char noKey = "\0x00";						// key accelerator
		integer noAction = -1; 						// action number
		integer normalEnabling = 0,
				alwaysEnabled = 1;					// enabling policy: normalEnabling means
													// that enabling must be done in 
													// SelfPrepareMenus() via EnableGlobalTool().

		integer;									// UImg ID: unpressed enabled

		// Any of the following image IDs may be zero.  In that case, these images will
		// be generated procedurally from the unpressed enabled ID.
		integer;									// UImg ID: unpressed mouse over
		integer;									// UImg ID: pressed mouse over
		integer;									// UImg ID: pressed enabled
		integer;									// UImg ID: unpressed disabled
		integer;									// UImg ID: pressed disabled
		};
	};
*/
type 'TBAR' 
{
	pstring;										// title

	integer straightLayout = 0,						// layout
	        honeycombLayout = 1;

	integer = $$CountOf(ToolArray);					// number of tools	
	wide array ToolArray 
	{
		longint;									// tool ID
		pstring;									// tool name (used in tool tip)
		fill BYTE;
		char noKey = "\0x00";						// key accelerator
		integer noAction = -1; 						// action number
		integer normalEnabling = 0,
				alwaysEnabled = 1;					// enabling policy: normalEnabling means
													// that enabling must be done in 
													// SelfPrepareMenus() via EnableGlobalTool().
		switch 
		{
		case style_normal:
			key integer = 0;
			
			integer noShadow = 0,
                    useShadow = 1;
			        
			integer;								// UImg ID: unpressed enabled
			integer procedural = 0;					// UImg ID: unpressed mouse over
			integer procedural = 0;					// UImg ID: pressed mouse over
			integer procedural = 0;					// UImg ID: pressed enabled
			integer procedural = 0;					// UImg ID: unpressed disabled
			integer procedural = 0;					// UImg ID: pressed disabled		
		
		case style_flat:
			key integer = 1;
	
			integer;								// UImg ID: icon
		
		case style_inset:
			key integer = 2;
		
			integer;								// UImg ID: icon
			
		case style_overlay:
			key integer = 3;

			integer noShadow = 0,
			        useShadow = 1;

			integer;								// UImg ID: background
			integer;								// UImg ID: overlay
		case style_plainflat:
			key integer = 4;
	
			integer;								// UImg ID: icon
		case style_overlaytransfer:
			key integer = 5;
	
			integer;								// UImg ID: icon
		
		};
	};
};

//******************************************************************
//
// RERR
//

type 'RERR' {
	integer = $$CountOf(ErrorsArray);
	wide array ErrorsArray{						
		integer;
		integer;
		integer;
		};
	};

//******************************************************************
//
// TABS
//

type 'TABS' {
	integer = $$CountOf(TabsArray);				/* Number of tabs */
	wide array TabsArray{
		integer noView = -1;					/* view ID 	*/
		pstring;								/* name	  	*/
		integer noIcon = -1;					/* icon ID  */
		};
	};
	
//******************************************************************
//
// CLPS
//

type 'CLPS' {
	integer = $$CountOf(ViewsArray);			/* Number of collapsible views */
	wide array ViewsArray{
		integer noView = -1;					/* view ID 	*/
		pstring;								/* name		*/
		integer expanded = 0, collapsed = 1;	/* collapse status */
		};
	
	};

//******************************************************************
//
// Xs2n
//

// Resource to map a string to a number. This can be used
// for constructing popup menus.
type 'Xs2n' {	// String-to-Number translation
	integer = $$CountOf(s2nArray);
	wide array s2nArray{						
		pstring; longint;
		};
	};

//******************************************************************
//
// DPND
//

#define kDim 1
#define kNotDim 2

type 'DPND' {
		array TypeArray { 
			literal longint;	/* srcID */
			literal longint;	/* dstID	*/
			literal longint;	/* dependency kind */
			};
	};


//******************************************************************
//
// Body Parts for windoids
//

type 'BdPt'	{
	cstring;
	};

//******************************************************************
//
// Ghost menu
//

type 'ghmn' {
	longint = $$CountOf(TypeArray);		/* Number of tools */ 
	wide array TypeArray{
		longint; /* irow */
		longint; /* icol */
		longint; /* ires */
		longint; /* tool */
		pstring; /* title */
		longint; /* action */
		};
	};

//******************************************************************
//
// TIPS
//

type 'TIPS' {
	longint = $$CountOf(TypeArray);		/* Number of tips */ 
	wide array TypeArray{
		longint; /* res id of node */
		};
	};

#endif