GraphicsButton.mesa
Copyright Ó 1985, 1992 by Xerox Corporation. All rights reserved.
Contents: Procedures for creating a button that stores a real number value and draws a picture to indicate what that value is.
Bier, February 23, 1987 12:29:30 pm PST
Pier, December 6, 1985 10:01:32 am PST
DIRECTORY
AtomButtonsTypes, Imager, Rope, ViewerClasses;
GraphicsButton: CEDAR DEFINITIONS =
BEGIN
Viewer: TYPE = ViewerClasses.Viewer;
GraphicsState: TYPE = AtomButtonsTypes.GraphicsState;
GBChoiceList: TYPE = AtomButtonsTypes.GBChoiceList;
HandleButtonProc: TYPE = AtomButtonsTypes.HandleButtonProc;
UpdateGraphicsButtonProc: TYPE = AtomButtonsTypes.UpdateGraphicsButtonProc;
RepaintProc: TYPE = AtomButtonsTypes.RepaintProc;
The order determines the coding; mouse button is least significant, then shift, then control.
BuildGraphicsButton: PROC [container: Viewer, x,y,w,h: INTEGER, clientData: REF ANY, choices: GBChoiceList, handleProc: HandleButtonProc, repaintProc: RepaintProc, buttonData: REF ANY ¬ NIL, updateProc: UpdateGraphicsButtonProc ¬ NIL] RETURNS [nextX: INTEGER];
SetButtonValueAndPaint: PROC [graphicsState: GraphicsState, clientData: REF ANY, buttonData: REF ANY ¬ NIL];
GetValue: PROC [graphicsState: GraphicsState] RETURNS [clientData: REF ANY, buttonData: REF ANY];
END.