ScannerInternal.mesa
Copyright (C) 1985, Xerox Corporation. All rights reserved.
Tim Diebert: November 1, 1985 7:32:56 am PST
DIRECTORY
Eikonix USING [NBuffer, IntegrationTime, LineIndex, PixelIndex, LineCount, PixelCount],
EikonixProtocol USING [Color],
IO USING [STREAM],
Rope USING [ROPE],
UserProfile USING [ProfileChangedProc],
VFonts USING [Font],
ViewerClasses USING [Viewer]
;
ScannerInternal: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE ~ Rope.ROPE;
STREAM: TYPE ~ IO.STREAM;
Tool: TYPE = REF ToolRecord;
ToolRecord: TYPE = RECORD [
outer: ViewerClasses.Viewer,  -- top level viewer
atScanViewer: ViewerClasses.Viewer,  -- displays current stage position
fileNameViewer: ViewerClasses.Viewer, -- receives file name
wDirViewer: ViewerClasses.Viewer,  -- working directory
scanStartViewer: ViewerClasses.Viewer, -- receives first scan location
scansViewer: ViewerClasses.Viewer,  -- receives number of scans
pixelStartViewer: ViewerClasses.Viewer, -- receives leftmost pixel location
pixelsViewer:ViewerClasses.Viewer,  -- receives number of pixels
pieBW: ViewerClasses.Viewer,  -- displays black and white scan progress
iTimeViewer: ViewerClasses.Viewer,  -- holds the value for i time
AISViewer: ViewerClasses.Viewer,  -- displays image
logViewer: ViewerClasses.Viewer,  -- IO stream to report errors etc
out: STREAM,   -- associated with logViewer
abortButton: ViewerClasses.Viewer,  -- used to abort scans
colorButton: ViewerClasses.Viewer,  -- button for the filter color.
color: EikonixProtocol.Color ← Clear,  -- Color the button is now.
params: Parameters,
fullFilename: ROPE,  -- full filename, (derived from command sometimes)
abort: BOOLEANFALSE,
hasExtensionAIS: BOOLEANFALSE,
fileOK: BOOLEANFALSE, 
scannerCalFile: ROPENIL,-- calibration data filename,
searchRules: LIST OF REF ANYNIL, -- Search rules for cal files.
doMinMaxPreScan: BOOLFALSE, -- Forces a min/max scan before actual scan
busy: BOOLFALSE,  -- Forces buttons to be ignored.
height: INT ← 0,
dc, gain: Eikonix.NBuffer ← NIL, -- The current buffers for dc and gain
iTime: Eikonix.IntegrationTime ← 0, -- The value of the itime viewer
colorDC: ARRAY Color OF Eikonix.NBuffer ← ALL[NIL], -- The dark for the color
colorGain: ARRAY Color OF Eikonix.NBuffer ← ALL[NIL], -- The gain for the color
colorITime: ARRAY Color OF Eikonix.IntegrationTime ← [2100, 3200, 6200, 12500]
];
Color: TYPE ~ {Clear, Red, Green, Blue};
Parameters: TYPE ~ REF ToolParameters;
ToolParameters: TYPE ~ RECORD [
font: VFonts.Font,
fixedFont: VFonts.Font,
entryHeight: NAT,
entryVSpace: NAT,
entryHSpace: NAT,
defaultServer: Rope.ROPE,
calFileName: Rope.ROPE
];
From ScannerUtilitiesImpl
GetToolParameters: PUBLIC PROC RETURNS [Parameters];
ReactToProfile: PUBLIC UserProfile.ProfileChangedProc;
From ScannerOpsImpl
SampleScan: PUBLIC PROC [tool: Tool];
Scan: PUBLIC PROC [tool: Tool];
LoadCalFile: PUBLIC PROC [tool: Tool];
SaveCalFile: PUBLIC PROC [tool: Tool];
Calibrate: PUBLIC PROC [tool: Tool];
SampleScanToAisFile: PUBLIC PROC
[tool: Tool, fileName: ROPE, iTime: Eikonix.IntegrationTime];
ScanToAisFile: PUBLIC PROC [tool: Tool, fileName: ROPE, iTime: Eikonix.IntegrationTime,
color: EikonixProtocol.Color ← Clear,
lineStart: Eikonix.LineIndex ← 0, pixelStart: Eikonix.PixelIndex ← 0,
lineCount: Eikonix.LineCount ← 2048, pixelCount: Eikonix.PixelCount ← 2048];
END.