home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-25 | 19.9 KB | 798 lines | [TEXT/MPS ] |
- {$P}
- {[a-,body+,h-,o=100,r+,rec+,t=4,u+,#+,j=20/57/1$,n-]}
- { UTranscriptView.inc1.p }
- { copyright © 1985-1990 by Apple Computer, Inc. All rights reserved. }
-
- {$IFC NOT qDebugTheDebugger}
- {$W+}
- {$R-}
- {$Init-}
- {$OV-}
- {$ENDC}
- {$IFC qNames}
- {$D+}
- {$ENDC}
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE IDUTranscriptView; { Writeln UTranscriptView's compile time. }
- { Writeln UTranscriptView's compile time. }
-
- BEGIN
- WriteLn('UTranscriptView of ', COMPDATE, ' @ ', COMPTIME);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.RowToIndex(row: INTEGER): INTEGER;
- { Returns the row as an index for fLineLengths and fLineStarts }
-
- BEGIN
- IF fFirstLineIndex + row < fRows THEN
- RowToIndex := fFirstLineIndex + row
- ELSE
- RowToIndex := fFirstLineIndex + row - fRows;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.IndexToRow(index: INTEGER): INTEGER;
- { Returns the index as a row }
-
- BEGIN
- IF index - fFirstLineIndex >= 0 THEN
- IndexToRow := index - fFirstLineIndex
- ELSE
- IndexToRow := index - fFirstLineIndex + fRows;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.IndexToLocal(index: INTEGER): INTEGER;
- { returns the v-coordinate of the given row }
-
- BEGIN
- IndexToLocal := kVMargin + (IndexToRow(index) + 1) * fFontHeight - fFontInfo.leading -
- fFontInfo.descent;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.LocalToIndex(local: INTEGER): INTEGER;
- { returns the line that contains the v coordinate }
-
- BEGIN
- LocalToIndex := RowToIndex(((local - kVMargin - fFontInfo.leading - fFontInfo.descent) + 1) DIV
- fFontHeight);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.InstallTextStyle(theStyle: TextStyle);
-
- VAR
- savePort: GrafPtr;
- aFontInfo: FontInfo;
-
- BEGIN
- GetTextStyleFontInfo(theStyle, aFontInfo);
- fTextStyle := theStyle;
- fFontInfo := aFontInfo;
-
- WITH aFontInfo DO
- fFontHeight := Ascent + descent + leading;
-
- Resize((2 * kHMargin) + (fCols * fFontInfo.widMax), (2 * kVMargin) + (fFontHeight *
- (fInsertionPt.v + 1)), kInvalidate);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.IndexColToLocal(index, col: INTEGER): Point;
-
- BEGIN
- IndexColToLocal.v := IndexToLocal(index);
- HLock(Handle(fText));
- IndexColToLocal.h := kHMargin + TextWidth(QDPtr(fText^), fLineStarts^^[index], col);
- HUnLock(Handle(fText));
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.LocalToCol(local: INTEGER): INTEGER;
- { returns the line that contains the v coordinate }
-
- BEGIN
- {??? LocalToCol := ((local - kVMargin) + 1) DIV fFontHeight;}
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.PrevIndex(ln: INTEGER): INTEGER;
- { returns the line previous to the line; wrapped circularly }
-
- BEGIN
- IF ln - 1 < 0 THEN
- PrevIndex := fRows - 1
- ELSE
- PrevIndex := ln - 1;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.SuccIndex(ln: INTEGER): INTEGER;
- { returns the line succeeding the line; wrapped circularly }
-
- BEGIN
- IF ln + 1 >= fRows THEN
- SuccIndex := 0
- ELSE
- SuccIndex := ln + 1;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.GetInsertionPointRect: Rect;
-
- VAR
- pt: Point;
- insertionPtIndex: INTEGER;
-
- BEGIN
- WITH pt DO
- BEGIN
- insertionPtIndex := RowToIndex(fInsertionPt.v);
- pt := IndexColToLocal(insertionPtIndex, fLineLengths^^[insertionPtIndex]);
- SetRect(GetInsertionPointRect, h, v - fFontInfo.Ascent, h + 1, v + fFontInfo.descent);
- END;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWInit}
-
- PROCEDURE TTranscriptView.CommonInit(itsSuperView: TView;
- outputFont, outputSize: INTEGER;
- numLines, numCharsPerLine: INTEGER);
-
- VAR
- aFontInfo: FontInfo;
- control: ControlHandle;
- i: INTEGER;
- aLine: StringHandle;
- vhs: VHSelect;
- VPt: VPoint;
- zoomedOutSize: Point;
-
- BEGIN
- fHelpProc := NIL;
- fText := NIL;
- fLineLengths := NIL;
- fLineStarts := NIL;
-
- fGotRefnum := FALSE;
- fWrToWindow := TRUE;
- fWrToFile := TRUE;
- fUpdateRgn := NIL;
-
- fForcePtr := 0;
-
- fRows := numLines; { # lines in window }
- fCols := numCharsPerLine; { chars / line }
- fTotal := fRows * fCols; { total chars in window }
-
- fText := TextHandle(NewPermHandle(fTotal));
- FailNil(fText);
-
- fLineLengths := LineLensHandle(NewPermHandle(fRows * SIZEOF(INTEGER)));
- FailNil(fLineLengths);
-
- fLineStarts := LineLensHandle(NewPermHandle(fRows * SIZEOF(INTEGER)));
- FailNil(fLineStarts);
-
- fUpdateRgn := MakeNewRgn;
-
- FOR i := 0 TO fRows - 1 DO
- fLineLengths^^[i] := 0;
-
- FOR i := 0 TO fRows - 1 DO
- fLineStarts^^[i] := 0;
-
- fFirstLineIndex := 0;
-
- fLastInsertionPointTime := 0;
- fInsertionPointOn := FALSE;
- fInsertionPt.v := 0;
- fInsertionPt.h := 0;
- fLastCh := chr(0);
-
- {$Push} {$H-}
- SetTextStyle(fTextStyle, outputFont, [], outputSize, gRGBBlack);
- GetTextStyleFontInfo(fTextStyle, aFontInfo);
- {$Pop}
-
- WITH aFontInfo DO
- fFontHeight := Ascent + descent + leading;
-
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWInit}
-
- PROCEDURE TTranscriptView.ITranscriptView(itsSuperView: TView;
- outputFont, outputSize: INTEGER;
- numLines, numCharsPerLine: INTEGER);
-
- VAR
- VPt: VPoint;
-
- BEGIN
- IView(NIL, itsSuperView, gZeroVPt, gZeroVPt, sizeFixed, sizeFixed);
- CommonInit(itsSuperView, outputFont, outputSize, numLines, numCharsPerLine);
-
- Resize((2 * kHMargin) + (fCols * fFontInfo.widMax), 2 * kVMargin, kDontInvalidate);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWInit}
-
- PROCEDURE TTranscriptView.IRes(itsDocument: TDocument;
- itsSuperView: TView;
- VAR itsParams: Ptr);
-
- VAR
- vhs: VHSelect;
-
- BEGIN
- INHERITED IRes(itsDocument, itsSuperView, itsParams);
-
- CommonInit(itsSuperView, 1, 9, 120, 100);
-
- Resize((2 * kHMargin) + (fCols * fFontInfo.widMax), 2 * kVMargin, kDontInvalidate);
- END;
-
- {--------------------------------------------------------------------------------------------------}
-
- PROCEDURE CallHelpProc(actionProc: ProcPtr);
- INLINE $205F, $4E90;
- { MOVE.L (A7)+,A0
- JSR (A0)
- }
-
- {--------------------------------------------------------------------------------------------------}
- {$S MAHelp}
-
- FUNCTION TTranscriptView.DoHelp(VAR info: EventInfo;
- VAR message: UNIV LONGINT): TCommand;
-
- BEGIN
- DoHelp := NIL;
- IF fHelpProc <> NIL THEN
- CallHelpProc(fHelpProc);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.RevealInsertionPoint;
-
- VAR
- r: Rect;
- vr: VRect;
- p: Point;
-
- BEGIN
- IF Focus THEN
- BEGIN
- {$Push} {$H-}
- SetPortTextStyle(fTextStyle);
- {$Pop}
-
- r := GetInsertionPointRect;
- RectToVRect(r, vr);
- SetPt(p, fFontInfo.widMax, fFontHeight + kVMargin);
- RevealRect(vr, p, kRedraw);
- END;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.RevealInsertionPointLine;
-
- VAR
- r: Rect;
- vr: VRect;
- p: Point;
-
- BEGIN
- r := GetInsertionPointRect;
- RectToVRect(r, vr);
- vr.left := flocation.h;
- SetPt(p, 0, fFontHeight + kVMargin);
- RevealRect(vr, p, kRedraw);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.AddTextToFile(textBuf: Ptr;
- byteCount: INTEGER);
-
- VAR
- count: LONGINT;
-
- BEGIN
- IF fGotRefnum THEN
- BEGIN
- count := byteCount;
- IF FSWrite(fRefnum, count, textBuf) <> noErr THEN
- BEGIN
- { ??? do something here ??? }
- END;
- END;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.AddText(textBuf: Ptr;
- byteCount: INTEGER);
-
- VAR
- ch: Char;
- count: LONGINT;
- gotBS: BOOLEAN;
- gotEOL: BOOLEAN;
- pt: Point;
- r, r2: Rect;
- startCount: INTEGER;
- startPtr: Ptr;
- vr: VRect;
- newOffset: INTEGER;
- tempIndex: INTEGER;
- startLength: INTEGER;
- aScroller: TScroller;
- insertionPtIndex: INTEGER;
- doInfiniteScroll: BOOLEAN;
-
- BEGIN
- IF fWrToFile THEN
- AddTextToFile(textBuf, byteCount);
-
- IF fWrToWindow THEN
- { draw as many lines as we got }
- WHILE byteCount > 0 DO
- BEGIN
- gotEOL := FALSE;
- gotBS := FALSE;
- startPtr := textBuf;
- startCount := byteCount;
- insertionPtIndex := RowToIndex(fInsertionPt.v);
- startLength := fLineLengths^^[insertionPtIndex];
-
- { Scan for a chunk to save }
- WHILE (byteCount > 0) & (fLineLengths^^[insertionPtIndex] < fCols) & (NOT gotEOL) &
- (NOT gotBS) DO
- BEGIN
- {$push} {$R-}
- ch := chr(QDPtr(textBuf)^);
- {$pop}
- textBuf := Ptr(ORD(textBuf) + 1);
- byteCount := byteCount - 1;
-
- CASE ch OF
- kWWEol:
- gotEOL := TRUE;
- chBackspace:
- gotBS := TRUE;
- OTHERWISE
- BEGIN
- tempIndex := fLineStarts^^[insertionPtIndex] + fLineLengths^^[
- insertionPtIndex];
- fText^^[tempIndex] := ch;
- fLineLengths^^[insertionPtIndex] := fLineLengths^^[insertionPtIndex] + 1;
- END;
- END;
- END;
-
- { Draw the chunk if possible }
- IF Focus THEN
- BEGIN
- {$Push} {$H-}
- SetPortTextStyle(fTextStyle);
- {$Pop}
- IF NOT gotBS THEN
- BEGIN
- WITH pt, r DO
- BEGIN
- pt := IndexColToLocal(insertionPtIndex, startLength);
- MoveTo(h, v);
- DrawText(QDPtr(startPtr), 0, startCount - byteCount - ORD(gotEOL));
- END;
- END
- ELSE
- BEGIN
- IF fLineLengths^^[insertionPtIndex] > 0 THEN { don't backspace past beginning of
- line! }
- BEGIN
- r2 := GetInsertionPointRect;
- fLineLengths^^[insertionPtIndex] := fLineLengths^^[insertionPtIndex] - 1;
- r := GetInsertionPointRect;
- r.right := r2.right;
- InvalidRect(r);
- END;
- END;
- END;
-
- { handle newline and line wrap if any }
- IF gotEOL | (fLineLengths^^[insertionPtIndex] >= fCols) THEN
- BEGIN
- { set the starting offset of the next line in the buffer }
- newOffset := fLineStarts^^[insertionPtIndex] + fLineLengths^^[insertionPtIndex] + 1;
- IF newOffset >= (fTotal - fCols) THEN { save space for a full line }
- newOffset := 0;
-
- fInsertionPt.v := fInsertionPt.v + 1;
- IF fInsertionPt.v = fRows THEN
- BEGIN
- fInsertionPt.v := fRows - 1;
- fFirstLineIndex := SuccIndex(fFirstLineIndex);
- doInfiniteScroll := TRUE;
- END
- ELSE
- doInfiniteScroll := FALSE;
- insertionPtIndex := SuccIndex(insertionPtIndex);
-
- fLineStarts^^[insertionPtIndex] := newOffset; { offset to store text at }
- fLineLengths^^[insertionPtIndex] := 0; { new line starts out zero length }
-
- IF Focus THEN
- BEGIN
- aScroller := GetScroller(FALSE);
- {$Push} {$H-}
- IF EqualVPt(aScroller.fTranslation, aScroller.fMaxTranslation) THEN
- {$Pop}
- BEGIN
- IF doInfiniteScroll THEN
- BEGIN
- GetVisibleRect(r);
- ScrollRect(r, 0, - fFontHeight, fUpdateRgn);
- END;
- END
- ELSE
- BEGIN
- IF doInfiniteScroll THEN
- { pretend we're up a line }
- BEGIN
- gLongOffset.v := max(gLongOffset.v - fFontHeight, 0);
- aScroller.fTranslation.v := max(aScroller.fTranslation.v - fFontHeight,
- 0);
- END;
- RevealInsertionPointLine;
- END;
- END;
-
- { Dynamic sizing of view }
- IF fInsertionPt.v < fRows THEN
- Resize((2 * kHMargin) + (fCols * fFontInfo.widMax), (2 * kVMargin) +
- (fFontHeight * (fInsertionPt.v + 1)), kDontInvalidate);
-
- END;
- Update; { Make sure everything is nice and visible }
- END;
- END;
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.EndForce;
-
- BEGIN
- IF fForcePtr <= 0 THEN
- BEGIN
- END
- ELSE
- BEGIN
- WITH fForceStack[fForcePtr] DO
- BEGIN
- fWrToWindow := toWindow;
- fWrToFile := toFile;
- END;
- fForcePtr := fForcePtr - 1;
- END;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.ForceOutput(wrToWindow, wrToFile: WrForceOptions);
-
- BEGIN
- IF fForcePtr >= kForceDepth THEN
- BEGIN
- END
- ELSE
- BEGIN
- fForcePtr := fForcePtr + 1;
-
- WITH fForceStack[fForcePtr] DO
- BEGIN
- toWindow := fWrToWindow;
- toFile := fWrToFile;
- END;
-
- IF wrToWindow <> WrForceUnchanged THEN
- fWrToWindow := wrToWindow = WrForceOn;
-
- IF wrToFile <> WrForceUnchanged THEN
- fWrToFile := wrToFile = WrForceOn;
- END;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.Redirect(vRefnum: INTEGER;
- fileName: StringPtr): OSErr;
-
- VAR
- err: OSErr;
- wantToAppend: BOOLEAN;
- x: LONGINT;
- fndrInfo: fInfo;
- aRefNum: INTEGER;
- aFileName: Str255;
-
- BEGIN
- Redirect := noErr;
- IF fGotRefnum THEN
- BEGIN
- { truncate the file to current position }
- err := GetFPos(fRefnum, x);
- err := SetEOF(fRefnum, x);
- err := FSClose(fRefnum);
- err := FlushVol(NIL, fVRefNum);
- fGotRefnum := FALSE;
- END;
-
- IF fileName <> NIL THEN
- BEGIN
- wantToAppend := POS('>>', fileName^) = 1;
- IF wantToAppend THEN
- aFileName := Copy(fileName^, 3, length(fileName^) - 2)
- ELSE
- aFileName := fileName^;
-
- IF aFileName <> '' THEN
- BEGIN
- err := Create(aFileName, vRefnum, 'MPS ', 'TEXT');
-
- IF err = dupFNErr THEN
- BEGIN
- err := GetFInfo(aFileName, 0, fndrInfo);
- IF err = noErr THEN
- IF fndrInfo.fdType <> 'TEXT' THEN
- err := dupFNErr;
- END;
-
- IF err = noErr THEN
- BEGIN
- err := FSOpen(aFileName, vRefnum, aRefNum);
- fRefnum := aRefNum;
- fVRefNum := vRefnum;
- Redirect := err;
-
- fGotRefnum := err = noErr;
-
- IF fGotRefnum THEN
- IF wantToAppend THEN
- BEGIN
- err := GetEOF(fRefnum, x);
- err := SetFPos(fRefnum, fsFromStart, x);
- END;
- END
- ELSE
- Redirect := err;
- END;
- END;
- END;
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.Scroll(howManyLines: INTEGER);
-
- BEGIN
- IF howManyLines <> 0 THEN
- GetScroller(FALSE).ScrollBy(0, howManyLines * fFontHeight, kRedraw);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.DoKeyCommand(ch: Char;
- aKeyCode: INTEGER;
- VAR info: EventInfo): TCommand; OVERRIDE;
-
- VAR
- message: LONGINT;
-
- BEGIN
- DoKeyCommand := NIL;
- EraseRect(GetInsertionPointRect);
- IF info.theCmdKey THEN
- CASE ch OF
- chReturn:
- ch := chDown;
- chBackspace:
- ch := chUp;
- END;
-
- CASE ch OF
- chPageUp, chPageDown, chHome, chEnd:
- DoKeyCommand := INHERITED DoKeyCommand(ch, aKeyCode, info);
- chDown:
- Scroll(1);
- chUp:
- Scroll( - 1);
- chHelp:
- IF fHelpProc <> NIL THEN
- DoKeyCommand := DoHelp(info, message)
- ELSE
- fLastCh := ch;
-
- OTHERWISE
- fLastCh := ch;
- END;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- FUNCTION TTranscriptView.DoIdle(phase: IdlePhase): BOOLEAN; OVERRIDE;
-
- BEGIN
- IF Focus THEN
- BEGIN
- IF GetWindow.fIsActive THEN
- {$Push} {$H-}
- SetPortTextStyle(fTextStyle);
- {$Pop}
- IF (TickCount - fLastInsertionPointTime) >= GetCaretTime THEN
- BEGIN
- fLastInsertionPointTime := TickCount;
- IF fInsertionPointOn THEN
- EraseRect(GetInsertionPointRect)
- ELSE
- FillRect(GetInsertionPointRect, black);
- fInsertionPointOn := NOT fInsertionPointOn;
- END
- END;
- DoIdle := FALSE;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S WWSeg}
-
- PROCEDURE TTranscriptView.Draw(area: Rect); OVERRIDE;
-
- VAR
- currIndex: INTEGER; { index of line to draw }
- startIndex: INTEGER; { save of the first line to draw's index }
- y: INTEGER; { y coord to draw at }
-
- BEGIN
- {$Push} {$H-}
- SetPortTextStyle(fTextStyle);
- {$Pop}
-
- currIndex := LocalToIndex(area.top);
- y := IndexToLocal(currIndex); { initial y coordinate snapped to a row }
-
- HLock(Handle(fText));
- REPEAT
- MoveTo(kHMargin, y);
- DrawText(QDPtr(fText^), fLineStarts^^[currIndex], fLineLengths^^[currIndex]);
- currIndex := SuccIndex(currIndex);
- y := y + fFontHeight;
- UNTIL (((y - fFontInfo.Ascent) > area.bottom) | (currIndex = fFirstLineIndex));
- HUnLock(Handle(fText));
-
- INHERITED Draw(area);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S MASelCommand}
-
- FUNCTION TTranscriptView.HandleMouseDown(theMouse: VPoint;
- VAR info: EventInfo;
- VAR hysteresis: Point;
- VAR theCommand: TCommand): BOOLEAN; OVERRIDE;
-
- BEGIN
- info.affectsMenus := FALSE; { Try to keep the debugger from interfering
- too much }
- HandleMouseDown := INHERITED HandleMouseDown(theMouse, info, hysteresis, theCommand);
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S MAClose}
-
- PROCEDURE TTranscriptView.Free; OVERRIDE;
-
- BEGIN
- IF Redirect(0, NIL) <> noErr THEN;
-
- Handle(fText) := DisposeIfHandle(fText);
- Handle(fLineLengths) := DisposeIfHandle(fLineLengths);
- Handle(fLineStarts) := DisposeIfHandle(fLineStarts);
-
- INHERITED Free;
- END;
-
- {--------------------------------------------------------------------------------------------------}
- {$S MAFields}
-
- PROCEDURE TTranscriptView.Fields(PROCEDURE DoToField(fieldName: Str255;
- fieldAddr: Ptr;
- fieldType: INTEGER)); OVERRIDE;
-
- VAR
- theFlag: BOOLEAN;
- i: INTEGER;
-
- BEGIN
- DoToField('TTranscriptView', NIL, bClass);
-
- DoToField('fWrToWindow', @fWrToWindow, bBoolean);
- DoToField('fWrToFile', @fWrToFile, bBoolean);
- DoToField('fCols', @fCols, bInteger);
- DoToField('fRows', @fRows, bInteger);
- DoToField('fTotal', @fTotal, bInteger);
- DoToField('fText', @fText, bHandle);
- DoToField('fLineLengths', @fLineLengths, bHandle);
- DoToField('fLineStarts', @fLineStarts, bHandle);
-
- DoToField('fFirstLineIndex', @fFirstLineIndex, bInteger);
-
- {$Push} {$H-}
- TextStyleFields('fTextStyle', fTextStyle, DoToField);
- {$Pop}
- DoToField('fFontHeight', @fFontHeight, bInteger);
- DoToField('fFontInfo', NIL, bTitle);
- DoToField(' ascent', @fFontInfo.Ascent, bInteger);
- DoToField(' descent', @fFontInfo.descent, bInteger);
- DoToField(' widMax', @fFontInfo.widMax, bInteger);
- DoToField(' leading', @fFontInfo.leading, bInteger);
-
- DoToField('fGotRefnum', @fGotRefnum, bBoolean);
- DoToField('fRefnum', @fRefnum, bInteger);
- DoToField('fVRefNum', @fVRefNum, bInteger);
-
- DoToField('fHelpProc', @fHelpProc, bPointer);
- DoToField('fLastInsertionPointTime', @fLastInsertionPointTime, bLongint);
- DoToField('fInsertionPointOn', @fInsertionPointOn, bBoolean);
- DoToField('fInsertionPt', @fInsertionPt, bPoint);
- DoToField('fLastCh', @fLastCh, bChar);
- DoToField('fUpdateRgn', @fUpdateRgn, bRgnHandle);
-
- DoToField('fForcePtr', @fForcePtr, bInteger);
- DoToField('fForceStack', NIL, bTitle);
- FOR i := 1 TO kForceDepth DO
- BEGIN
- DoToField(Concat(ConcatNumber(' [', i), '].toWindow'), @fForceStack[i].toWindow, bBoolean);
- DoToField(Concat(ConcatNumber(' [', i), '].toFile'), @fForceStack[i].toFile, bBoolean);
- END;
-
- INHERITED Fields(DoToField);
- END;
-