(DEFINE-FILE-INFO READTABLE "INTERLISP" PACKAGE "INTERLISP" BASE 10) (FILECREATED "26-Oct-89 14:30:27" {ICE}LISPUSERS>MEDLEY>BUTTONS.;2 28959 changes to%: (VARS BUTTONSCOMS) (FNS MOVE-BUTTON \BUTTONS-DRAW-BOX \BUTTONS-TRACK-MOUSE EDIT-BUTTON-CONTENTS) previous date%: " 2-Dec-88 17:17:47" {ICE}LISPUSERS>KOTO>BUTTONS.;1) (* " Copyright (c) 1986, 1987, 1988, 1989 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT BUTTONSCOMS) (RPAQQ BUTTONSCOMS ((* ;;; "BUTTONS provides a mechanism for mapping mouse clicks to actions via mouse-sensitive pictures of buttons. Each button has a label and an action, which is an arbitrary Lisp form. If the left mouse button is clicked on a button, its associated action is executed. If the action is a string it is stuffed into the system buffer and read by the current tty process; otherwise it is evaluated under the mouse process.") (* ;;; "USER INTERFACE") (RECORDS BUTTON) (FNS ALIGN-BUTTONS BUTTONP BUTTONSPROP BUTTON-ACTION BUTTON-LABEL CLOSE-BUTTON CLOSE-BUTTONS COPY-BUTTON CREATE-BUTTON DELETE-BUTTON DELETE-BUTTONS EDIT-BUTTON EDIT-BUTTON-CONTENTS EXECUTE-BUTTON EXPOSE-BUTTONS LOAD-SOME-BUTTONS MOVE-BUTTON REDISPLAY-BUTTON RESTORE-BUTTONS SAVE-BUTTONS SAVE-SOME-BUTTONS) (PROP ARGNAMES BUTTONSPROP BUTTON-ACTION BUTTON-LABEL) (* ;;; "IMPLEMENTATION") (PROP MAKEFILE-ENVIRONMENT BUTTONS) (VARS *BUTTONS-DATAVERSION* *DEFAULT-BUTTONPROPS*) (INITVARS (*BUTTONPROPS* (COPYALL *DEFAULT-BUTTONPROPS*)) (*ALL-BUTTONS* NIL) (*BUTTONS-DEFAULT-ACTION* NIL) (*BUTTONS-DEFAULT-LABEL* NIL) (*BUTTONS-EDIT-MENU* NIL) (*BUTTONS-EDIT-SHADE* NIL) (*BUTTONS-EXEC-SHADE* NIL) (*BUTTONS-GRID-ORIGIN* NIL) (*BUTTONS-LABEL-FONT* NIL) (*BUTTONS-MENU-FONT* NIL) (*BUTTONS-SAVE-DIRECTORY* NIL)) (FNS \BUTTONS-BUTTONEVENTFN \BUTTONS-DATAFILE-NAME \BUTTONS-CHANGE-LABEL \BUTTONS-CREATE-ICON \BUTTONS-DRAW-BOX \BUTTONS-EDITE \BUTTONS-EDIT-MENU \BUTTONS-INIT \BUTTONS-IO-EXIT \BUTTONS-OPEN-STREAM \BUTTONS-PROMPT-FOR-DATAFILE-NAME \BUTTONS-READ \BUTTONS-SETPROP \BUTTONS-SHOW \BUTTONS-SHOW-EXEC \BUTTONS-TRACK-MOUSE \BUTTONS-WAIT-MOUSE) (COMS (* The button icon) (FILES (SYSLOAD FROM LISPUSERS) ICONW) (FNS DROPSHADOW ICONMASK CLEAR-MASK-OUTLINE) (BITMAPS *BUTTON-BITMAP*) (INITVARS (*BUTTON-INVERT-REGION* (QUOTE (6 10 85 25))) (*BUTTON-CLIPPING-REGION* (QUOTE (7 11 83 23))) (*BUTTON-ICON* (DROPSHADOW *BUTTON-BITMAP*)) (*BUTTON-ICON-MASK* (ICONMASK *BUTTON-ICON*)))) (ADDVARS (BackgroundMenuCommands ("Button Control" (QUOTE (EDIT-BUTTON)) "Manipulate action buttons"))) (VARS (BackgroundMenu)) (P (\BUTTONS-INIT)) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA) (NLAML) (LAMA BUTTON-LABEL BUTTON-ACTION BUTTONSPROP))))) (* ;;; "BUTTONS provides a mechanism for mapping mouse clicks to actions via mouse-sensitive pictures of buttons. Each button has a label and an action, which is an arbitrary Lisp form. If the left mouse button is clicked on a button, its associated action is executed. If the action is a string it is stuffed into the system buffer and read by the current tty process; otherwise it is evaluated under the mouse process." ) (* ;;; "USER INTERFACE") (DECLARE%: EVAL@COMPILE (ACCESSFNS BUTTON ((LABEL (WINDOWPROP DATUM (QUOTE BUTTON-LABEL)) (WINDOWPROP DATUM (QUOTE BUTTON-LABEL) NEWVALUE)) (ACTION (WINDOWPROP DATUM (QUOTE BUTTON-ACTION)) (WINDOWPROP DATUM (QUOTE BUTTON-ACTION) NEWVALUE)) (EXECUTING? (WINDOWPROP DATUM (QUOTE BUTTON-EXECUTING?)) (WINDOWPROP DATUM (QUOTE BUTTON-EXECUTING?) NEWVALUE))) ) ) (DEFINEQ (ALIGN-BUTTONS (LAMBDA (BUTTON) (* Koomen "30-Dec-86 16:04") (DECLARE (GLOBALVARS *ALL-BUTTONS*)) (bind BUTTONREGION BUTTON2 BUTTON2REGION (EDGE _ (MENU (create MENU TITLE _ "Which axis? " ITEMS _ (QUOTE (Vertical Horizontal)) CENTERFLG _ T))) first (if (NULL EDGE) then (RETURN)) (SETQ BUTTONREGION (WINDOWREGION BUTTON)) while (PROGN (PROMPTPRINT "Indicate another button to align: ") (AND (SETQ BUTTON2 (WHICHW (GETPOSITION))) (NEQ BUTTON2 BUTTON) (FMEMB BUTTON2 *ALL-BUTTONS*))) do (SETQ BUTTON2REGION (WINDOWREGION BUTTON2)) (MOVEW BUTTON2 (fetch (REGION LEFT) of (if (EQ EDGE (QUOTE Horizontal)) then BUTTON2REGION else BUTTONREGION)) (fetch (REGION BOTTOM) of (if (EQ EDGE (QUOTE Vertical)) then BUTTON2REGION else BUTTONREGION))) finally (PROMPTPRINT "Done."))) ) (BUTTONP (LAMBDA (BUTTON ERROR?) (* Koomen "18-Mar-87 14:03") (DECLARE (GLOBALVARS *ALL-BUTTONS*)) (if (FMEMB BUTTON *ALL-BUTTONS*) then BUTTON elseif ERROR? then (ERROR "Arg not a BUTTON:" BUTTON))) ) (BUTTONSPROP (LAMBDA N (* Koomen " 8-Jun-88 11:42") (DECLARE (GLOBALVARS *BUTTONPROPS*)) (PROG (PROPNAME OLDVALUE NEWVALUE) (SETQ PROPNAME (if (IGREATERP N 0) then (ARG N 1))) (if (NOT PROPNAME) then (RETURN)) (if (NEQ (QUOTE *BUTTONPROPS*) (CAR (LISTP *BUTTONPROPS*))) then (RETURN)) (SETQ OLDVALUE (CADR (ASSOC PROPNAME *BUTTONPROPS*))) (if (IGREATERP N 1) then (SETQ NEWVALUE (ARG N 2)) (if (NOT (EQUAL NEWVALUE OLDVALUE)) then (PUTASSOC PROPNAME (LIST NEWVALUE) *BUTTONPROPS*) (\BUTTONS-SETPROP PROPNAME NEWVALUE))) (RETURN OLDVALUE))) ) (BUTTON-ACTION (LAMBDA N (* Koomen "18-Mar-87 14:22") (PROG (BUTTON OLDACTION NEWACTION) (SETQ BUTTON (if (IGREATERP N 0) then (ARG N 1))) (if (NOT (BUTTONP BUTTON T)) then (RETURN)) (SETQ OLDACTION (fetch (BUTTON ACTION) of BUTTON)) (if (IGREATERP N 1) then (SETQ NEWACTION (ARG N 2)) (replace (BUTTON ACTION) of BUTTON with NEWACTION)) (RETURN OLDACTION))) ) (BUTTON-LABEL (LAMBDA N (* edited%: "18-Mar-87 22:33") (PROG (BUTTON OLDLABEL NEWLABEL) (SETQ BUTTON (if (IGREATERP N 0) then (ARG N 1))) (if (NOT (BUTTONP BUTTON T)) then (RETURN)) (SETQ OLDLABEL (fetch (BUTTON LABEL) of BUTTON)) (if (IGREATERP N 1) then (SETQ NEWLABEL (MKSTRING (OR (ARG N 2) ""))) (if (NOT (EQUAL NEWLABEL OLDLABEL)) then (\BUTTONS-CHANGE-LABEL BUTTON NEWLABEL))) (RETURN OLDLABEL))) ) (CLOSE-BUTTON (LAMBDA (BUTTON) (* Koomen "18-Mar-87 13:14") (if (BUTTONP BUTTON T) then (CLOSEW BUTTON)))) (CLOSE-BUTTONS (LAMBDA (BUTTONS) (* Koomen "18-Mar-87 13:09") (DECLARE (GLOBALVARS *ALL-BUTTONS*)) (for BUTTON in (OR (LISTP BUTTONS) *ALL-BUTTONS*) do (CLOSE-BUTTON BUTTON))) ) (COPY-BUTTON (LAMBDA (BUTTON NEWLOCATION) (* Koomen "18-Mar-87 14:58") (if (BUTTONP BUTTON T) then (CREATE-BUTTON (COPYALL (fetch (BUTTON ACTION) of BUTTON)) (COPYALL (fetch (BUTTON LABEL) of BUTTON)) NEWLOCATION))) ) (CREATE-BUTTON (LAMBDA (ACTION LABEL LOCATION NOOPENFLG) (* Koomen " 8-Jun-88 14:26") (* edited%: "18-Mar-87 22:48") (DECLARE (GLOBALVARS *ALL-BUTTONS* *BUTTON-ICON-MASK* *BUTTONS-DEFAULT-ACTION* *BUTTONS-DEFAULT-LABEL* LASTMOUSEX LASTMOUSEY)) (if (BUTTONP ACTION) then (* ; "Interactive") (SETQ LABEL NIL) (SETQ ACTION NIL)) (if (AND (NULL ACTION) (NULL LABEL)) then (SETQ ACTION *BUTTONS-DEFAULT-ACTION*) (SETQ LABEL *BUTTONS-DEFAULT-LABEL*) elseif (NULL ACTION) then (SETQ ACTION (BQUOTE (PROMPTPRINT (\, (KWOTE LABEL))))) elseif (NULL LABEL) then (SETQ LABEL ACTION)) (SETQ LABEL (COPYALL (MKSTRING LABEL))) (SETQ ACTION (COPYALL ACTION)) (SETQ LOCATION (if (REGIONP LOCATION) then (CREATEPOSITION (fetch (REGION LEFT) of LOCATION) (fetch (REGION BOTTOM) of LOCATION)) else (POSITIONP LOCATION))) (PROG ((BUTTON (ICONW (\BUTTONS-CREATE-ICON LABEL) *BUTTON-ICON-MASK* (OR LOCATION (create POSITION XCOORD _ LASTMOUSEX YCOORD _ LASTMOUSEY)) (OR NOOPENFLG (NULL LOCATION))))) (push *ALL-BUTTONS* BUTTON) (WINDOWPROP BUTTON (QUOTE REPAINTFN) (FUNCTION REDISPLAY-BUTTON)) (WINDOWPROP BUTTON (QUOTE BUTTONEVENTFN) (FUNCTION \BUTTONS-BUTTONEVENTFN)) (WINDOWPROP BUTTON (QUOTE RIGHTBUTTONFN) (FUNCTION \BUTTONS-BUTTONEVENTFN)) (replace (BUTTON LABEL) of BUTTON with LABEL) (replace (BUTTON ACTION) of BUTTON with ACTION) (if (AND (NOT NOOPENFLG) (NULL LOCATION)) then (MOVE-BUTTON BUTTON)) (RETURN BUTTON))) ) (DELETE-BUTTON (LAMBDA (BUTTON) (* Koomen "18-Mar-87 13:14") (DECLARE (GLOBALVARS *ALL-BUTTONS*)) (if (BUTTONP BUTTON T) then (CLOSEW BUTTON) (SETQ *ALL-BUTTONS* (DREMOVE BUTTON *ALL-BUTTONS*)))) ) (DELETE-BUTTONS (LAMBDA (BUTTONS) (* edited%: "18-Mar-87 23:10") (DECLARE (GLOBALVARS *ALL-BUTTONS*)) (for BUTTON in (APPEND (OR (LISTP BUTTONS) *ALL-BUTTONS*)) do (DELETE-BUTTON BUTTON))) ) (EDIT-BUTTON (LAMBDA (BUTTON CONTENTS?) (* Koomen " 8-Jun-88 08:45") (DECLARE (GLOBALVARS *ALL-BUTTONS* *BUTTONS-EDIT-SHADE*)) (RESETFORM (\BUTTONS-SHOW BUTTON *BUTTONS-EDIT-SHADE*) (PROG ((CMD (if CONTENTS? then (QUOTE EDIT-BUTTON-CONTENTS) else (MENU (\BUTTONS-EDIT-MENU))))) (if (AND (NULL BUTTON) (FMEMB CMD (QUOTE (CLOSE-BUTTON DELETE-BUTTON REDISPLAY-BUTTON MOVE-BUTTON EDIT-BUTTON-CONTENTS COPY-BUTTON ALIGN-BUTTONS)))) then (PROMPTPRINT "Indicate button to manipulate: ") (SETQ BUTTON (WHICHW (GETPOSITION))) (CLRPROMPT) (if (OR (NULL BUTTON) (NOT (FMEMB BUTTON *ALL-BUTTONS*))) then (RETURN))) (if CMD then (if (DEFINEDP CMD) then (APPLY* CMD BUTTON) else (PROMPTPRINT "Button command " CMD " not yet implemented!")))))) ) (EDIT-BUTTON-CONTENTS (LAMBDA (BUTTON) (* ; "Edited 25-Oct-89 10:47 by Koomen") (if (BUTTONP BUTTON T) then (PROG (OLDLABEL OLDACTION RESULT NEWLABEL NEWACTION) (SETQ OLDLABEL (fetch (BUTTON LABEL) of BUTTON)) (SETQ OLDACTION (fetch (BUTTON ACTION) of BUTTON)) (SETQ RESULT (\BUTTONS-EDITE (BQUOTE ((:LABEL (\, (COPYALL OLDLABEL))) (:ACTION (\, (COPYALL OLDACTION))))))) (if (NULL RESULT) then (RETURN)) (if (SETQ NEWLABEL (FASSOC :LABEL RESULT)) then (BUTTON-LABEL BUTTON (CAR (LISTP (CDR NEWLABEL))))) (if (SETQ NEWACTION (FASSOC :ACTION RESULT)) then (BUTTON-ACTION BUTTON (CAR (LISTP (CDR NEWACTION))))) (RETURN BUTTON)))) ) (EXECUTE-BUTTON (LAMBDA (BUTTON NOMOUSE) (* Koomen " 8-Jun-88 12:58") (* edited%: "18-Mar-87 22:53") (if (AND (BUTTONP BUTTON T) (NOT (fetch (BUTTON EXECUTING?) of BUTTON))) then (RESETFORM (\BUTTONS-SHOW-EXEC BUTTON T) (if (OR NOMOUSE (\BUTTONS-WAIT-MOUSE BUTTON)) then (ALLOW.BUTTON.EVENTS) (PROG ((ACTION (fetch (BUTTON ACTION) of BUTTON))) (if (LISTP ACTION) then (EVAL ACTION) else (BKSYSBUF ACTION))))))) ) (EXPOSE-BUTTONS (LAMBDA (BUTTONS) (* Koomen "18-Mar-87 16:31") (DECLARE (GLOBALVARS *ALL-BUTTONS*)) (for BUTTON in (OR (LISTP BUTTONS) *ALL-BUTTONS*) do (REDISPLAY-BUTTON BUTTON))) ) (LOAD-SOME-BUTTONS (LAMBDA (FILENAME) (* Koomen " 2-Dec-88 15:02") (if (BUTTONP FILENAME) then (* ;; "Invoked from button menu") (SETQ FILENAME NIL)) (if (NULL FILENAME) then (SETQ FILENAME (\BUTTONS-PROMPT-FOR-DATAFILE-NAME "File to load buttons from (NIL to abort):"))) (if FILENAME then (RESTORE-BUTTONS FILENAME (QUOTE ASK)))) ) (MOVE-BUTTON (LAMBDA (BUTTON X/POS Y) (* Koomen "26-Oct-89 08:12") (DECLARE (GLOBALVARS BOXCURSOR)) (AND NIL (MOVE-BUTTON (WHICHW (GETPOSITION)))) (if (BUTTONP BUTTON T) then (PROG (BOX BL BB BW BH BR BT OK?) (DECLARE (SPECVARS BL BB BW BH BR BT)) (if (POSITIONP X/POS) then (SETQ BL (fetch (POSITION XCOORD) of X/POS)) (SETQ BB (fetch (POSITION YCOORD) of X/POS)) (SETQ OK? T) elseif (AND (SMALLP X/POS) (SMALLP Y)) then (SETQ BL X/POS) (SETQ BB Y) (SETQ OK? T) elseif (AND (NULL X/POS) (NULL Y)) then (SETQ BOX (WINDOWREGION BUTTON)) (SETQ BL (fetch (REGION LEFT) of BOX)) (SETQ BB (fetch (REGION BOTTOM) of BOX)) (SETQ BW (fetch (REGION WIDTH) of BOX)) (SETQ BH (fetch (REGION HEIGHT) of BOX)) (SETQ BR (fetch (REGION RIGHT) of BOX)) (SETQ BT (fetch (REGION TOP) of BOX)) (\SETCURSORPOSITION BL BB) (RESETLST (RESETSAVE (CURSOR BOXCURSOR)) (RESETSAVE (\BUTTONS-DRAW-BOX)) (SETQ OK? (NLSETQ (\BUTTONS-TRACK-MOUSE))))) (if OK? then (MOVEW BUTTON BL BB))))) ) (REDISPLAY-BUTTON (LAMBDA (BUTTON) (* Koomen " 8-Jun-88 09:10") (DECLARE (GLOBALVARS *BUTTONS-EXEC-SHADE*)) (if (BUTTONP BUTTON T) then (\BUTTONS-SHOW BUTTON T) (if (fetch (BUTTON EXECUTING?) of BUTTON) then (\BUTTONS-SHOW BUTTON *BUTTONS-EXEC-SHADE*)))) ) (RESTORE-BUTTONS (LAMBDA (FILENAME KEEP-CURRENT-BUTTONS?) (* Koomen " 2-Dec-88 15:02") (DECLARE (GLOBALVARS *BUTTONPROPS*)) (if (BUTTONP FILENAME) then (* ;; "invoked interactively") (SETQ FILENAME) (SETQ KEEP-CURRENT-BUTTONS? NIL)) (bind (BUTTONSPECS _ (\BUTTONS-READ FILENAME)) first (if (NLISTP BUTTONSPECS) then (RETURN)) (if (EQ KEEP-CURRENT-BUTTONS? (QUOTE ASK)) then (SETQ KEEP-CURRENT-BUTTONS? (MOUSECONFIRM "Keep current buttons? "))) (if (NOT KEEP-CURRENT-BUTTONS?) then (DELETE-BUTTONS)) (* ;; "First element is full file name") (SETQ FILENAME (pop BUTTONSPECS)) (* ;; "Second element is the new buttonprops") (SETQ *BUTTONPROPS* (pop BUTTONSPECS)) (\BUTTONS-SETPROP) (* ;; "remaining elements are button specs") while BUTTONSPECS do (APPLY (FUNCTION CREATE-BUTTON) (pop BUTTONSPECS)) finally (RETURN FILENAME))) ) (SAVE-BUTTONS (LAMBDA (FILENAME BUTTONS) (* Koomen " 8-Jun-88 14:05") (DECLARE (SPECVARS FILERDTBL) (GLOBALVARS *ALL-BUTTONS* *BUTTONPROPS* *BUTTONS-DATAVERSION*)) (if (BUTTONP FILENAME) then (* ;; "invoked interactively") (SETQ FILENAME)) (RESETLST (PROG ((STREAM (\BUTTONS-OPEN-STREAM FILENAME T))) (if (NULL STREAM) then (PROMPTPRINT "*** Buttons data file failed to open! ***") (RETURN)) (RESETSAVE NIL (LIST (FUNCTION \BUTTONS-IO-EXIT) STREAM T)) (PRINT (LIST* *BUTTONS-DATAVERSION* *BUTTONPROPS* (for BUTTON in (OR (LISTP BUTTONS) *ALL-BUTTONS*) when (BUTTONP BUTTON T) collect (LIST (fetch (BUTTON ACTION) of BUTTON) (fetch (BUTTON LABEL) of BUTTON) (WINDOWPROP BUTTON (QUOTE REGION))))) STREAM FILERDTBL) (RETURN (CLOSEF STREAM))))) ) (SAVE-SOME-BUTTONS (LAMBDA (FILENAME BUTTONS) (* Koomen " 2-Dec-88 17:16") (DECLARE (GLOBALVARS *BUTTONS-EDIT-SHADE*)) (RESETLST (LET (BUTTON SAVEBUTTONS MARKEDBUTTONS) (if (LISTP BUTTONS) then (SETQ SAVEBUTTONS BUTTONS) else (* ;; "Either got here through button menu (so FILENAME is a button) or through background menu (so FILENAME is NIL)") (if (SETQ BUTTON FILENAME) then (SETQ SAVEBUTTONS (LIST BUTTON)) (SETQ MARKEDBUTTONS (LIST BUTTON))) (SETQ FILENAME NIL) (* EXPOSE-BUTTONS) (PROMPTPRINT "Click on the buttons you wish to save;" (CHARACTER (CHARCODE CR)) " click again to undo;" (CHARACTER (CHARCODE CR)) " click on non-button to stop.") (do (SETQ BUTTON (WHICHW (GETPOSITION))) (if (NOT (BUTTONP BUTTON)) then (RETURN) elseif (FMEMB BUTTON SAVEBUTTONS) then (* ; "remove it") (SETQ SAVEBUTTONS (DREMOVE BUTTON SAVEBUTTONS)) (\BUTTONS-SHOW BUTTON) else (* ; "add it") (push SAVEBUTTONS BUTTON) (if (FMEMB BUTTON MARKEDBUTTONS) then (\BUTTONS-SHOW BUTTON *BUTTONS-EDIT-SHADE*) else (push MARKEDBUTTONS BUTTON) (RESETSAVE (\BUTTONS-SHOW BUTTON *BUTTONS-EDIT-SHADE*)))))) (if (NULL FILENAME) then (SETQ FILENAME (\BUTTONS-PROMPT-FOR-DATAFILE-NAME "File to save buttons in (NIL to abort):"))) (if FILENAME then (SAVE-BUTTONS FILENAME SAVEBUTTONS))))) ) ) (PUTPROPS BUTTONSPROP ARGNAMES (PROPNAME {NEWVALUE})) (PUTPROPS BUTTON-ACTION ARGNAMES (BUTTON {NEWACTION})) (PUTPROPS BUTTON-LABEL ARGNAMES (BUTTON {NEWLABEL})) (* ;;; "IMPLEMENTATION") (PUTPROPS BUTTONS MAKEFILE-ENVIRONMENT (:READTABLE "INTERLISP" :PACKAGE "INTERLISP" :BASE 10)) (RPAQQ *BUTTONS-DATAVERSION* 3) (RPAQQ *DEFAULT-BUTTONPROPS* (*BUTTONPROPS* (GRID-ORIGIN (15 . 15)) (DEFAULT-LABEL "Create Button") (DEFAULT-ACTION (CREATE-BUTTON)) (MENU-FONT (MODERN 12 BOLD)) (LABEL-FONT (MODERN 10 BOLD)) (SAVE-DIRECTORY NIL) (EDIT-SHADE 4104) (EXEC-SHADE 65535))) (RPAQ? *BUTTONPROPS* (COPYALL *DEFAULT-BUTTONPROPS*)) (RPAQ? *ALL-BUTTONS* NIL) (RPAQ? *BUTTONS-DEFAULT-ACTION* NIL) (RPAQ? *BUTTONS-DEFAULT-LABEL* NIL) (RPAQ? *BUTTONS-EDIT-MENU* NIL) (RPAQ? *BUTTONS-EDIT-SHADE* NIL) (RPAQ? *BUTTONS-EXEC-SHADE* NIL) (RPAQ? *BUTTONS-GRID-ORIGIN* NIL) (RPAQ? *BUTTONS-LABEL-FONT* NIL) (RPAQ? *BUTTONS-MENU-FONT* NIL) (RPAQ? *BUTTONS-SAVE-DIRECTORY* NIL) (DEFINEQ (\BUTTONS-BUTTONEVENTFN (LAMBDA (BUTTON) (* Koomen " 8-Jun-88 09:19") (DECLARE (GLOBALVARS *BUTTONS-EDIT-SHADE* LASTMOUSEBUTTONS)) (if (LASTMOUSESTATE (ONLY LEFT)) then (EXECUTE-BUTTON BUTTON) elseif (LASTMOUSESTATE (ONLY MIDDLE)) then (RESETFORM (\BUTTONS-SHOW BUTTON *BUTTONS-EDIT-SHADE*) (MOVE-BUTTON BUTTON)) elseif (LASTMOUSESTATE (ONLY RIGHT)) then (EDIT-BUTTON BUTTON))) ) (\BUTTONS-DATAFILE-NAME (LAMBDA (FILENAME DATAVERSION) (* Koomen " 2-Dec-88 15:07") (DECLARE (GLOBALVARS *BUTTONS-SAVE-DIRECTORY*)) (LET ((FILE (UNPACKFILENAME FILENAME)) (DFLT (UNPACKFILENAME (if (EQP DATAVERSION 1) then (PACKFILENAME (QUOTE NAME) (QUOTE SAVED-BUTTONS) (QUOTE EXTENSION) NIL (QUOTE VERSION) NIL (QUOTE BODY) (DIRECTORYNAME)) else (PACKFILENAME (QUOTE NAME) (QUOTE SAVED-BUTTONS) (QUOTE EXTENSION) (QUOTE DATA) (QUOTE VERSION) NIL (QUOTE BODY) *BUTTONS-SAVE-DIRECTORY*))))) (if (LISTGET FILE (QUOTE HOST)) then (* ;; "Make sure we don't insert a directory where none's wanted (like on a Dorado DSK)") (LISTPUT DFLT (QUOTE DIRECTORY) NIL)) (PACKFILENAME (NCONC FILE DFLT)))) ) (\BUTTONS-CHANGE-LABEL (LAMBDA (BUTTON NEWLABEL) (* edited%: "18-Mar-87 22:25") (replace (BUTTON LABEL) of BUTTON with NEWLABEL) (WINDOWPROP BUTTON (QUOTE ICONIMAGE) (\BUTTONS-CREATE-ICON NEWLABEL)) (if (OPENWP BUTTON) then (REDISPLAY-BUTTON BUTTON))) ) (\BUTTONS-CREATE-ICON (LAMBDA (LABEL) (* edited%: "18-Mar-87 22:11") (DECLARE (GLOBALVARS *BUTTON-CLIPPING-REGION* *BUTTON-ICON* *BUTTONS-LABEL-FONT*)) (PROG (BM DSP LW LH X Y W H) (SETQ BM (BITMAPCOPY *BUTTON-ICON*)) (SETQ DSP (DSPCREATE BM)) (DSPFONT *BUTTONS-LABEL-FONT* DSP) (DSPCLIPPINGREGION *BUTTON-CLIPPING-REGION* DSP) (SETQ X (fetch (REGION LEFT) of *BUTTON-CLIPPING-REGION*)) (SETQ Y (fetch (REGION BOTTOM) of *BUTTON-CLIPPING-REGION*)) (SETQ W (fetch (REGION WIDTH) of *BUTTON-CLIPPING-REGION*)) (SETQ H (fetch (REGION HEIGHT) of *BUTTON-CLIPPING-REGION*)) (SETQ LW (STRINGWIDTH LABEL *BUTTONS-LABEL-FONT*)) (SETQ LH (FONTHEIGHT *BUTTONS-LABEL-FONT*)) (add Y (FONTDESCENT *BUTTONS-LABEL-FONT*)) (if (IGREATERP W LW) then (add X (LRSH (IDIFFERENCE W LW) 1))) (if (IGREATERP H LH) then (add Y (LRSH (IDIFFERENCE H LH) 1))) (MOVETO X Y DSP) (PRIN1 LABEL DSP) (RETURN BM))) ) (\BUTTONS-DRAW-BOX (LAMBDA NIL (* Koomen "26-Oct-89 08:12") (DECLARE (SPECVARS BB BL BR BT) (GLOBALVARS ScreenBitMap)) (DRAWGRAYBOX BL BB BR BT ScreenBitMap GRAYSHADE)) ) (\BUTTONS-EDITE (LAMBDA (FORM) (* edited%: "18-Mar-87 22:39") (ALLOW.BUTTON.EVENTS) (EVAL.IN.TTY.PROCESS (BQUOTE (CAR (NLSETQ (EDITE (\, (KWOTE FORM)))))) T)) ) (\BUTTONS-EDIT-MENU (LAMBDA NIL (* Koomen " 2-Dec-88 14:50") (DECLARE (GLOBALVARS *BUTTONS-EDIT-MENU* *BUTTONS-MENU-FONT*)) (* * If adding/changing menu entries, do (SETQ *BUTTONS-EDIT-MENU*)) (OR *BUTTONS-EDIT-MENU* (SETQ *BUTTONS-EDIT-MENU* (create MENU TITLE _ "Button Control" ITEMS _ (QUOTE (("Redisplay" (QUOTE REDISPLAY-BUTTON) "Redisplay the button") ("Move" (QUOTE MOVE-BUTTON) "Move the button") ("Copy" (QUOTE COPY-BUTTON) "Create a copy of the button") ("Edit" (QUOTE EDIT-BUTTON-CONTENTS) "Edit the label and the action of the button") ("" NIL "Does nothing") ("Close" (QUOTE CLOSE-BUTTON) "Close the button" (SUBITEMS ("Close All Buttons" (QUOTE CLOSE-BUTTONS)))) ("Delete" (QUOTE DELETE-BUTTON) "Delete this button" (SUBITEMS ("Delete All Buttons" (QUOTE DELETE-BUTTONS)))) ("" NIL "Does nothing") ("Create Button" (QUOTE CREATE-BUTTON) "Create a new button") ("" NIL "Does nothing") ("Expose Buttons" (QUOTE EXPOSE-BUTTONS) "Bring all buttons to the top") ("Align Buttons" (QUOTE ALIGN-BUTTONS) "Align one or more buttons with this button") ("" NIL "Does nothing") ("Save Buttons" (QUOTE SAVE-BUTTONS) "Save all current buttons in default datafile" (SUBITEMS ("Save Some Buttons" (QUOTE SAVE-SOME-BUTTONS) "Save some buttons in some datafile"))) ("Restore Buttons" (QUOTE RESTORE-BUTTONS) "Throw away current buttons, then restore saved buttons from default datafile" (SUBITEMS ("Load Some Buttons" (QUOTE LOAD-SOME-BUTTONS) "Load some buttons from some datafile"))))) MENUFONT _ *BUTTONS-MENU-FONT* MENUOUTLINESIZE _ 1 CENTERFLG _ T CHANGEOFFSETFLG _ (QUOTE Y) MENUOFFSET _ (QUOTE (-1 . 0)))))) ) (\BUTTONS-INIT (LAMBDA NIL (* Koomen " 8-Jun-88 14:13") (* edited%: "18-Mar-87 22:02") (DECLARE (GLOBALVARS *ALL-BUTTONS* *BUTTONS-GRID-ORIGIN*)) (\BUTTONS-SETPROP) (if (NULL *ALL-BUTTONS*) then (CREATE-BUTTON NIL NIL *BUTTONS-GRID-ORIGIN*))) ) (\BUTTONS-IO-EXIT (LAMBDA (STREAM SAVING?) (* Koomen "18-Mar-87 16:19") (if (OPENP STREAM) then (* * Error occurred, so close and discard if saving.) (if SAVING? then (DELFILE (CLOSEF STREAM)) else (CLOSEF STREAM))) NIL) ) (\BUTTONS-OPEN-STREAM (LAMBDA (FILENAME NEW? DATAVERSION) (* Koomen " 2-Dec-88 13:40") (PROG ((FILE (\BUTTONS-DATAFILE-NAME FILENAME DATAVERSION)) (ACCESS (if NEW? then (QUOTE OUTPUT) else (QUOTE INPUT))) (RECOG (if NEW? then (QUOTE NEW) else (QUOTE OLD))) (PARAMETERS (QUOTE (SEQUENTIAL)))) (RETURN (if FILENAME then (OPENSTREAM FILE ACCESS RECOG PARAMETERS) else (CAR (NLSETQ (OPENSTREAM FILE ACCESS RECOG PARAMETERS))))))) ) (\BUTTONS-PROMPT-FOR-DATAFILE-NAME (LAMBDA (PROMPTSTR) (* Koomen " 2-Dec-88 14:46") (DECLARE (GLOBALVARS PROMPTWINDOW)) (PROMPTPRINT PROMPTSTR) (MKATOM (U-CASE (PROMPTFORWORD " " (LET ((FILENAME (\BUTTONS-DATAFILE-NAME (DIRECTORYNAME T)))) (if (NEQ FILENAME (\BUTTONS-DATAFILE-NAME)) then FILENAME)) NIL PROMPTWINDOW NIL NIL (CHARCODE (CR)))))) ) (\BUTTONS-READ (LAMBDA (FILENAME) (* Koomen " 8-Jun-88 11:54") (DECLARE (SPECVARS FILERDTBL) (GLOBALVARS *DEFAULT-BUTTONPROPS*)) (RESETLST (PROG (STREAM PROPS BUTTONSPECS DATAVERSION) (if (AND (NOT (LITATOM FILENAME)) (NOT (STRINGP FILENAME))) then (SETQ FILENAME)) (SETQ STREAM (OR (\BUTTONS-OPEN-STREAM FILENAME NIL (SETQ DATAVERSION 2)) (\BUTTONS-OPEN-STREAM FILENAME NIL (SETQ DATAVERSION 1)))) (if (NULL STREAM) then (PROMPTPRINT "*** Buttons data file not found! ***") (RETURN)) (RESETSAVE NIL (LIST (FUNCTION \BUTTONS-IO-EXIT) STREAM)) (SETQ BUTTONSPECS (LISTP (READ STREAM FILERDTBL))) (if (NUMBERP (CAR BUTTONSPECS)) then (SETQ DATAVERSION (pop BUTTONSPECS))) RETRY (SELECTQ DATAVERSION (1 (SETQ PROPS (COPYALL *DEFAULT-BUTTONPROPS*)) (SETQ BUTTONSPECS (for SPEC in BUTTONSPECS collect (LIST (CADDR SPEC) (CAR SPEC) (CADR SPEC))))) (2 (if (EQ (CAR BUTTONSPECS) (QUOTE *BUTTONPROPS*)) then (SETQ PROPS (CONS (QUOTE *BUTTONPROPS*) (for P on (CDDR BUTTONSPECS) by (CDDR P) collect (LIST (CAR P) (CADR P))))) (SETQ BUTTONSPECS (bind SPEC while (NEQ (QUOTE STOP) (SETQ SPEC (READ STREAM FILERDTBL))) collect SPEC)) else (SETQ DATAVERSION 1) (GO RETRY))) (3 (SETQ PROPS (pop BUTTONSPECS))) (PROGN (PROMPTPRINT "*** Out-of-sync buttons data file version: " DATAVERSION "! ***") (RETURN))) (RETURN (LIST* (CLOSEF STREAM) PROPS BUTTONSPECS))))) ) (\BUTTONS-SETPROP (LAMBDA (PROPNAME PROPVALUE) (* Koomen " 8-Jun-88 11:47") (DECLARE (GLOBALVARS *BUTTONPROPS* *BUTTONS-DEFAULT-ACTION* *BUTTONS-DEFAULT-LABEL* *BUTTONS-EDIT-SHADE* *BUTTONS-EXEC-SHADE* *BUTTONS-GRID-ORIGIN* *BUTTONS-LABEL-FONT* *BUTTONS-MENU-FONT* *BUTTONS-SAVE-DIRECTORY*)) (SELECTQ PROPNAME (NIL (for PROP in (CDR *BUTTONPROPS*) do (\BUTTONS-SETPROP (CAR PROP) (CADR PROP)))) (GRID-ORIGIN (SETQ *BUTTONS-GRID-ORIGIN* (POSITIONP PROPVALUE))) (SAVE-DIRECTORY (SETQ *BUTTONS-SAVE-DIRECTORY* (MKSTRING (DIRECTORYNAME PROPVALUE)))) (EDIT-SHADE (SETQ *BUTTONS-EDIT-SHADE* (SMALLP PROPVALUE))) (EXEC-SHADE (SETQ *BUTTONS-EXEC-SHADE* (SMALLP PROPVALUE))) (LABEL-FONT (SETQ *BUTTONS-LABEL-FONT* (FONTCREATE PROPVALUE))) (MENU-FONT (SETQ *BUTTONS-MENU-FONT* (FONTCREATE PROPVALUE))) (DEFAULT-ACTION (SETQ *BUTTONS-DEFAULT-ACTION* PROPVALUE)) (DEFAULT-LABEL (SETQ *BUTTONS-DEFAULT-LABEL* (MKSTRING PROPVALUE))) NIL)) ) (\BUTTONS-SHOW (LAMBDA (BUTTON SHADE) (* Koomen " 8-Jun-88 09:10") (* ;;; "Resets or inverts the inner area of the button with the given shade.") (DECLARE (GLOBALVARS *BUTTON-INVERT-REGION*)) (if BUTTON then (if (FIXP SHADE) then (DSPFILL *BUTTON-INVERT-REGION* SHADE (QUOTE INVERT) BUTTON) elseif (OR (EQ SHADE T) (OPENWP BUTTON)) then (\ICONW.REPAINTFN BUTTON)) BUTTON)) ) (\BUTTONS-SHOW-EXEC (LAMBDA (BUTTON EXECUTING?) (* Koomen " 8-Jun-88 08:56") (* ;;; "Resets or inverts the inner area of the button. Returns the button so it can be used inside a RESET.") (DECLARE (GLOBALVARS *BUTTONS-EXEC-SHADE*)) (replace (BUTTON EXECUTING?) of BUTTON with EXECUTING?) (\BUTTONS-SHOW BUTTON (if EXECUTING? then *BUTTONS-EXEC-SHADE*)) BUTTON) ) (\BUTTONS-TRACK-MOUSE (LAMBDA NIL (* Koomen "26-Oct-89 08:12") (DECLARE (GLOBALVARS *BUTTONS-GRID-ORIGIN* LASTMOUSEBUTTONS LASTMOUSEX LASTMOUSEY SCREENHEIGHT SCREENWIDTH) (SPECVARS BB BH BL BR BT BW)) (if (NOT (POSITIONP *BUTTONS-GRID-ORIGIN*)) then (SETQ *BUTTONS-GRID-ORIGIN* (CREATEPOSITION 0 0))) (bind MOUSEUP? MOUSEDOWN? NEWBL NEWBB (GRIDXORIGIN _ (fetch (POSITION XCOORD) of *BUTTONS-GRID-ORIGIN*)) (GRIDYORIGIN _ (fetch (POSITION YCOORD) of *BUTTONS-GRID-ORIGIN*)) (GRIDWIDTH _ (PLUS 16 BW)) (GRIDHEIGHT _ (PLUS 8 BH)) (MAXBL _ (IDIFFERENCE SCREENWIDTH BW)) (MAXBB _ (IDIFFERENCE SCREENHEIGHT BH)) until (PROGN (SETQ MOUSEUP? (MOUSESTATE UP)) (if (NOT MOUSEUP?) then (SETQ MOUSEDOWN? T)) (AND MOUSEUP? MOUSEDOWN?)) do (SETQ NEWBL LASTMOUSEX) (SETQ NEWBB LASTMOUSEY) (if (NOT (KEYDOWNP (QUOTE LSHIFT))) then (SETQ NEWBL (IPLUS GRIDXORIGIN (ITIMES GRIDWIDTH (IQUOTIENT NEWBL GRIDWIDTH)))) (SETQ NEWBB (IPLUS GRIDYORIGIN (ITIMES GRIDHEIGHT (IQUOTIENT NEWBB GRIDHEIGHT))))) (SETQ NEWBL (MAX 0 (MIN NEWBL MAXBL))) (SETQ NEWBB (MAX 0 (MIN NEWBB MAXBB))) (if (OR (NEQ NEWBL BL) (NEQ NEWBB BB)) then (UNINTERRUPTABLY (\BUTTONS-DRAW-BOX) (* ; "wipe old") (SETQ BR (IPLUS BW (SETQ BL NEWBL))) (SETQ BT (IPLUS BH (SETQ BB NEWBB))) (\BUTTONS-DRAW-BOX) (* ; "draw new"))))) ) (\BUTTONS-WAIT-MOUSE (LAMBDA (BUTTON) (* Koomen " 8-Jun-88 08:53") (DECLARE (GLOBALVARS LASTMOUSEBUTTONS LASTMOUSEX LASTMOUSEY)) (PROG ((REGION (WINDOWPROP BUTTON (QUOTE REGION)))) LP (GETMOUSESTATE) (if (NOT (INSIDEP REGION LASTMOUSEX LASTMOUSEY)) then (RETURN) elseif (NOT (LASTMOUSESTATE UP)) then (BLOCK) (GO LP) else (RETURN T)))) ) ) (* The button icon) (FILESLOAD (SYSLOAD FROM LISPUSERS) ICONW) (DEFINEQ (DROPSHADOW (LAMBDA (BM SHADOWOFFSET SHADOWSHADE) (* Koomen "31-Dec-86 12:47") (PROG (IMAGE (OFFSET (OR SHADOWOFFSET 4)) (SHADE (OR SHADOWSHADE 42405)) (MASK (BITMAPCOPY BM)) (SHADOW (BITMAPCOPY BM))) (SETQ IMAGE (BITMAPCREATE (PLUS OFFSET (BITMAPWIDTH BM)) (PLUS OFFSET (BITMAPHEIGHT BM)) (BITSPERPIXEL BM))) (* * Compute mask * *) (BLTSHADE BLACKSHADE MASK) (CLEAR-MASK-OUTLINE MASK BM) (* * Fill shadow * *) (BLTSHADE SHADE SHADOW) (* * Remove outline from shadow * *) (BITBLT MASK NIL NIL SHADOW NIL NIL NIL NIL (QUOTE INVERT) (QUOTE ERASE)) (* * Put shadow in bottom-right corner of image * *) (BITBLT SHADOW NIL NIL IMAGE OFFSET NIL NIL NIL (QUOTE INPUT) (QUOTE REPLACE)) (* * Put original in top-left corner of image * *) (BITBLT MASK NIL NIL IMAGE NIL OFFSET NIL NIL (QUOTE INPUT) (QUOTE ERASE)) (BITBLT BM NIL NIL IMAGE NIL OFFSET NIL NIL (QUOTE INPUT) (QUOTE PAINT)) (RETURN IMAGE))) ) (ICONMASK (LAMBDA (ICON) (* Koomen "31-Dec-86 12:40") (PROG ((MASK (BITMAPCOPY ICON))) (BITBLT ICON NIL NIL MASK NIL NIL NIL NIL (QUOTE INVERT) (QUOTE REPLACE)) (CLEAR-MASK-OUTLINE MASK ICON) (RETURN MASK))) ) (CLEAR-MASK-OUTLINE (LAMBDA (MASK BM) (* Koomen "31-Dec-86 12:35") (* * Make outline of MASK same as BM * *) (for I from 0 to (SUB1 (BITMAPWIDTH BM)) bind (BMH _ (SUB1 (BITMAPHEIGHT BM))) do (for J from 0 to BMH by 1 while (ZEROP (BITMAPBIT BM I J)) do (BITMAPBIT MASK I J 0)) (for J from BMH to 0 by -1 while (ZEROP (BITMAPBIT BM I J)) do (BITMAPBIT MASK I J 0)))) ) ) (RPAQQ *BUTTON-BITMAP* #*(97 37)@OOOOOOOOOOOOOOOOOOOOOOH@@@@COOOOOOOOOOOOOOOOOOOOOON@@@@G@@@@@@@@@@@@@@@@@@@@@@G@@@@F@@@@@@@@@@@@@@@@@@@@@@C@@@@LGOOOOOOOOOOOOOOOOOOOOOAH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LH@@@@@@@@@@@@@@@@@@@@@IH@@@LGOOOOOOOOOOOOOOOOOOOOOAH@@@F@@@@@@@@@@@@@@@@@@@@@@C@@@@G@@@@@@@@@@@@@@@@@@@@@@G@@@@COOOOOOOOOOOOOOOOOOOOOON@@@@@OOOOOOOOOOOOOOOOOOOOOOH@@@@) (RPAQ? *BUTTON-INVERT-REGION* (QUOTE (6 10 85 25))) (RPAQ? *BUTTON-CLIPPING-REGION* (QUOTE (7 11 83 23))) (RPAQ? *BUTTON-ICON* (DROPSHADOW *BUTTON-BITMAP*)) (RPAQ? *BUTTON-ICON-MASK* (ICONMASK *BUTTON-ICON*)) (ADDTOVAR BackgroundMenuCommands ("Button Control" (QUOTE (EDIT-BUTTON)) "Manipulate action buttons")) (RPAQQ BackgroundMenu NIL) (\BUTTONS-INIT) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA) (ADDTOVAR NLAML) (ADDTOVAR LAMA BUTTON-LABEL BUTTON-ACTION BUTTONSPROP) ) (PUTPROPS BUTTONS COPYRIGHT ("Xerox Corporation" 1986 1987 1988 1989)) (DECLARE%: DONTCOPY (FILEMAP (NIL (3565 14600 (ALIGN-BUTTONS 3575 . 4350) (BUTTONP 4352 . 4557) (BUTTONSPROP 4559 . 5104) (BUTTON-ACTION 5106 . 5470) (BUTTON-LABEL 5472 . 5881) (CLOSE-BUTTON 5883 . 5993) (CLOSE-BUTTONS 5995 . 6176) (COPY-BUTTON 6178 . 6399) (CREATE-BUTTON 6401 . 7810) (DELETE-BUTTON 7812 . 8013) ( DELETE-BUTTONS 8015 . 8209) (EDIT-BUTTON 8211 . 8946) (EDIT-BUTTON-CONTENTS 8948 . 9580) ( EXECUTE-BUTTON 9582 . 9998) (EXPOSE-BUTTONS 10000 . 10186) (LOAD-SOME-BUTTONS 10188 . 10524) ( MOVE-BUTTON 10526 . 11489) (REDISPLAY-BUTTON 11491 . 11751) (RESTORE-BUTTONS 11753 . 12582) ( SAVE-BUTTONS 12584 . 13332) (SAVE-SOME-BUTTONS 13334 . 14598)) (15579 25703 (\BUTTONS-BUTTONEVENTFN 15589 . 15972) (\BUTTONS-DATAFILE-NAME 15974 . 16670) (\BUTTONS-CHANGE-LABEL 16672 . 16929) ( \BUTTONS-CREATE-ICON 16931 . 17818) (\BUTTONS-DRAW-BOX 17820 . 17994) (\BUTTONS-EDITE 17996 . 18160) ( \BUTTONS-EDIT-MENU 18162 . 19779) (\BUTTONS-INIT 19781 . 20029) (\BUTTONS-IO-EXIT 20031 . 20257) ( \BUTTONS-OPEN-STREAM 20259 . 20690) (\BUTTONS-PROMPT-FOR-DATAFILE-NAME 20692 . 21045) (\BUTTONS-READ 21047 . 22401) (\BUTTONS-SETPROP 22403 . 23333) (\BUTTONS-SHOW 23335 . 23713) (\BUTTONS-SHOW-EXEC 23715 . 24082) (\BUTTONS-TRACK-MOUSE 24084 . 25358) (\BUTTONS-WAIT-MOUSE 25360 . 25701)) (25776 27275 (DROPSHADOW 25786 . 26685) (ICONMASK 26687 . 26900) (CLEAR-MASK-OUTLINE 26902 . 27273))))) STOP