

	DSECT $04



****************************************************************
* these order of these variables must not change
****************************************************************
ParameterSpace	block 28	;this is the space for parameters
****************************************************************



****************************************************************
* these vars must not be changed even BETWEEN calls
****************************************************************
UserID	word
QDDirectPage	word
WidthTableHandle	long
DataBufferHandle	long
DrawPortPtr	long
PPToPortCodeHandle	long
ScrollCodeHandle	long
RecordInUse	long
SuperInUse	word
****************************************************************



****************************************************************
* these vars may be changed between calls
****************************************************************
DataBufferSize	word

WidthTablePtr	long
WidthTableOffset	word
WidthTableDepth	word

ParameterPtr	long
RecordPtr	long

TextOffset	long
TextPtr	long
TextCount	word
TextStyleOffset	long

TempPtr	long		;the order of these three variables MUST
TempWord	word		;..not change !!!
TempLong	long

;---------------------------------------------------------------
FirstFastVariable	DSectSize

BlockHandle	long		;these must all stay together because the
BlockLength	long		;..fast drawing routines use these
BlockStart	long
BlockCount	word

SuperRecordPtr	long		;..and these
TheSuperHandle	long
SuperStart	long
SuperLength	long
SuperMaxIndex	word

SourcePtr	long		;..and these
DestPtr	long
MoveLength	long
MemoryPtr	long

MaxFastVariable	DSectSize
;---------------------------------------------------------------

LineHeight	word
LineAscent	word

InputTextPtr	long
InputStylePtr	long

TextVPos	word
FixedHPos	long

SelectionLength	long

OriginalOffset	long
OriginalVPos	word
OriginalHPos	word

AmountScrolled	long
AmountLeft	long

RemovedHeight	long
ScrollDelta	long

LineLength	word
LastLineLength	word
SelcEndOffset	word
SelcStartOffset	word
LineStartLeft	word
LineStartOffset	long
LineEndOffset	long

StyleItemCount	long

WorkArea	block 20

****************************************************************

TheLastVariable	DSectSize
	IF TheLastVariable>$F0 THEN
	    WRITE 'DummyPC = '
	    WRITELN TheLastVariable
	    AERROR 'WARNING... Direct page variables have overflowed !'
	ENDIF



****************************************************************
* structured variables (always at the end)
****************************************************************
TempRect	RECORD $F0		;full $10 bytes
top	ds.w  1
left	ds.w  1
bottom	ds.w  1
right	ds.w  1
	ORG   top
topleft	ds    Point
botRight	ds    Point
	ENDR
DrawRect	RECORD TempRect+8
top	ds.w  1
left	ds.w  1
bottom	ds.w  1
right	ds.w  1
	ORG   top
topleft	ds    Point
botRight	ds    Point
	ENDR
****************************************************************



****************************************************************
* aliases for the work area variables
****************************************************************
TempStyle	RECORD WorkArea
fontID	ds.l  1
	ORG   fontID
fontFamily	ds.w  1
fontAttr	ds.b  1
fontSize	ds.b  1
foreColor	ds.w  1
backColor	ds.w  1
userData	ds.l  1	;0=no user data, 0=call the user style hook
	ENDR
	DSECT WorkArea+TEStyle.RecordSize
NewStyleLength	long
FirstTextIndex	word
;---------------------------------------------------------------
	DSECT WorkArea
StyleListPtr	long
NewSuperLength	long
;---------------------------------------------------------------
	DSECT WorkArea
TheLineNumber	long
;---------------------------------------------------------------
	DSECT WorkArea
NewLineLength	long
;---------------------------------------------------------------
	DSECT WorkArea
SmartExtendFlag	long
;---------------------------------------------------------------
	DSECT WorkArea
AnchorPointStart	long
AnchorPointEnd	long
ClickKind	word
SaveForDoubleClick	word
;---------------------------------------------------------------
	DSECT WorkArea
OldBlockSize	word
;---------------------------------------------------------------




****************************************************************
* aliases for the parameter space variables
****************************************************************
RecordHandle	equ  ParameterSpace		;this remains locked during a call

	DSECT ParameterSpace+4
TheEventPtr	long
TheModifierWord	word

	DSECT ParameterSpace+4
OutputStyleRef	long
OutputStyleVerb	word
BufferLength	long
BufferRef	long
BufferVerb	word
NewBufferHandle	long
MustAddResFlag	word
BufferErrorFlag	word


	DSECT ParameterSpace+4
InputStyleRef	long
InputStyleVerb	word
InputTextLength	long
InputTextRef	long
InputTextVerb	word

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




****************************************************************
* equates for the fast drawing routines (these reuse the block
* and super variables)
****************************************************************
dstRect	RECORD FirstFastVariable
top	ds.w  1
left	ds.w  1
bottom	ds.w  1
right	ds.w  1
	ENDR

	DSECT FirstFastVariable+8
dstPtr	long
dstWidth	word
numberOfWords	word
numberOfLines	word
leftMask	word
rightMask	word

theCodePtr	long
newCodeSize	word

srcPtr	long
srcWidth	word

LastFastVariable	DSectSize
	IF LastFastVariable>MaxFastVariable THEN
	    WRITE 'DummyPC = '
	    WRITELN LastFastVariable
	    AERROR 'WARNING... The fast drawing variables have overflowed !'
	ENDIF
****************************************************************



****************************************************************
* aliases for other variables
****************************************************************
TextHPos	equ  FixedHPos+2

FixExtraSpace	equ  SelectionLength

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