(FILECREATED " 4-Jun-86 12:20:34" {QV}<NOTECARDS>1.3K>FGHPATCH049.;3 3085   

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

      previous date: " 3-Jun-86 22:32:06" {QV}<NOTECARDS>1.3K>FGHPATCH049.;1)


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

(PRETTYCOMPRINT FGHPATCH049COMS)

(RPAQQ FGHPATCH049COMS ((* * Fix up hot spots and push copy on link icons Bug %# 79.0)
			  (FNS NC.LinkIconButtonEventInFn)))
(* * Fix up hot spots and push copy on link icons Bug %# 79.0)

(DEFINEQ

(NC.LinkIconButtonEventInFn
  (LAMBDA (ImageObject Window)                               (* fgh: " 4-Jun-86 12:20")
                                                             (* 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)

          (* * 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 CTRL)))           (* 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)))
	   (T 

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


	      (QUOTE DON'T))))))
)
(PUTPROPS FGHPATCH049 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (546 3003 (NC.LinkIconButtonEventInFn 556 . 3001)))))
STOP