XEROX WAM 2 4 1 Window Action Menu 1 4 By: Jeff Shrager (Shrager@Xerox.com) INTRODUCTION WAM can be used to attach an iconic menu to any window. This menu (attached to the left or right of the target window) contains various icons, that refer to the window action menu commands: CLOSE (a door closing), REDISPLAY (a paint brush), SHRINK (a shirking window icon), and MOVE (a window on wheels). Use: (WAM WINDOW BORDER) [Function] If window is nil, (WHICHW) is used. Border should be either LEFT or RIGHT, and defaults to RIGHT. Select the icon, to call the appropriate window action function. I use it by adding "wamify" to my WindowMenuCommands, which, when selected, calls WAM. This makes it easy to add a window action memu to any window. Notes: My icons are horrible. Anyone wishing to hack them may feel free. The action menu gets reshaped a little bizarrely, by virtue of the way that attache windows work. You can use TOP and BOTTOM for the "edge" argument, but boy will you be surprised by the result. Recommended enhancements: Fix the icons. Make the attached window (menu) respond correctly to repaint so that it fixes its width appropriately. Permit TOP and BOTTOM for attachment. Uses (WHICHW) in the WAM menu items. This can lose if you've moved the mouse in the mean time (ie. when waiting for the handler to be swapped in). You might want to use (WFROMMENU FROMMENU). DEFAULTWHENSELECTEDFN binds FROMMENU. I think that "Close" selected from the window menu in a WAM window should close the WAM only, thus giving a way of getting rid of it. Probably something like WFN would do itWFN would do on CLOSEWFN would do (LIST ((PAGE NIL (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È(ŠŠ8(È (ŠŠ8DÈÈ PAGEHEADING RUNNINGHEADMODERN MODERN MODERN MODERN MODERNLOGO HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN ' 4 <Cbag(èÐ};zº