PEViewer.mesa
Last Edited by: Plebon, August 18, 1983 1:45 pm
DIRECTORY
Graphics USING [Context],
Rope USING [ROPE],
ViewerClasses USING [Viewer];
PEViewer: CEDAR DEFINITIONS =
BEGIN
RedrawProc: TYPE = PROCEDURE [clientData: REF ANY];
QuitProc: TYPE = PROCEDURE [clientData: REF ANY];
ButtonProc: TYPE = PROCEDURE [clientData: REF ANY, event: ATOM, x, y: REAL];
MenuLabelRec:
TYPE =
RECORD [
label: ATOM,
guarded: BOOLEAN ← FALSE
];
BuildViewer:
PROCEDURE [name: Rope.
ROPE, menuLabels:
LIST
OF MenuLabelRec, clientData:
REF
ANY, redrawProc: RedrawProc, quitProc: QuitProc, buttonProc: ButtonProc]
RETURNS [pathViewer: ViewerClasses.Viewer];
This routine makes a viewer with the supplied name and menu labels. The supplied redrawProc is called when the screen must be redrawn (because the viewer changes size, etc.). The supplied quitProc is called to clean up on program termination (which occurs when the viewer is destroyed.
DrawProc: TYPE = PROCEDURE [context: Graphics.Context];
DrawInViewer:
PROCEDURE [pathViewer: ViewerClasses.Viewer, drawProc: DrawProc];
This routine calls the PaintProc to draw in the viewer.
END.