TypeScript.mesa
Copyright © 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
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];
Destroys typescript viewer and related data structures
Reset:
PROC [ts:
TS];
Erases all the typescript text data and clears the screen.
Input from typescript
GetChar:
PROC [ts:
TS]
RETURNS [char:
CHAR];
CharsAvailable:
PROC [ts:
TS]
RETURNS [
BOOL];
RETURNS TRUE if no chars waiting.
TypeIn:
PROC [ts:
TS, input:
REF
ANY];
Simulate user typein to a typescript
can be REF CHAR, ROPE, REF TEXT, or ATOM (be careful).
InsertRopeAtFrontOfBuffer:
PROC [ts:
TS, rope: Rope.
ROPE];
This will be the next thing read, even if there are characters waiting in the input buffer.
InsertCharAtFrontOfBuffer:
PROC [ts:
TS, char:
CHAR];
Synchronization
Flush:
PROC [ts:
TS];
This won't return until echo buffer has been emptied and all chars inserted in ts. (done automatically by BackSpace, AddLooks, and ClearLooks)'
WaitUntilIdle:
PROC [ts:
TS];
This won't return until input buffer has been emptied and input process is waiting in GetChar for more characters.
WaitUntilCharsAvail:
PROC [ts:
TS];
This won't return until a character is available to GetChar.