DIRECTORY Buttons USING [ButtonProc], Trc USING [Rectangle, TRC], ViewerClasses USING [Viewer, ViewerRec]; TrcButtons: CEDAR DEFINITIONS ~ BEGIN Create: PROC [trc: Trc.TRC, rectangle: Trc.Rectangle, dx: REAL, info: ViewerClasses.ViewerRec, proc: Buttons.ButtonProc, clientData: REF _ NIL, fork: BOOL _ TRUE, paint: BOOL _ TRUE] RETURNS [button: ViewerClasses.Viewer]; AttachNewTrcToButton: PROC [button: ViewerClasses.Viewer, trc: Trc.TRC, paint: BOOL _ TRUE]; TrcFromButton: PROC [button: ViewerClasses.Viewer] RETURNS [trc: Trc.TRC]; END. ΞTrcButtons.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Eric Nickell, April 9, 1986 10:42:20 pm PST Create a trc viewer, but rather than using the Trc.NotifyProc found in trc.class, it will use that for the button class, thereby letting us see icon-sized (e.g.) trc's but have the mouse-clicks do non-standard things. Note that the button is, in fact, a TrcViewers.Viewer, and therefore TrcViewers can be used to examine and modify the rectangle, dx, and clientData. HOWEVER, TrcViewers.InfoFromTRCViewer[v].trc will not return the initial trc passed in. Instead, use TrcFromButton below. Puts a different trc in the button. The right way to get at the underlying trc, given the button. Κ ˜™Icodešœ Οmœ1™