AISViewer:
CEDAR
DEFINITIONS =
BEGIN
CreateAISViewer:
PUBLIC
PROC
[info: ViewerClasses.ViewerRec ← [], paint:
BOOL ←
TRUE]
RETURNS [new: ViewerClasses.Viewer];
Creates a viewer for AIS files. This viewer scales the image to fit in the display window.
ProgressProc: TYPE =
PROC [scanStart, pixelStart, scans, pixels: CARDINAL, clientData: REF ANY ← NIL];
RPProc: TYPE =
PROC [scanStart, pixelStart, scans, pixels: REAL, clientData: REF ANY ← NIL];
DisplayAIS:
PUBLIC
PROC [v: ViewerClasses.Viewer,
fileName: Rope.
ROPE ←
NIL, wDir: Rope.
ROPE ←
NIL,
allowSubWindow:
BOOL ←
FALSE, progressProc: ProgressProc ←
NIL, rpProc: RPProc ←
NIL,
clientData:
REF
ANY ←
NIL, paint:
BOOL ←
TRUE];
Displays the named AIS file in the viewer. If fileName is not supplied, the viewer is cleared of any image. If allowSubWindow = TRUE, a sub window selector is provided. This selector is an XOR over the image. If progressProc or rpProc is specified a call is made at every mouse notify sending the subwindow parameters as subset of the original AIS image.
GetCurrentSubWindow:
PUBLIC
PROC [v: ViewerClasses.Viewer]
RETURNS [scanStart, pixelStart, scans, pixels:
CARDINAL, clientData:
REF
ANY ←
NIL];
Returns the current size and location of the subwindow.
END.