<> <> <> <<>> DIRECTORY Cursors USING [CursorType], ImagerPixelMap USING [DeviceRectangle], ImagerTransformation USING [Transformation], Intime USING [EventTime], Rope USING [ROPE], SampleArrayDisplay USING [Sampler], SampleArrays USING [SampleArray], SampleMapOps USING [CVEC, SampleMap], SelectRegions USING [nullRectangle, Rectangle, RGB], TIPUser USING [TIPScreenCoordsRec], ViewerClasses USING [Viewer]; ColorEditViewersPrivate: CEDAR DEFINITIONS ~ BEGIN CVEC: TYPE ~ SampleMapOps.CVEC; DeviceRectangle: TYPE ~ ImagerPixelMap.DeviceRectangle; Rectangle: TYPE ~ SelectRegions.Rectangle; ROPE: TYPE ~ Rope.ROPE; SampleMap: TYPE ~ SampleMapOps.SampleMap; Transformation: TYPE ~ ImagerTransformation.Transformation; Viewer: TYPE ~ ViewerClasses.Viewer; Button: TYPE ~ {left, middle, right}; State: TYPE ~ {ready, mouseDown, abort, menu}; ColorEditViewerData: TYPE ~ REF ColorEditViewerDataRec; ColorEditViewerDataRec: PUBLIC TYPE ~ RECORD [ --Exported sa: SampleArrays.SampleArray _ NIL, sm: SampleMap _ NIL, m, mInverse: Transformation, fast, slow: SampleArrayDisplay.Sampler _ NIL, --How to pick the pixels picture: DeviceRectangle, --Has bounds of picture extent: Rectangle _ SelectRegions.nullRectangle, referentColor: SelectRegions.RGB, --Used for thinking about a color changeLog: ROPE _ NIL, --Changes since last saved ts: TIPState, clientData: REF ANY _ NIL --Whatever the client asks for... ]; TIPState: TYPE ~ RECORD [ from, pos: TIPUser.TIPScreenCoordsRec, rect: Rectangle, loc: CVEC, ignoreUntil: Intime.EventTime, --While state=menu, ignore TIP events except TIPTables.TIPTime's, which we use to return to ready mode. state: State _ ready, shift, ctrl, double: BOOLEAN _ FALSE, --These are set when left or right mouse button press (i.e. when Press or PressRt called), and remain in that state until Abort(?Rt) or Release(?Rt) are called. toUndo: Operation, button: Button _ left ]; Operation: TYPE ~ REF OperationRec; OperationRec: TYPE ~ RECORD [ press, drag, release, abort, undo: TIPCmdProc _ NIL, cursor: Cursors.CursorType ]; TIPCmdProc: TYPE ~ PROC [self: Viewer, data: ColorEditViewerData]; END.