DIRECTORY Menus USING [Entry], Rope USING [ROPE], VFonts USING [defaultFont, FONT], ViewerOps USING [DestroyViewer], ViewerClasses USING [NotifyProc, Viewer, ViewerRec]; Buttons: CEDAR DEFINITIONS IMPORTS VFonts, ViewerOps = BEGIN OPEN ViewerClasses; Button: TYPE = Viewer; CreateSystemButton: PROC[entry: Menus.Entry, proc: ViewerClasses.NotifyProc, font: VFonts.FONT _ VFonts.defaultFont, paint: BOOL _ TRUE]; Create: PROC [info: ViewerRec _ [], entry: Menus.Entry, font: VFonts.FONT _ VFonts.defaultFont, paint: BOOL _ TRUE] RETURNS [button: Button]; Destroy: PROC [button: Button] = INLINE {ViewerOps.DestroyViewer[button]}; ReLabel: PROC [button: Button, newName: Rope.ROPE, paint: BOOL _ TRUE] = INLINE {button.class.set[button, newName, paint]}; SetDisplayStyle: PROC [button: Button, style: ATOM, paint: BOOL _ TRUE] = INLINE {button.class.set[button, style, paint, $DisplayStyle]} ; END. >Buttons.mesa; Written by S. McGregor Edited by McGregor on July 29, 1983 2:17 pm Last Edited by: Maxwell, December 17, 1982 10:06 am Last Edited by: Pausch, August 26, 1983 12:08 pm Last Edited by: Wyatt, November 10, 1983 5:24 pm A button is a viewer that posts a message and, when clicked, invokes a procedure. Creates a "system" button at the top of the screen. A button behaves much like a menu entry. Information for the button viewer is taken from info. If the info.wh and info.ww are defaulted, aesthetic values will be chosen based on the height and width of the name. Change the text of a button (but alas, not the size) recognised display styles are: $BlackOnWhite - black letters on white background (default) $WhiteOnBlack - white letters on black background $BlackOnGrey - black letters on grey background ΚΑ– "cedar" style˜JšΟc$™$Jš+™+Jšœ3™3Jš0™0Jš0™0J™šΟk ˜ Jšœžœ ˜Jšœžœžœ˜Jšœžœžœ˜!Jšœ žœ˜ Jšœžœ!˜4J˜—Jšœ ž˜Jšžœ˜Jšœžœžœ˜J˜šœžœ ˜JšœQ™Q—J˜šΟnœžœ4˜LJšœ žœžœžœ˜