(FILECREATED "27-Aug-86 16:36:38" {QV}<NOTECARDS>1.3K>NEXT>FGHPATCH100.;1 2430   

      changes to:  (VARS FGHPATCH100COMS)
		   (FNS NC.InsertLinkInSketch))


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

(PRETTYCOMPRINT FGHPATCH100COMS)

(RPAQQ FGHPATCH100COMS [(* * Fix to acount for name change to SKETCHW.SCALE)
			  (* * Redifined from NCLINKS)
			  (FNS NC.InsertLinkInSketch)
			  (* * TO add to COMS of NCSKETCHCARD)
			  (P (if (NULL (GETD (QUOTE VIEWER.SCALE)))
				 then
				 (DEFINEQ (VIEWER.SCALE (LAMBDA (Window)
								(WINDOWPROP Window (QUOTE SCALE])
(* * Fix to acount for name change to SKETCHW.SCALE)

(* * Redifined from NCLINKS)

(DEFINEQ

(NC.InsertLinkInSketch
  [LAMBDA (SketchWindow Link SketchWindowPosition)           (* edited: "27-Aug-86 16:26")

          (* * rht 8/20/85: Rewritten to use Richard's sketch programmer's interface. Eliminates references to sketch 
	  records.)



          (* * rht 10/1/85: Now checks that chosen position is actually within sketch, otherwise aborts by deleting link.)



          (* * fgh 2/6/86 Added Card argument.)



          (* * kirk 11Mar86 Deleted Card argument.)



          (* * rht 8/1/86: Now doesn't break if NULL Link.)



          (* * fgh 8/27/86 Changed SKETCHW.SCALE to VIEWER.SCALE to match change in Sketch.)


    (AND Link (LET ((LinkIcon (NC.MakeLinkIcon Link))
		      (Scale (VIEWER.SCALE SketchWindow))
		      SketchIcon Size Position)
		     (SETQ Size (IMAGEBOXSIZE LinkIcon))
		     (SETQ Position (OR (POSITIONP SketchWindowPosition)
					    (GETBOXPOSITION (fetch (IMAGEBOX XSIZE)
								 of Size)
							      (fetch (IMAGEBOX YSIZE)
								 of Size)
							      NIL NIL SketchWindow)))
		     (if (AND (INSIDEP (DSPCLIPPINGREGION NIL SketchWindow)
					     Position)
				  (SETQ SketchIcon (SKETCH.IMAGE.OBJECT.ELEMENT LinkIcon Scale 
										    Position)))
			 then (SKETCH.ADD.ELEMENT SketchIcon SketchWindow)
				SketchIcon
		       else (NCP.DeleteLinks Link)
			      NIL])
)
(* * TO add to COMS of NCSKETCHCARD)

[if (NULL (GETD (QUOTE VIEWER.SCALE)))
    then
    (DEFINEQ (VIEWER.SCALE (LAMBDA (Window)
				   (WINDOWPROP Window (QUOTE SCALE]
(PUTPROPS FGHPATCH100 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (696 2173 (NC.InsertLinkInSketch 706 . 2171)))))
STOP