OuterDataRep:
TYPE ~
RECORD [
-- complete outer data
name: ROPE ← NIL, -- name of viewer
column: Column ← left, -- column of viewer
data: REF ANY ← NIL, -- client supplied data
parent: Viewer ← NIL, -- (private) main outer viewer
typeScript: Viewer ← NIL, -- (private) typeScript viewer
graphics: Viewer ← NIL, -- (private) graphics viewer
graphicsData: GraphicsData ← NIL, -- (private) graphics viewer data
controls: ControlList ← NIL, -- controls for parent viewer
controlSizes: ControlSizes ← defSizes, -- default sizes for controls
lastControl: Control ← NIL, -- (readonly) last control moused
buttons: LIST OF Button ← NIL, -- buttons for outer viewer
destroyProc: DestroyProc ← NIL, -- call if outer viewer destroyed
destroyed: BOOL ← FALSE, -- (readonly) if viewer destroyed
directory: ROPE ← NIL, -- (readonly) commander directory
cmdOut: STREAM ← NIL, -- (readonly) commander output
controlsY: INTEGER ← 0, -- (private) base of controls
controlsH: INTEGER ← 0, -- (private) height of controls
graphicsY: INTEGER ← 0, -- (private) base of graphics
graphicsH: INTEGER ← 0, -- (private) graphics viewer height
tsY: INTEGER ← 0, -- (private) base of typescript
tsH: INTEGER ← 0, -- (private) typescript height
buttonsY: INTEGER ← 0, -- (private) base of buttons
buttonsH: INTEGER ← 0, -- (private) height of buttons
outerH: INTEGER ← 0, -- (private) height of outer viewer
tSin: STREAM ← NIL, -- (private) input typescript stream
tSout: STREAM ← NIL, -- (private) output typescript stream
tSclear: BOOL ← TRUE -- (private) typescript display clear?
OuterViewer:
PROC [
name: ROPE ← NIL,
column: Column ← left,
buttons: ButtonList ← NIL,
controls: ControlList ← NIL,
controlSizes: ControlSizes ← defSizes,
graphicsHeight: INTEGER ← 0,
graphicsProc: GraphicsProc ← NIL,
graphicsShow: GraphicsShow ← NIL,
destroyProc: DestroyProc ← NIL,
typeScriptHeight: INTEGER ← 0,
data: REF ANY ← NIL,
noOpen: BOOL ← FALSE]
RETURNS [Viewer];
Create a top level viewer whose data field is of type OuterData.
The viewer may contain an arbitrary number of controls and buttons, a single typescript, and a single graphics viewer. The buttons are placed at the top of the viewer. Below the buttons is the optional, scrollable typescript (usually a height of 18 is good for one line); the software may print or prompt to the typescript, and the user may type a reply. Below the typescript is an optional sub-viewer for display of graphical material. The controls are placed below the graphics viewer.
If noOpen then the viewer will not be opened (iconic or otherwise), permitting a program to manipulate the viewer (for example, installing an icon from a file) before displaying it.