EditSpanSupport.mesa; written by Bill Paxton, June 1981
edited by McGregor, February 7, 1983 9:44 am
edited by Bill Paxton, July 25, 1983 12:14 pm
DIRECTORY
EditNotify,
EditSpan,
TiogaLooks,
TiogaNode,
TiogaTreeOps,
TreeSlice,
UndoEvent;
EditSpanSupport: CEDAR DEFINITIONS
IMPORTS TiogaLooks =
BEGIN
OPEN EditSpan;
Ref: TYPE = TiogaNode.Ref;
Offset: TYPE = TiogaNode.Offset;
MaxLen: Offset = LAST[Offset];
TreeLoc: TYPE = TiogaTreeOps.TreeLoc;
TreeSpan: TYPE = TiogaTreeOps.TreeSpan;
BranchLoc: TYPE = TiogaTreeOps.BranchLoc;
BranchSpan: TYPE = TiogaTreeOps.BranchSpan;
Event: TYPE = UndoEvent.Ref;
NodeItself: Offset = TiogaNode.NodeItself;
Slice: TYPE = TreeSlice.Slice;
***** Operations
Splice: PROC [before, after: Slice, beforeStart, afterStart: NAT ← 0];
ReplaceBand: PROC [before, after, top, bottom: Slice, nesting: INTEGER, event: Event];
BadBand: ERROR;
DescribeBand: PROC [first, last: RefBranchNode]
RETURNS [before, after, top, bottom: Slice, nesting: INTEGER, depth: NAT];
DestSlices: PUBLIC PROC [dest: RefBranchNode, where: Place]
RETURNS [before, after: Slice, nesting: INTEGER];
CreateDest: PROC [depth: NAT] RETURNS [dest: BranchLoc];
CopySpan: PROC [span: TreeSpan] RETURNS [result: TreeSpan];
CheckBeforeMove: PROC [dest: BranchLoc, source: BranchSpan, where: Place] RETURNS [ok: BOOLEAN];
NeedNestingChange: PROC [before, after, top, bottom: Slice,
nesting: INTEGER, depth: NAT] RETURNS [NeededNestingChange];
NeededNestingChange: TYPE = { needNest, needUnNest, ok };
DoSplits: PROC [alpha, beta: TreeSpan, event: Event] RETURNS [newalpha, newbeta: BranchSpan];
DoSplitsForMove: PROC [dest: TreeLoc, source: TreeSpan, where: Place, event: Event]
RETURNS [newdest: BranchLoc, newsource: BranchSpan];
UndoSplits: PROC [alpha, beta: BranchSpan, event: Event];
UndoSplitsForMove: PUBLIC PROC [dest: BranchLoc, source: BranchSpan, where: Place, event: Event];
ReMerge: PROC [alpha, beta: BranchSpan, merge: RefBranchNode, event: Event, tail: BOOLEANFALSE]
RETURNS [BranchSpan, BranchSpan];
END.