DIRECTORY AIS USING [FRef], BasicTime USING [GMT, nullGMT], BiScrollers USING [BiScrollerStyle, TransformGenerator, ExtremaProc], Containers USING [Container], GriffinImageUtils USING [GriffinImage], Imager USING [Context, VEC, Rectangle], ImagerColorOperator USING [ColorOperator], ImagerPixelArray USING [PixelArray], Interpress USING [OpenMaster], PDFileReader USING [Handle], PDImageReader USING [Handle, ImageLink], Real USING [LargestNumber], Rope USING [ROPE], ShowPress USING [Handle], Sliders USING [Slider], ViewerClasses USING [Viewer, NotifyProc, PaintProc, DestroyProc, GetProc]; PreView: CEDAR DEFINITIONS = BEGIN bsStyle: BiScrollers.BiScrollerStyle; SwitchRange: TYPE = CHAR['A..'Z]; Switches: TYPE = PACKED ARRAY SwitchRange OF BOOLEAN; FileType: TYPE = {none, press, pd, ip, ais, griffin}; Data: TYPE = REF Rep; Rep: TYPE = RECORD [ fileInfo: FileInfo _ NIL, container: Containers.Container _ NIL, preViewer: ViewerClasses.Viewer _ NIL, pageNumberViewer: ViewerClasses.Viewer _ NIL, pageNumberSlider: Sliders.Slider _ NIL, pageNumber: INTEGER _ 1, lastPageNumber: INTEGER _ 1, pageInMem: INTEGER _ 0,-- which page is in iMemContext. iMemContext: Imager.Context _ NIL, -- an ImagerMemory context pageHeight, pageWidth: REAL _ 0.0, bBox: BBoxState _ NIL, abort: BOOLEAN _ FALSE, process: UNSAFE PROCESS _ NIL, switches: Switches _ ALL[FALSE], stuffWithBorders: BOOLEAN _ FALSE, kind: SELECT type: FileType FROM none => [], press => [presshandle: ShowPress.Handle _ NIL], pd => [ atImage: PDImageReader.ImageLink _ NIL, --set by ResetToImage pageStructure: PDImageReader.ImageLink _ NIL, --set by GetPageStructure pdhandle: PDFileReader.Handle _ NIL, image: PDImageReader.Handle _ NIL, scaleFactors: Imager.VEC _ [x: 1.0, y: 1.0], scalePD: BOOLEAN _ TRUE ], ip => [ipMaster: Interpress.OpenMaster _ NIL], ais => [state: AISState _ NIL], griffin => [image: GriffinImageUtils.GriffinImage], ENDCASE ]; PressData: TYPE = REF press Rep; PDData: TYPE = REF pd Rep; IPData: TYPE = REF ip Rep; AISData: TYPE = REF ais Rep; GData: TYPE = REF griffin Rep; FileInfo: TYPE = REF FileInfoRep; FileInfoRep: TYPE = RECORD [ filetype: FileType _ none, fullFName: Rope.ROPE _ NIL, created: BasicTime.GMT _ BasicTime.nullGMT, ref: REF ANY _ NIL ]; AISState: TYPE = REF AISStateRep; AISStateRep: TYPE = RECORD [ openFile: AIS.FRef _ NIL, op: ImagerColorOperator.ColorOperator _ NIL, pa: ImagerPixelArray.PixelArray _ NIL, scans, pixels: NAT _ 0, --lines per page, pixels per line active: BOOL _ FALSE ]; BBoxState: TYPE = REF BBoxStateRep; BBoxStateRep: TYPE = RECORD [ active: BOOL _ FALSE, rect: Imager.Rectangle _ [0.0,0.0,0.0,0.0], -- actual bounding rectangle for clipping mode: BBoxMode _ waitingForFirstPoint, -- mode for responding to mouse lastX, lastY: REAL _ Real.LargestNumber, -- most recent point acquired from NotifyProc x0, y0: REAL _ 0.0-- first point acquired from NotifyProc ]; BBoxMode: TYPE = {waitingForFirstPoint, waitingForSecondPoint}; BBoxOp: TYPE = {stuff, ipMaster}; NameList: TYPE = LIST OF Rope.ROPE; PaintOp: TYPE = {paint, remove, change}; DoFileOps: PROC [op: BBoxOp, viewer: ViewerClasses.Viewer, data: Data, fileName: Rope.ROPE, clip: BOOL _ TRUE]; ResetProcess: PROC [data: Data]; PVFeedback: PROC [data: Data, v: ViewerClasses.Viewer, x, y: REAL _ 0.0, op: PaintOp _ paint]; PVNotify: ViewerClasses.NotifyProc; PVPaint: ViewerClasses.PaintProc; PVDestroy: ViewerClasses.DestroyProc; PVGetName: ViewerClasses.GetProc; PVBasicTransformProc: BiScrollers.TransformGenerator; PVExtremaProc: BiScrollers.ExtremaProc; PVListRemove: PROC [ref: REF ANY]; END. (PreView.mesa Last edited by Ken Pier; May 15, 1986 9:57:28 am PDT This should be considered a Private interface. See PreViewClient.mesa for public uses. This interface ties together PreViewTool and PreViewImpl, which would be one module if the compiler could handle a module of that size. Κ– "cedar" style˜Jšœ ™ šœ4™4J™ή—unitšΟk ˜ Jšœœ˜Jšœ œœ ˜Jšœ œ4˜EJšœ œ ˜Jšœœ˜'Jšœœ œ ˜'Jšœœ˜*Jšœœ˜$Jšœ œ˜Jšœ œ ˜Jšœœ˜(Jšœœ˜Jšœœœ˜Jšœ œ ˜Jšœœ ˜Jšœœ7˜JJ˜—šΟnœœ œ˜"J˜Jšœ%˜%J˜Jšœ œœ ˜!Jš œ œœœ œœ˜5Jšœ œ'˜5Jšœœœ˜šœœœ˜Jšœœ˜Jšœ"œ˜&Jšœ"œ˜&Jšœ)œ˜-Jšœ#œ˜'Icodešœ œ˜Lšœœ˜Jšœ œΟc ˜7JšœœŸ˜=Lšœœ˜"Lšœœ˜Jšœœœ˜Jšœ œœœ˜Jšœœœ˜ Jšœœœ˜"šœœ˜ J˜ Jšœ*œ˜/šœ˜Jšœ#œŸ˜=Jšœ)œŸ˜GLšœ œ˜$Jšœœ˜"Jšœœ˜,Jšœ œ˜J˜—Jšœ)œ˜.Jšœœ˜J˜3Jš˜—Jšœ˜—J˜Jšœ œœ ˜ Jšœœœ˜Jšœœœ˜Jšœ œœ ˜Jšœœœ ˜J˜Jšœ œœ ˜!šœ œœ˜Jšœ˜Jšœœœ˜Jšœœ˜+Jšœœœ˜J˜—J˜Jšœ œœ ˜!šœ œœ˜Jšœ œœ˜Jšœ(œ˜,Jšœ"œ˜&JšœœŸ!˜9Jšœœ˜J˜—J˜Jšœ œœ˜#šœœœ˜Jšœœœ˜Jšœ,Ÿ)˜UJšœ'Ÿ˜FJšœœŸ-˜VJšœœŸ'˜9J˜—J˜Jšœ œ1˜?Lšœœ˜!Jš œ œœœœ˜#Jšœ œ˜(J˜Lš ž œœGœœœ˜oLšž œœ˜ Lšž œœ-œ˜^LšΠbnœ˜#Lš œ˜!LšΠan œ˜%Lš  œ˜!Lš œ!˜5Lš  œ˜'Lšž œœœœ˜"J˜—Jšœ˜—…— G