TSTranslatePrivate.mesa
Michael Plass, June 28, 1982 8:58 am
For communication between the modules that implement TSTranslate
DIRECTORY NodeStyle, RopeReader, LooksReader, TSObject, TextEdit, TextLooks, TextNode, TSTranslate, TSFont, TSTypes, TSGlue;
TSTranslatePrivate: DEFINITIONS =
BEGIN
OPEN TSTypes;
State: TYPE = REF StateRec; -- points to the working storage for the translation.
StateRec:
TYPE =
RECORD [
nodeStyle: NodeStyle.Ref,
charStyle: NodeStyle.Ref,
ropeReader: RopeReader.Ref,
looksReader: LooksReader.Ref,
level: INTEGER,
currentNode: TextNode.Ref,
currentTextNode: TextNode.RefTextNode,
totalChars, charsToGo: INT,
progressProc: TSTranslate.ProgressProc,
leftIndent: Dimn,
galleyWidth: Dimn,
firstIndentItem: REF ANY,
leftFillParameter, rightFillParameter: TSObject.ListParameter,
endFill: LIST OF REF ANY,
rope: TextEdit.ROPE,
runs: TextLooks.Runs,
remainingLength: LONG INTEGER,
tabStops: REAL,
minTabWidth: REAL,
bodyIndent: Dimn ← zeroDimn,
curfont: TSFont.Ref,
oldLooks: TextLooks.Looks,
underlining: NodeStyle.FontUnderlining ← None,
strikeout: NodeStyle.FontUnderlining ← None,
bottomLeading: Dimn ← nilDimn
];
NewState: PROCEDURE RETURNS [s: State];
InitializeStateForNewNode: PROCEDURE [listWriter: TSObject.ListWriter, state: State];
FontFromStyle: PROCEDURE [style: NodeStyle.Ref] RETURNS [TSFont.Ref];
GetNewLooks: PROCEDURE [listWriter: TSObject.ListWriter, state: State, looks: TextLooks.Looks];
ProduceBottomLeadingStretchAndShrink: PROCEDURE [listWriter: TSObject.ListWriter, state: State];
Tabify: PROCEDURE [hlist: TSObject.ItemList, state: State] RETURNS [newHList: TSObject.ItemList];
END.
Michael Plass, June 28, 1982 8:58 am. Renamed from TPTranslatePrivate.