(FILECREATED " 5-Jun-86 19:17:54" {QV}<NOTECARDS>1.3K>FGHPATCH058.;1 2321   

      changes to:  (VARS FGHPATCH058COMS)
		   (FNS NC.TextCardShrinkFn))


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

(PRETTYCOMPRINT FGHPATCH058COMS)

(RPAQQ FGHPATCH058COMS ((* * Fix to bug %# 24 TEDIT SHRINK does not pass user position)
			  (FNS NC.TextCardShrinkFn)))
(* * Fix to bug %# 24 TEDIT SHRINK does not pass user position)

(DEFINEQ

(NC.TextCardShrinkFn
  (LAMBDA (W)                                                (* fgh: " 5-Jun-86 19:16")

          (* * This is in order to get the right title on the TEdit icon. This is a kludgy finesse around TEdit's shrunken 
	  icon title facility.)



          (* * rht 4/30/86: Now optionally kills TEdit process at shrink time.)



          (* * fgh 6/5/86 Fixed to KLUDGE around problem that TEdit will call GETBOXPOSITION even when SHRINKW is called with
	  a position argument. Kludge involves looking up the stack for the position being specified in SHRINKW since its not
	  passed down to here.)


    (LET ((OldIconTitle (WINDOWPROP W (QUOTE NoteCardsIconTitle)))
	  (Icon (WINDOWPROP W (QUOTE ICON)))
	  (Card (NC.CoerceToCard W))
	  IconTitle)
         (if (NULL Icon)
	     then (WINDOWPROP W (QUOTE TEDIT.ICON.TITLE)
				  "")
		    (WINDOWPROP W (QUOTE ICON)
				  (TITLEDICONW TEDIT.TITLED.ICON.TEMPLATE "" TEDIT.ICON.FONT
						 (LET ((StkPos (STKPOS (QUOTE SHRINKW))))
						      (if StkPos
							  then (PROG1 (STKARG (QUOTE 
										     ICONPOSITION)
										    StkPos)
									  (RELSTK StkPos))
							else NIL))
						 T T NIL))
		    (APPLY* (WINDOWPROP W (QUOTE ICONFN))
			      W)
		    (SETQ Icon (WINDOWPROP W (QUOTE ICON))))
         (if (NOT (EQUAL OldIconTitle (SETQ IconTitle (CONCAT "NC: " (NC.RetrieveTitle
									  Card)))))
	     then (ICONTITLE IconTitle NIL NIL Icon)
		    (WINDOWPROP W (QUOTE NoteCardsIconTitle)
				  IconTitle))
         (if NC.DelTEditProcessAtShrinkFlg
	     then (NC.DelTEditProcesses W)))))
)
(PUTPROPS FGHPATCH058 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (456 2239 (NC.TextCardShrinkFn 466 . 2237)))))
STOP