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: REF ← NIL];
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.