BuildViewer:
PROC[
ReDrawProc: PROC[Imager.Context, REAL], --(1) context, (2) scaleFactor. If autoScaling = TRUE then QuickViewer will do the scaling automatically. If client wants to print ropes without the effect of scaling, the scaling has to be done by the redraw proc explicitly.
QuitProc: PROC[],
MenuButtonProc: PROC[ATOM, Menus.MouseButton, BOOL, BOOL], --event, mouseButton, shift, control--
ViewerClickProc: PROC[ATOM, REAL, REAL], --ATOM is one of {$LeftButton, $LeftHeld, $LeftUp, $MiddleButton,..., ..., $RighButton, ..., ...}, xControlPt, yControlPt
viewerTitle: Rope.ROPE,
autoScaling: BOOL, --If this is true then ReDrawProc don't have to handle scaling
menuLabelsLine0, menuLabelsLine1, --These are the fixed menu lines
controlledLine2, controlledLine3, controlledLine4, controlledLine5, controlledLine6: LIST OF ATOM ← NIL --The first atom in a controlled line is the controlling atom for that menu line. Any line (fixed or controlled) can be defaulted.
];
Make a viewer with the supplied menu labels. Use the supplied ReDrawProc
when the screen must be redrawn (because the viewer changes size, etc.).
Use the supplied QuitProc to clean up on program termination
(which occurs when the viewer is destroyed.