DIRECTORY Rope USING [ROPE]; TiogaFileOps: CEDAR DEFINITIONS = BEGIN Ref: TYPE = REF NodeBody; NodeBody: TYPE; CreateRoot: PROC RETURNS [root: Ref]; InsertNode: PROC [x: Ref, child: BOOL _ FALSE] RETURNS [new: Ref]; InsertAsLastChild: PROC [x: Ref, prevLast: Ref _ NIL] RETURNS [new: Ref]; SetContents: PROC [x: Ref, txt: Rope.ROPE]; AddLooks: PROC [x: Ref, start, len: INT, look: CHAR ['a..'z], root: Ref _ NIL]; SetFormat: PROC [x: Ref, format: Rope.ROPE]; SetStyle: PROC [x: Ref, style: Rope.ROPE]; Store: PROC [x: Ref, filename: Rope.ROPE]; END. ¬TiogaFileOps.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. written by Bill Paxton. June 1982 last written by Paxton. August 12, 1982 3:23 pm Doug Wyatt, March 3, 1985 2:23:18 pm PST Rick Beach, March 15, 1985 10:21:11 am PST This is for applications that are creating a Tioga file from some other source The expected mode of operation is as follows: create a root node using CreateRoot set its style (if not default) using SetStyle for each node in tree, (1) create it using InsertNode or InsertAsLastChild (2) set the text contents using SetContents (3) add looks if any using AddLooks (4) set the format (if not default) using SetFormat write the new Tioga file using Store if ~child then new is immediate next sibling of x else new is first child of x prevLast is optional accelerator start is char index of first char to get looks added. count from 0 can omit root, but runs faster if you supply it must set contents before add looks can add several different looks for any given character can add looks for overlapping spans of text e.g., SetStyle[node, "Title"]; e.g., SetStyle[root, "Mesa"]; x should be from call on CreateRoot e.g., Store[root, "Foo.Tioga"]; Κ– "Mesa" style˜codešœ™Kšœ Οmœ1™