XEROX SOLID-MOVEW 2 4 1 SOLID-MOVEW 1 4 By: Lennart Lvstrand (Lovstrand.EuroPARC@Xerox.COM) This document last edited on May 13, 1988. INTRODUCTION This module changes the behaviour of MOVEW when no destination is given to let the whole image of a window track the mouse instead of just its outline. To avoid flickering and to give an illusion of a smooth animation, all rendering operations are done off the screen, ending with a single bitblt to the frame buffer for each cycle. This can easily be done on small windows such as icons, but the more bits there are to be moved, the longer it takes to do the animation updates and the slower it becomes to solidly move windows. Therefore, the user can control when solid vs. outline moving is to be done by setting *SOLID-MOVEW-FLAG* to an appropriate value. By default, only windows containing less than 15,000 pixels will be moved solidly; all other windows are moved using the original MOVEW method. SOLID-MOVEW interfaces nicely with both ICONW and ATTACHEDWINDOWS by being able to move images of arbitrary shape % not just pure rectangles. It also knows about GRID-ICONS and can be made to force the icons to snap to grid positions while being moved, thus producing a kind of jagged feeling. Finally, a shadow has been added emphasize the 2-D property of window systems and to give a clear indication of when the window is in the process of being moved. PROGRAMMER'S INTERFACE When loaded, the module replaces the system MOVEW function with its own version and moves the original code to ORIGINAL-MOVEW. The control and interaction is then comes through the following variables: *SOLID-MOVEW-FLAG* [Variable] This variable controls whether the new MOVEW should use solid or outline moving. It should have one of the following types of values: a NUMBERP Only use solid moving on windows that have a total size (width x height) less than or equal to the given number of pixels. a POSITIONP Only use solid moving on windows that have a width and height less than or equal to the two numbers. ICON Only move icons solidly. A window is considered to be an icon if it either has an ICONFOR or an ICONIMAGE property. T Move all windows solidly. NIL Move all windows using outlines. The default value for *SOLID-MOVEW-FLAG* is 15000. *SOLID-MOVEW-SHADOW* [Variable] *SOLID-MOVEW-SHADOW-SHADE* [Variable] These two variables define whether or not a shadow should accompany the moving image. The shadow is always directed towards south-east and the first variable, *SOLID-MOVEW-SHADOW*, determines its position by taking on any of the following types of values: a NUMBERP The x and y offsets of the shadow (same) a POSITIONP The x and y offsets of the shadow (different) T Use the default shadow offset % 3 pixels in both directions. NIL Don't show a shadow. The second variable, *SOLID-MOVEW-SHADOW-SHADE*, sets the darkness of the shadow, ie. the texture to be added to the background where the shadow is visible. The default values for the two variables are T and 42405, a 50% gray shadow offset by 3 pixels. *SOLID-MOVEW-GRIDDING* [Variable] When used together with the ICON-GRIDS module, SOLID-MOVEW can be made to only move solid window images on grid positions, thus creating a kind of "jagged" feeling when interactively moving icons on the screen. If this is disabled, the icon will "snap" to the closest grid position only after the move has been completed. The default value for *SOLID-MOVEW-GRIDDING* is NIL, thus disabling early gridding. *SOLID-MOVEW-CASHING* [Variable] SOLID-MOVEW uses separate bitmaps for rendering purposes so as to produce a smooth animated move and avoid unnecessary flickering on the screen. To speed up the initial phase of the move operation, the rendering bitmaps can be cached from one invocation to another. This will use up some bitmap space, but can be freed using (GAINSPACE) if need arises. The default value for *SOLID-MOVEW-CASHING* is T, thus enabling cached rendering bitmaps. (SOLID-MOVEW POSorX Y) [Function] Because only those windows meeting the requirements of *SOLID-MOVEW-FLAG* will be moved solidly, the user has the option of calling SOLID-MOVEW. It takes the same arguments as MOVEW, but if either POSorX or Y is specified, control is again turned over to the old MOVEW. If you get tired of all this, you can undo the behaviour of SOLID-MOVEW by typing the following form into an Interlisp Exec: (MOVD 'ORIGINAL-MOVEW 'MOVEW) BUGS No provision has been made to make SOLID-MOVEW work with color. If the window is closed as a side effect of the its MOVEFN or AFTERMOVEFN, it will be reopened before SOLID-MOVEW returns(LIST ((PAGE NIL (PAPERSIZE LETTER FOLIOINFO (ARABIC "" "") STARTINGPAGE# 250) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) 3T8``8``3T28``2,,8,8H PAGEHEADING RUNNINGHEADTERMINAL MODERN MODERN MODERN MODERNMODERN LOGO    HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN    HRULE.GETFNMODERN   HRULE.GETFNMODERN %"* (r!s{&3F4;! `"CT!cZ  >}lz