AISTRCViewers.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Implements the viewer for displaying an AIS file on the LF display
Created Tuesday, July 31, 1984 3:32:39 pm PDT
Last edited by Eric Nickell, December 17, 1985 11:10:22 am PST
DIRECTORY
AdjustColor USING [TRC],
ViewerClasses USING [Viewer, ViewerRec];
AISTRCViewers: CEDAR DEFINITIONS ~ {
OPEN V: ViewerClasses;
AISTRCViewer: TYPE ~ V.Viewer;  --A viewer
TRC: TYPE ~ AdjustColor.TRC;
Mark: TYPE ~ RECORD [range, domain: CARDINAL];
Create: PROC [info: V.ViewerRec ← [], paint: BOOLTRUE, clientData: REF ANYNIL] RETURNS [aisTRCViewer: AISTRCViewer];
Creates a new AISTRCViewer.
IllegalOp: ERROR;      --Generated by the ViewerClasses.Set and ViewerClasses.Get
Set: PROC [viewer: AISTRCViewer, trc: REF TRC] ~ INLINE {
viewer.class.set[self: viewer, data: trc, op: $TRC];
};
Display a new TRC in the window
Get: PROC [viewer: AISTRCViewer] RETURNS [trc: REF TRC] ~ INLINE {
RETURN[NARROW[viewer.class.get[self: viewer, op: $TRC]]];
};
Get the current TRC in the window
}.
Notes
The Set proc for the viewer (not to be confused with Set above) can take the following arguments, and the Get proc will take the op argument and return data of the listed type.
opdata (type)
$TRC TRC
$Marks LIST OF MARK