(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP")
(FILECREATED "14-Jan-88 17:17:14" {QV}<NOTECARDS>1.3LNEXT>RHTPATCH303.;2 5393   

      changes to%:  (VARS RHTPATCH303COMS)
                    (FNS NC.SketchCardShrinkFn)

      previous date%: "14-Jan-88 17:10:18" {QV}<NOTECARDS>1.3LNEXT>RHTPATCH303.;1)


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

(PRETTYCOMPRINT RHTPATCH303COMS)

(RPAQQ RHTPATCH303COMS ((DECLARE%: DONTCOPY (PROPS (RHTPATCH303 MAKEFILE-ENVIRONMENT)
                                                   (RHTPATCH303 FILETYPE)))
                        [DECLARE%: COPY FIRST (P (NC.LoadFileFromDirectories 'NCSKETCHCARD)
                                                 (NC.LoadFileFromDirectories 'NCGRAPHCARD]
                        

(* ;;; "This file fixes old bug whereby bringing up the starting tabletop when opening a notefile didn't handle cases of shrunken graph or sketch cards.  It made user position the icon manually.  Required a change to NCTABLETOPCARD and a patch to SKETCH (found in LYRICSKETCHPATCHES) in addition to the changes given here.")

                        
          
          (* ;; "The DECLARE FIRST expression at the top of NCSKETCHCARD should be changed to load LYRICSKETCHPATCHES as follows:")

                        [DECLARE%: COPY FIRST (P (NC.LoadFileFromDirectories 'SKETCH '
                                                        LISPUSERSDIRECTORIES)
                                                 (NC.LoadFileFromDirectories 'LYRICSKETCHPATCHES]
                        
          
          (* ;; "Change to NCSKETCHCARD")

                        (FNS NC.SketchCardShrinkFn)
                        
          
          (* ;; "Change to NCGRAPHCARD")

                        (FNS NC.GraphCardShrinkFn)))
(DECLARE%: DONTCOPY 

(PUTPROPS RHTPATCH303 MAKEFILE-ENVIRONMENT (:PACKAGE "INTERLISP" :READTABLE "INTERLISP"))

(PUTPROPS RHTPATCH303 FILETYPE :TCOMPL)
)
(DECLARE%: COPY FIRST 
(NC.LoadFileFromDirectories 'NCSKETCHCARD)
(NC.LoadFileFromDirectories 'NCGRAPHCARD)
)



(* ;;; 
"This file fixes old bug whereby bringing up the starting tabletop when opening a notefile didn't handle cases of shrunken graph or sketch cards.  It made user position the icon manually.  Required a change to NCTABLETOPCARD and a patch to SKETCH (found in LYRICSKETCHPATCHES) in addition to the changes given here."
)




(* ;; 
"The DECLARE FIRST expression at the top of NCSKETCHCARD should be changed to load LYRICSKETCHPATCHES as follows:"
)

(DECLARE%: COPY FIRST 
(NC.LoadFileFromDirectories 'SKETCH 'LISPUSERSDIRECTORIES)
(NC.LoadFileFromDirectories 'LYRICSKETCHPATCHES)
)



(* ;; "Change to NCSKETCHCARD")

(DEFINEQ

(NC.SketchCardShrinkFn
  [LAMBDA (W)                                                (* ; "Edited 14-Jan-88 17:02 by Trigg")
          
          (* ;; "Check to make sure that icon's title agrees with card title.  If not, retitle the icon.  If this is first shrink then create a new icon and fill in title.")
          
          (* ;; "fgh 11/14/85 Updated to handle Card object.")
          
          (* ;; 
          "rht 1/14/88: Now passes an icon position to SK.SHRINK.ICONCREATE if we had stashed one.")

    (PROG ((OldIconTitle (WINDOWPROP W 'SKETCH.ICON.TITLE))
           (Icon (WINDOWPROP W 'ICON))
           (Card (NC.CoerceToCard W))
           IconTitle)
          [COND
             ((NOT Icon)
              [SK.SHRINK.ICONCREATE W (POSITIONP (WINDOWPROP W 'SHRUNKENWINPOS]
              (SETQ Icon (WINDOWPROP W 'ICON]
          (COND
             ([NOT (EQUAL OldIconTitle (SETQ IconTitle (CONCAT "NC: " (NC.RetrieveTitle Card]
              (WINDOWPROP W 'SKETCH.ICON.TITLE IconTitle)
              (ICONTITLE IconTitle NIL NIL Icon])
)



(* ;; "Change to NCGRAPHCARD")

(DEFINEQ

(NC.GraphCardShrinkFn
  [LAMBDA (W)                                                (* ; "Edited 14-Jan-88 15:48 by Trigg")
          
          (* * Check to make sure that icon's title agrees with card title.
          If not, retitle the icon. If this is first shrink then create a new icon and 
          fill in title.)
          
          (* * rg |11/19/86| Added GLOBALVARS declaration)

    (DECLARE (GLOBALVARS TEDIT.ICON.FONT NC.ShrunkenGraphIconTemplate))
    (LET ((OldIconTitle (WINDOWPROP W 'GRAPH.ICON.TITLE))
          (Icon (WINDOWPROP W 'ICON))
          (Card (NC.CoerceToCard W))
          IconTitle BM IconTemplate BMHeight BMHalfHeight TitleRegion)
         (SETQ IconTitle (CONCAT "NC: " (NC.RetrieveTitle Card)))
         [COND
            ((NOT Icon)
             (WINDOWPROP W 'ICON (SETQ Icon (TITLEDICONW NC.ShrunkenGraphIconTemplate IconTitle 
                                                   TEDIT.ICON.FONT (POSITIONP (WINDOWPROP
                                                                               W
                                                                               'SHRUNKENWINPOS))
                                                   T]
         (COND
            ((NOT (EQUAL OldIconTitle IconTitle))
             (WINDOWPROP W 'GRAPH.ICON.TITLE IconTitle)
             (ICONTITLE IconTitle TitleRegion NIL Icon])
)
(PUTPROPS RHTPATCH303 COPYRIGHT ("Xerox Corporation" 1988))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (2758 3854 (NC.SketchCardShrinkFn 2768 . 3852)) (3894 5310 (NC.GraphCardShrinkFn 3904 . 
5308)))))
STOP