(FILECREATED "18-Mar-85 18:45:56" {PHYLUM}<NOTECARDS>RELEASE1.2>NCGESTURES.;4 4321 changes to: (VARS NCGESTURESCOMS) previous date: " 6-Feb-85 18:06:16" {PHYLUM}<NOTECARDS>RELEASE1.2>NCGESTURES.;3) (* Copyright (c) 1984, 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT NCGESTURESCOMS) (RPAQQ NCGESTURESCOMS ((E (SETQ NC.SystemDate (DATE)) (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS))) (VARS NC.SystemDate) (P (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS))) (* * Stuff for closing and moving windows by gesturing.) (GLOBALVARS LASTMOUSEBUTTONS) (FNS NC.GrabWindow) (P (SETQ BACKGROUNDBUTTONEVENTFN (FUNCTION NC.GrabWindow))))) (RPAQQ NC.SystemDate "18-Mar-85 18:45:57") (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS)) (* * Stuff for closing and moving windows by gesturing.) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS LASTMOUSEBUTTONS) ) (DEFINEQ (NC.GrabWindow (LAMBDA NIL (* NoteCards% User "12-Jun-84 15:36") (PROG ((InOutList NIL) Window WindowRegionLeft WindowRegionBottom WindowRegionWidth WindowRegionHeight INX INY OUTX OUTY) (AND (NEQ LASTMOUSEBUTTONS 7) (until (MOUSESTATE UP) do (RESETLST (RESETSAVE (CURSOR BOXCURSOR)) (until (OR (MOUSESTATE UP) (NEQ Window (WHICHW))) do (BLOCK)) (SETQ InOutList (CONS (LIST Window LASTMOUSEX LASTMOUSEY) InOutList)) (SETQ WindowRegionLeft (fetch (REGION LEFT) of (WINDOWPROP Window (QUOTE REGION)))) (SETQ WindowRegionBottom (fetch (REGION BOTTOM) of (WINDOWPROP Window (QUOTE REGION)))) (SETQ WindowRegionWidth (fetch (REGION WIDTH) of (WINDOWPROP Window (QUOTE REGION)))) (SETQ WindowRegionHeight (fetch (REGION HEIGHT) of (WINDOWPROP Window (QUOTE REGION)))) (SETQ OUTX (CADAR InOutList)) (SETQ OUTY (CADDAR InOutList)) (SETQ INX (CADR (CADR InOutList))) (SETQ INY (CADDR (CADR InOutList))) (COND ((AND Window (NOT (LASTMOUSESTATE UP)) (AND (OR (AND (ILESSP INX (IPLUS WindowRegionLeft (FTIMES .25 WindowRegionWidth) )) (ILESSP OUTX (IPLUS WindowRegionLeft (FTIMES .25 WindowRegionWidth)))) (AND (IGREATERP INX (IPLUS WindowRegionLeft (FTIMES .75 WindowRegionWidth))) (IGREATERP OUTX (IPLUS WindowRegionLeft (FTIMES .75 WindowRegionWidth))))) (OR (AND (ILESSP INY (IPLUS WindowRegionBottom (FTIMES .25 WindowRegionHeight))) (ILESSP OUTY (IPLUS WindowRegionBottom (FTIMES .25 WindowRegionHeight)))) (AND (IGREATERP INY (IPLUS WindowRegionBottom (FTIMES .75 WindowRegionHeight))) (IGREATERP OUTY (IPLUS WindowRegionBottom (FTIMES .75 WindowRegionHeight))))) )) (MOVEW Window)) ((AND Window (NOT (LASTMOUSESTATE UP)) (for N from 3 to 3 by 2 always (AND (EQ Window (CAAR (NTH InOutList N))) (NOT (INSIDEP (CREATEREGION (IPLUS WindowRegionLeft 20) (IPLUS WindowRegionBottom 20) (IDIFFERENCE WindowRegionWidth 40) (IDIFFERENCE WindowRegionHeight 40)) (CADAR (NTH InOutList (SUB1 N))) (CADDAR (NTH InOutList (SUB1 N)))))))) (CLOSEW Window) (BLOCK))) (SETQ Window (WHICHW)))))))) ) (SETQ BACKGROUNDBUTTONEVENTFN (FUNCTION NC.GrabWindow)) (PUTPROPS NCGESTURES COPYRIGHT ("Xerox Corporation" 1984 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (998 4179 (NC.GrabWindow 1008 . 4177))))) STOP