(FILECREATED "30-Jun-86 11:48:58" {QV}<NOTECARDS>1.3K>FGHPATCH081.;2 5422 changes to: (FNS NC.LinkIconButtonEventInFn) (VARS FGHPATCH081COMS) previous date: "30-Jun-86 00:13:07" {QV}<NOTECARDS>1.3K>FGHPATCH081.;1) (* Copyright (c) 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT FGHPATCH081COMS) (RPAQQ FGHPATCH081COMS ((* * Put the hots region notion back into link icons) (FNS NC.LinkIconButtonEventInFn))) (* * Put the hots region notion back into link icons) (DEFINEQ (NC.LinkIconButtonEventInFn (LAMBDA (ImageObject Window) (* fgh: "30-Jun-86 11:48") (* If the guy buttons inside a link image object) (* * fgh 6/3/86 Removed hot region, removed push copy link icon.) (* * fgh 6/29/86 Put back in a hot region.) (LET ((Window (COND ((WINDOWP Window) Window) ((DISPLAYSTREAMP Window) (WFROMDS Window)) ((TEXTSTREAMP Window) (WINDOW.FROM.TEDIT.THING Window)) (T NIL))) (ClippingRegion (DSPCLIPPINGREGION NIL Window)) (Link (NC.FetchLinkFromLinkIcon ImageObject)) HotRegion MouseButtonState TTYWindow ClippingRegionWidth) (* * Figure out the hot region -- basically the clipping region minus a few pts at right and left to allow for TEdit selection of icon.) (SETQ HotRegion (if (GREATERP (SETQ ClippingRegionWidth (fetch (REGION WIDTH) of ClippingRegion)) 24) then (* There's at least 10 pts between the two 7pt cold regions at left and right.) (CREATEREGION (PLUS (fetch (REGION LEFT) of ClippingRegion) 7) (fetch (REGION BOTTOM) of ClippingRegion) (DIFFERENCE (fetch (REGION WIDTH) of ClippingRegion) 14) (fetch (REGION HEIGHT) of ClippingRegion)) elseif (AND (LESSP ClippingRegionWidth 9)) then (* if link icon width less than 9 then no cold regions) ClippingRegion else (* Divide into 4ths and give 1/4 at each edge as cold regions.) (CREATEREGION (PLUS (fetch (REGION LEFT) of ClippingRegion) (TIMES .25 ClippingRegionWidth)) (fetch (REGION BOTTOM) of ClippingRegion) (QUOTIENT ClippingRegionWidth 2) (fetch (REGION HEIGHT) of ClippingRegion)))) (COND ((NOT (INSIDEP HotRegion (LASTMOUSEX Window) (LASTMOUSEY Window))) (* * If in the link icon, but not in the hot region -- want to select the link icon.) NIL) (T (* * Otherwise, invert the window and wait until the mouse is up or the cursor moves out of the link icon.) (RESETLST (RESETSAVE (INVERTW Window)) (until (OR (MOUSESTATE UP) (NOT (INSIDEP HotRegion (LASTMOUSEX Window) (LASTMOUSEY Window)))) do (SETQ MouseButtonState LASTMOUSEBUTTONS))) (* * If user let up inside the link icon, then call the appropriate function.) (COND ((AND (INSIDEP HotRegion (LASTMOUSEX Window) (LASTMOUSEY Window)) MouseButtonState) (* * User let up inside the link icon.) (COND ((OR (KEYDOWNP (QUOTE LSHIFT)) (KEYDOWNP (QUOTE RSHIFT)) (KEYDOWNP (QUOTE CTRL)) (KEYDOWNP (QUOTE COPY)) (KEYDOWNP (QUOTE DELETE)) (KEYDOWNP (QUOTE MOVE))) (* Copy or move or delete key is down, just do selection) NIL) ((ZEROP (LOGXOR MouseButtonState 4)) (* The left button was down, bring up the dest card.) (NC.EditNoteCard (fetch (Link DestinationCard) of Link)) (QUOTE DON'T)) ((OR (ZEROP (LOGXOR MouseButtonState 1)) (ZEROP (LOGXOR MouseButtonState 6))) (* The middle button was down, call the middle button fn.) (NC.LinkIconMiddleButtonFn ImageObject Window)) ((ZEROP (LOGXOR MouseButtonState 2)) (* The right button was down, allow selection) NIL) (T (* Hmmm, don't know know, allow selectin) NIL))) ((AND (INSIDEP ClippingRegion (LASTMOUSEX Window) (LASTMOUSEY Window)) (NOT (INSIDEP HotRegion (LASTMOUSEX Window) (LASTMOUSEY Window)))) (* * User let up outside the hot region but inside the link icon -- select the link icon) NIL) (T (* * User let up outside the link icon -- don't select the link icon) (QUOTE DON'T)))))))) ) (PUTPROPS FGHPATCH081 COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (528 5340 (NC.LinkIconButtonEventInFn 538 . 5338))))) STOP