DIRECTORY Rope USING [ROPE], ViewerClasses USING [Viewer, ViewerRec]; TypeScript: CEDAR DEFINITIONS = BEGIN TS: TYPE = ViewerClasses.Viewer; Create: PROC [info: ViewerClasses.ViewerRec, paint: BOOL _ TRUE] RETURNS [ts: TS]; IsATypeScript: PROC [ts: TS] RETURNS [yes: BOOL]; Destroy: PROC [ts: TS]; Reset: PROC [ts: TS]; PutChar: PROC [ts: TS, char: CHAR]; PutRope: PROC [ts: TS, rope: Rope.ROPE]; PutText: PROC [ts: TS, text: REF READONLY TEXT, start: NAT _ 0, stopPlusOne: NAT _ LAST[NAT]]; BackSpace: PROC [ts: TS, count: INT _ 1]; ChangeLooks: PROC [ts: TS, look: CHAR]; GetLooks: PROC [ts: TS] RETURNS [looks: Rope.ROPE]; GetChar: PROC [ts: TS] RETURNS [char: CHAR]; CharsAvailable: PROC [ts: TS] RETURNS [BOOL]; TypeIn: PROC [ts: TS, input: REF ANY]; InsertRopeAtFrontOfBuffer: PROC [ts: TS, rope: Rope.ROPE]; InsertCharAtFrontOfBuffer: PROC [ts: TS, char: CHAR]; Flush: PROC [ts: TS]; WaitUntilIdle: PROC [ts: TS]; WaitUntilCharsAvail: PROC [ts: TS]; Destroyed: ERROR [ts: TS]; END. βTypeScript.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Edited by Paxton on January 4, 1983 2:31 pm Last Edited by: Maxwell, January 5, 1983 9:57 am Last Edited by: Teitelman, January 10, 1983 1:09 pm Michael Plass, March 21, 1985 3:03:37 pm PST Doug Wyatt, March 3, 1985 10:38:20 am PST Creating and destroying typescripts Destroys typescript viewer and related data structures Erases all the typescript text data and clears the screen. Output to typescript Delete character(s) from end of ts. look char in 'a..'z means add that look in 'A..'Z means remove blank means remove all looks Following echoed chars will not have any looks. Input from typescript RETURNS TRUE if no chars waiting. Simulate user typein to a typescript can be REF CHAR, ROPE, REF TEXT, or ATOM (be careful). This will be the next thing read, even if there are characters waiting in the input buffer. Synchronization This won't return until echo buffer has been emptied and all chars inserted in ts. (done automatically by BackSpace, AddLooks, and ClearLooks)' This won't return until input buffer has been emptied and input process is waiting in GetChar for more characters. This won't return until a character is available to GetChar. Errors Κ/– "Cedar" style˜codešœ™Kšœ Οmœ1™