DIRECTORY NodeStyle USING [Ref, TabStop], TEditCompile USING [maxCharsPerLine], TEditDocument USING [LineBreak, TEditDocumentData], TextEdit USING [Offset, RefTextNode], TextNode USING [Location], UnifiedFonts USING [FONT, FixedUnit]; TEditFormat: CEDAR DEFINITIONS = BEGIN TEditDocumentData: TYPE = TEditDocument.TEditDocumentData; Dimension: TYPE = UnifiedFonts.FixedUnit; FormatLine: PROC [tdd: TEditDocumentData, node: TextEdit.RefTextNode, startOffset: TextEdit.Offset, nodeStyle: NodeStyle.Ref, lineWidth: Dimension, buildBitmap: BOOL _ FALSE] RETURNS [LineInfo] ; LineInfo: TYPE = REF LineInfoRec ; LineInfoRec: TYPE = MACHINE DEPENDENT RECORD [ chars: ARRAY [0..TEditCompile.maxCharsPerLine) OF CharInfo, nextPos: TextNode.Location, yOffset: Dimension _ [0], ascent: Dimension _ [0], descent: Dimension _ [0], width: Dimension _ [0], nChars: INTEGER _ 0, indent: Dimension _ [0], leading: Dimension _ [0], break: TEditDocument.LineBreak _ wrap, filler: PRIVATE [0..16384) _ 0 -- left over bits ]; CharInfo: TYPE = MACHINE DEPENDENT RECORD [ filler: [0..256) _ 0, -- UnifiedFonts expects unpacked characters char: CHAR _ '\000, -- 8 bits width: Dimension _ [LAST[INT]], vShift: Dimension _ [0], font: UnifiedFonts.FONT _ NIL, -- NIL if same as previous tab: NodeStyle.TabStop _ NIL, strikeout: BOOL _ FALSE, -- 1 bit underlining: BOOL _ FALSE, -- 1 bit runLength: [0..LAST[CARDINAL]/4] _ 1 -- font and vshift doesn't change for at least this much ]; END. vOldTEditFormat.mesa Edited by McGregor on January 27, 1983 3:02 pm Edited by Paxton on December 2, 1982 2:48 pm Edited by Plass on February 1, 1983 9:15 am The chars field in the LineInfoRec is first so that simple pointer arithmetic can be used to get fast sequential access to the CharInfo fields Michael Plass, February 1, 1983 9:15 am: conversion to UnifiedFonts ส˜J˜JšœC™CJšœ,™,Jšœ+™+unitšฯk ˜ Jšœ œ˜Jšœ œ˜%Jšœœ ˜3Jšœ œ˜%Jšœ œ ˜Jšœ œœ ˜%—Kšœ œ˜&Kšœœ#˜:Jšœ œ˜)šฯn œœ‘œœ˜ฎJšœ œ˜—Kšœ œœ˜"šœ œœ˜.Jšœœ#œ ˜;Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœœ˜Jšœ˜Jšœ˜Jšœ&˜&Jšœœฯc˜0J˜—IdefaultšœŽ™Žšœ œœ˜+JšœŸ+˜AJšœœ Ÿ ˜Jšœœœ˜Jšœ˜JšœœœŸ˜9Jšœ˜Jšœ œœŸ˜!Jšœ œœŸ˜#Jšœœœ Ÿ8˜]Jšœ˜—Kšœ˜J™CJ˜—…—บ 0