-- TiogaLineBreak.mesa; written by Michael Plass, February 8, 1983
-- Edited by Michael Plass, February 8, 1983 8:46 am
-- Edited by McGregor, February 9, 1983 10:46 am
DIRECTORY
Scaled USING [Value, zero],
TiogaNode USING [ComposingStick, Glue, KerfIndex, Penalty, Ref];
TiogaLineBreak: CEDAR DEFINITIONS = BEGIN OPEN TiogaNode;
ObtainScratch: PROC RETURNS [ComposingStick];
ReleaseScratch: PROC [composingStick: ComposingStick];
Reset: PROC [composingStick: ComposingStick];
Clears the stick, making ready for a new paragraph.
AppendBox: PROC [composingStick: ComposingStick, size: Scaled.Value];
AppendGlue: PROC [
composingStick: ComposingStick,
glue: Glue
];
MakeKerf: PROC [
composingStick: ComposingStick,
join, prebreak, postbreak: Glue,
penalty: Penalty,
node: Ref
] RETURNS [KerfIndex];
AppendKerf: PROC [
composingStick: ComposingStick,
kerfIndex: KerfIndex,
clientIndex: INT
];
ChooseBreaks: PROC [composingStick: ComposingStick, measure: Scaled.Value ← Scaled.zero, measureProc: MeasureProc ← NIL, measureClientData: REFNIL];
MeasureProc: TYPE = PROC [measureClientData: REF, lineNumber: INT] RETURNS [measure: Scaled.Value];
If a MeasureProc is supplied, it overrides the measure parameter. The MeasureProc is called to determine the measure for each line; it may be called multiple times for the same line number, and in any order.
END.