TiogaOpersImpl.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Mike Spreitzer December 16, 1986 2:39:30 pm PST
Willie-s, June 12, 1992 1:51 pm PDT
DIRECTORY EditSpan, Rope, TEditLocks, TextEdit, TextLooks, TextNode, TiogaOpers, TiogaOps;
TiogaOpersImpl:
CEDAR
PROGRAM
IMPORTS EditSpan, TEditLocks, TextEdit
EXPORTS TiogaOpers
=
BEGIN OPEN TiogaOpers;
Delete:
PUBLIC
PROC [root: RefTextNode, del: Span] = {
EditSpan.Delete[root: root, del: del, event: NIL, saveForPaste: FALSE];
};
InsertRope:
PUBLIC
PROC [root, dest: RefTextNode, rope:
ROPE, destLoc:
INT, inherit:
BOOL ¬
TRUE, looks: Looks ¬ noLooks, charSet: CharSet ¬ 0] = {
[] ¬ TextEdit.ReplaceByRope[root: root, dest: dest, rope: rope, start: destLoc, len: 0, looks: looks, charSet: charSet, event: NIL];
};
Move:
PUBLIC
PROC [destRoot, srcRoot: RefTextNode, dest: Location, source: Span, where: Place ¬ after] = {
[] ¬ EditSpan.Move[destRoot, srcRoot, dest, source, where, 0, NIL];
};
CallWithLock:
PUBLIC
PROC [
Proc:
PROC [RefTextNode], root: TiogaOps.Ref] = {
lr: TEditLocks.LockRef = TEditLocks.Lock[root, "TiogaOpersClient"];
Proc[root ! UNWIND => TEditLocks.Unlock[root]];
TEditLocks.Unlock[root];
};
END.