-- TEditFormat.mesa Edited by Paxton on December 2, 1982 2:48 pm
DIRECTORY
GraphicsOps USING [BitmapRef],
NodeStyle USING [LineFormatting, Ref],
TEditCompile USING [maxCharsPerLine],
TEditDocument USING [LineBreak, TEditDocumentData],
TextEdit USING [Offset, RefTextNode],
TextLooks USING [Looks, noLooks],
TextNode USING [Location],
VFonts USING [Font],
ViewerClasses USING [Viewer];
TEditFormat: CEDAR DEFINITIONS = BEGIN OPEN TextNode, TEditDocument;
GetLineBitmap: PROC [viewer: ViewerClasses.Viewer, tdd: TEditDocumentData,
node: TextEdit.RefTextNode, pos: TextEdit.Offset, formatInfo: FormatInfo,
trimEnd: BOOLEANFALSE]
RETURNS [bitmap: Bitmap] ;
FormatInfo: TYPE = REF FormatInfoRec ;
FormatInfoRec: TYPE = RECORD [
nodeStyle: NodeStyle.Ref ← NIL,
tabStyle: NodeStyle.Ref ← NIL,
charStyle: NodeStyle.Ref ← NIL,
font: VFonts.Font ← NIL,
lineFormatting: NodeStyle.LineFormatting ← NULL,
leftIndent: INTEGERNULL,
bodyIndent: INTEGERNULL,
firstIndent: INTEGERNULL,
lineMeasure: INTEGERNULL,
savedLooks: TextLooks.Looks ← TextLooks.noLooks,
tabWidth: INTEGERNULL, -- in char widths
italSlice: INTEGER ← 0,
italRem: INTEGER ← 0,
italPieces: INTEGER ← 0,
italInitDx: INTEGER ← 0,
italInitDy: CARDINAL ← 0,
italDy: CARDINAL ← 0,
italInitFdy: CARDINAL ← 0,
italFdy: CARDINAL ← 0
];
Bitmap: TYPE = REF BitmapRec ;
BitmapRec: TYPE = RECORD [
bits: GraphicsOps.BitmapRef,
yOffset: INTEGER ← 0,
ascent: INTEGER ← 0,
descent: INTEGER ← 0,
width: INTEGER ← 0,
chars: INTEGER ← 0,
leftIndent: INTEGER ← 0,
break: LineBreak
];
CharWidth: TYPE = INTEGERLAST[INTEGER];
LineInfoRec: TYPE = ARRAY [0..TEditCompile.maxCharsPerLine) OF CharWidth;
LineInfo: TYPE = REF LineInfoRec;
GetLineInfo: PROC [viewer: ViewerClasses.Viewer, tdd: TEditDocumentData,
pos: Location, nodeStyle: NodeStyle.Ref]
RETURNS [lineInfo: LineInfo, ascent: INTEGER, descent: INTEGER,
nextPos: Location, nChars: CARDINAL, leading: INTEGER] ;
END.