DIRECTORY ColorTrixBasics, ColorTrixMap, Imager, Rope; ColorTrixMisc: CEDAR DEFINITIONS ~ BEGIN Cmap: TYPE ~ ColorTrixMap.Cmap; PixelMapMisc: TYPE ~ ColorTrixBasics.PixelMapMisc; MouseState: TYPE ~ {down, held, up}; MouseButton: TYPE ~ {left, middle, right}; MouseInfo: TYPE ~ RECORD [ pm: PixelMapMisc, cmap: Cmap, x, y: INTEGER, state: MouseState, button: MouseButton]; MouseProc: TYPE ~ PROC [mouse: MouseInfo, data: REF ANY]; ChangeProc: TYPE ~ PROC [pmMisc: PixelMapMisc, cmap: Cmap, data: REF ANY]; ClientRecord: TYPE ~ RECORD [ mouseProc: MouseProc _ NIL, changeProc: ChangeProc _ NIL, data: REF ANY _ NIL]; RegisterClient: PUBLIC PROC [clientRecord: ClientRecord, start: BOOL _ TRUE]; UnRegisterClient: PUBLIC PROC [clientRecord: ClientRecord]; UnRegisterAllClients: PUBLIC PROC; StartColorDisplayWatcher: PUBLIC PROC; StopColorDisplayWatcher: PUBLIC PROC; Color: TYPE ~ Imager.Color; Context: TYPE ~ Imager.Context; ROPE: TYPE ~ Rope.ROPE; PrintTiogaSelection: PUBLIC PROC [ x, y: NAT, color: Color _ NIL, context: Context _ NIL, screenStyle: BOOL _ FALSE] RETURNS [ROPE]; PrintRope: PUBLIC PROC [rope: ROPE, x, y: NAT, color: Color _ NIL, context: Context _ NIL]; END. ColorTrixMisc.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Bloomenthal, February 13, 1987 0:04:38 am PST Color Trix Mouse Watching Called whenever mouse is down over the color display. Called whenever the color display changes state. Register a clientRecord with the ColorDisplayWatcher. If start is TRUE, will start ColorDisplayWatcher if it isn't already started. Unregister the clientRecord. If clientRecord is the last remaining registered ClientRecord, the ColorDisplayWatcher will be stopped. Unregister all registered clientRecords and stop the ColorDisplayWatcher. Start the Color Display watcher. Whenever the color display state changes, all registered changeProcs will be called. Whenever the mouse is down on the color display, all registered mouseProcs will be called. Stop the ColorDisplayWatcher. Color Trix Text Print the current tioga selection at the given location with the given Imager color. x and y are with respect to the upper left of the color display. If color is NIL, use the context's current color unless context is NIL, then use $Black. Providing a context only saves the need to reacquire the color display. If screenStyle FALSE, use printStyle. As PrintTiogaSelection except simply print the given rope. Κœ˜šœ™Jšœ Οmœ1™™NJ˜—š œžœžœ˜;J™\J™(J˜—š œžœžœ˜"J™IJ˜—š œžœžœ˜&J™ J™TJ™ZJ˜—š œžœžœ˜%J™——šΟl™Jšœžœ˜Jšœžœ˜Jšžœžœžœ˜J˜š œžœžœ˜"Jš œžœžœžœžœžœ˜QJšžœžœ˜J™TJ™@Jšœ ‘œ4‘œ™XJ™GJšœ‘œ™%J˜—š  œžœžœžœžœžœžœ˜[J™:——J˜Jšžœ˜—…—ς Ž