
****************************************************************
* equates for the tool number and version number
****************************************************************
TEVersionNumber	equ  $0104	;2-Apr-93 SS
TEToolNumber	equ  34
StyleRecordVersion	equ  0
;---------------------------------------------------------------




****************************************************************
* equates for the standard menu items
****************************************************************
	DSECT  250
UndoItemID	byte
CutItemID	byte
CopyItemID	byte
PasteItemID	byte
ClearItemID	byte
;---------------------------------------------------------------




****************************************************************
* Error codes
****************************************************************
	DSECT  TEToolNumber*256+$01
teAlreadyStarted	byte
teNotStarted	byte
teInvalidHandle	byte
teInvalidVerb	byte
teInvalidFlag	byte
teInvalidPCount	byte
teInvalidRect	byte
teBufferOverflow	byte
teInvalidLine	byte
teInvalidCall	byte
teInvalidParameter	byte
teInvalidTextBox2	byte
teNeedsTools	byte
;---------------------------------------------------------------




****************************************************************
* equates for super arrays
****************************************************************
ItemsInSmallBlock	equ  32
ItemsInMediumBlock	equ  256
ItemsInLargeBlock	equ  1024

SuperItemSize	equ  8

SizeOfSmallBlock	equ  ItemsInSmallBlock*SuperItemSize+SuperBlock.RecordSize
SizeOfMediumBlock	equ  ItemsInMediumBlock*SuperItemSize+SuperBlock.RecordSize
SizeOfLargeBlock	equ  ItemsInLargeBlock*SuperItemSize+SuperBlock.RecordSize
;---------------------------------------------------------------




****************************************************************
* equates for the block list
****************************************************************
MinBlockSize	equ  2*1024
SplitBlockSize	equ  4*1024
MaxBlockSize	equ  6*1024
;---------------------------------------------------------------




****************************************************************
* verbs
****************************************************************
dataIsMask	equ  %00000111
dataIsPString	equ  %00000000
dataIsCString	equ  %00000001
dataIsC1Input	equ  %00000010
dataIsC1Output	equ  %00000011
dataIsTextBox2	equ  %00000100
dataIsTextBlock	equ  %00000101
onlyGetSelection	equ  %00100000
;---------------------------------------------------------------
textIsMask	equ  %00011000
textIsPointer	equ  %00000000
textIsHandle	equ  %00001000
textIsResource	equ  %00010000
textIsNewHandle	equ  %00011000
;---------------------------------------------------------------
refIsMask	equ  %00000011
refIsPointer	equ  %00000000
refIsHandle	equ  %00000001
refIsResource	equ  %00000010
refIsNewHandle	equ  %00000011
;---------------------------------------------------------------
colorIsMask	equ  %00001100
colorIsPointer	equ  %00000000
colorIsHandle	equ  %00000100
colorIsResource	equ  %00001000
colorIsNewHandle	equ  %00001100
;---------------------------------------------------------------




****************************************************************
* masks for the inital parameter flags field.
****************************************************************
fNotControl	equ  $8000
fSingleFormat	equ  $4000
fSingleStyle	equ  $2000
fNoWordWrap	equ  $1000
fNoScroll	equ  $0800
fReadOnly	equ  $0400
fSmartCutPaste	equ  $0200
fTabSwitch	equ  $0100
fDrawBounds	equ  $0080
fColorHilight	equ  $0040
fGrowRuler	equ  $0020
fDisableSelection	equ  $0010
fDrawInactiveSelc	equ  $0008
;---------------------------------------------------------------




****************************************************************
* masks for the control flags field.
****************************************************************
fInvisible	equ  $80
fRecordDirty	equ  $40
;---------------------------------------------------------------




****************************************************************
* masks for the text block flags field.
****************************************************************
fBlockIsDirty	equ  $8000
;---------------------------------------------------------------




****************************************************************
* equates for the selectionStyle flag word
****************************************************************
fUseFont	equ  $0020
fUseSize	equ  $0010
fUseForeColor	equ  $0008
fUseBackColor	equ  $0004
fUseUserData	equ  $0002
fUseAttributes	equ  $0001
;---------------------------------------------------------------




****************************************************************
* equates for the TEStyleChange call
****************************************************************
fReplaceFont	equ  $0040
fReplaceSize	equ  $0020
fReplaceForeColor	equ  $0010
fReplaceBackColor	equ  $0008
fReplaceUserData	equ  $0004
fReplaceAttributes	equ  $0002
fSwitchAttributes	equ  $0001
;---------------------------------------------------------------




****************************************************************
* equates for the TEPaintText call
****************************************************************
fPartialLine	equ  $8000
fDontDraw	equ  $4000
;---------------------------------------------------------------




****************************************************************
* masks for the ruler flag word
****************************************************************
fEqualLineSpacing	equ  $8000
fShowInvisibles	equ  $4000
;---------------------------------------------------------------




****************************************************************
* resource ID's for TextEdit
****************************************************************
rStyleBlock	equ  $8012
rTEColorTable	equ  $800D

rTERuler	equ  $8025

rPString	equ  $8006
rCString	equ  $801D
rC1InputString	equ  $8005
rC1OutputString	equ  $8023
rTextBox2	equ  $800B
rTextBlock	equ  $8016
;---------------------------------------------------------------




****************************************************************
* part codes for the TextEdit defProc
****************************************************************
	DSECT  130
Text_Part	byte		;these are indicator part codes
ScrollBar_Part	byte
GrowBox_Part	byte
;---------------------------------------------------------------




****************************************************************
* filter proc command codes
****************************************************************
	DSECT  1
doEraseRect	byte
doEraseBuffer	byte
doRectChanged	byte
doHilightRect	byte
doHilightBuffer	byte

;---------------------------------------------------------------




****************************************************************
* equates for the keystroke operation codes
****************************************************************
	DSECT  0
opNormal	word	;let TextEdit handle the operation
opNothing	word	;ignore the character (or text block)
opReplaceText	word	;replace the selection by the text in theInputHandle
opMoveCursor	word	;move the cursor to the offset given by cursorOffset
opExtendLeft	word	;extend the cursor left to the offset given by cursorOffset
opExtendRight	word	;extend the cursor right to the offset given by cursorOffset
opCut	word	;CUT the selection
opCopy	word	;COPY the selection
opPaste	word	;PASTE the selection
opClear	word	;CLEAR (delete) the selection
;---------------------------------------------------------------




****************************************************************
* tab types
****************************************************************
	DSECT  0
noTabs	byte
equalTabs	byte
variableTabs	byte
;---------------------------------------------------------------




****************************************************************
* ruler justification codes
****************************************************************
	DSECT  0
leftJust	byte
centerJust	byte
fullJust	byte

rightJust	equ  $FFFF
;---------------------------------------------------------------




****************************************************************
* maximum string lengths
****************************************************************
maxPascalSize	equ  256
maxC1InputSize	equ  65535
maxC1OutputSize	equ  65535
maxTextBox2Size	equ  65536-16
;---------------------------------------------------------------




****************************************************************
* miscellaneous equates
****************************************************************
;---------------------------------------------------------------
styleScrap	equ  100
;---------------------------------------------------------------
MaxInfoCount	equ  6
;---------------------------------------------------------------
MinBoundsDeltaH	equ  20
MinBoundsDeltaV	equ  20
;---------------------------------------------------------------
TRUE	equ  $FFFF
FALSE	equ  $0000
;---------------------------------------------------------------
CR	equ  13
TAB	equ  9
;---------------------------------------------------------------




****************************************************************
* Default values for the initial parameter block
****************************************************************
IndentTopDefault		equ  2
IndentLeftDefault		equ  6
IndentBottomDefault		equ  2
IndentRightDefault		equ  4

DefaultVertScrollAmount	equ  9

DefaultTabType		equ  equalTabs
DefaultTabValue		equ  64
;---------------------------------------------------------------




;---------------------------------------------------------------
ReturnSpace	equ  6+2+4+4+1+1
;---------------------------------------------------------------
