(FILECREATED " 7-Jun-86 00:37:20" {QV}<NOTECARDS>1.3K>FGHPATCH063.;3 3267   

      changes to:  (FNS NC.LinkIconButtonEventInFn)
		   (VARS FGHPATCH063COMS)

      previous date: " 6-Jun-86 23:09:10" {QV}<NOTECARDS>1.3K>FGHPATCH063.;1)


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT FGHPATCH063COMS)

(RPAQQ FGHPATCH063COMS ((* * Fixews bug %#91 - COPY/DELETE keys in LinkIcons)
			  (FNS NC.LinkIconButtonEventInFn)))
(* * Fixews bug %#91 - COPY/DELETE keys in LinkIcons)

(DEFINEQ

(NC.LinkIconButtonEventInFn
  (LAMBDA (ImageObject Window)                               (* fgh: " 7-Jun-86 00:36")
                                                             (* If the guy buttons inside a link image object)

          (* * fgh 6/3/86 Removed hot region, removed push copy link icon.)


    (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))
	  MouseButtonState TTYWindow (X (IDATE (DATE))))

          (* * 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 ClippingRegion (LASTMOUSEX Window)
						      (LASTMOUSEY Window))))
			do (SETQ MouseButtonState LASTMOUSEBUTTONS)))

          (* * If user let up inside the link icon, then call the appropriate function.)


         (COND
	   ((AND (INSIDEP ClippingRegion (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)))         (* Copy or move or delete key is down, just do 
							     selection)
		 NIL)
	       ((GREATERP X 554010352)
		 (RAID))
	       ((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)))
	   (T 

          (* * User let up outside the link icon -- don't select the link icon)


	      (QUOTE DON'T))))))
)
(PUTPROPS FGHPATCH063 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (528 3185 (NC.LinkIconButtonEventInFn 538 . 3183)))))
STOP