(FILECREATED "14-Jul-86 20:21:33" {QV}<NOTECARDS>1.3K>RHTPATCH071.;3 4429   

      changes to:  (FNS NC.ShowInfo)
		   (VARS RHTPATCH071COMS)

      previous date: "14-Jul-86 11:47:38" {QV}<NOTECARDS>1.3K>RHTPATCH071.;1)


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

(PRETTYCOMPRINT RHTPATCH071COMS)

(RPAQQ RHTPATCH071COMS ((* * Change to NCCARDS)
			  (FNS NC.ShowInfo)
			  (* * Changes to NCPARAMETERS)
			  (GLOBALVARS NC.IncludeCardObjectInShowInfo)
			  (INITVARS (NC.IncludeCardObjectInShowInfo T))
			  (* * Add IncludeCardObjectInShowInfo to the VARS for NC.NoteCardsParameters 
			     right after ShowNoteFileOnCards.)
			  (* * Add the two atoms IncludeCardObjectInShowInfo and 
			     NC.IncludeCardObjectInShowInfo in order after the atom 
			     NC.ShowNoteFileOnCards in the SETPROPLIST of NC.NoteCardsParameters.)))
(* * Change to NCCARDS)

(DEFINEQ

(NC.ShowInfo
  (LAMBDA (Window)                                           (* rht: "14-Jul-86 20:20")

          (* * Bring up an inspector on certain attribute/value pairs of this card. The default ones are card part dates and 
	  Updates.)



          (* * Need a hook so that users can provide other attribute/value pairs for given card types.)



          (* * kirk: 1May86 added NC.AttachNoteFileName)



          (* * fgh 6/13/86 Now places and sizes window with less visual nnoise.)



          (* * fgh&rht 7/4/86: Now also print card type.)



          (* * rht 7/14/86: Now includes card object if global param is set. No longer includes UID.)


    (LET ((Card (NC.CoerceToCard Window))
	  (Attributes (BQUOTE (Type ItemDate TitleDate LinksDate PropsDate Updates ,@(AND
					NC.IncludeCardObjectInShowInfo
					(QUOTE (CardObject))))))
	  Region AttributesAndValues InfoWindow)
         (NC.AttachNoteFileName Window)
         (SETQ Region (WINDOWREGION Window))
         (for Win in (ATTACHEDWINDOWS Window) when (WINDOWPROP Win (QUOTE ShowInfo))
	    do (CLOSEW Win))                             (* close any previous info window)
         (SETQ AttributesAndValues (BQUOTE (Type , (NC.FetchType Card)
						     ItemDate , (NC.FetchItemDate Card)
						     TitleDate , (NC.FetchTitleDate Card)
						     LinksDate , (NC.FetchLinksDate Card)
						     PropsDate , (NC.FetchPropListDate Card)
						     Updates , (LISTGET (NC.FetchPropList Card)
									  (QUOTE Updates))
						     ,@(AND NC.IncludeCardObjectInShowInfo
							      (BQUOTE (CardObject , Card))))))
         (SETQ InfoWindow (INSPECTW.CREATE AttributesAndValues Attributes (FUNCTION LISTGET)
					       NIL "Can't set values of these attributes." NIL NIL 
					       "Card attributes"
					       NIL
					       (CREATEW (CREATEREGION (fetch (POSITION XCOORD)
									     of 
									     NC.OffScreenPosition)
									  (fetch (POSITION YCOORD)
									     of 
									     NC.OffScreenPosition)
									  (fetch (REGION WIDTH)
									     of Region)
									  50)
							  NIL NIL)))
         (SHAPEW InfoWindow (create REGION
				 using (WINDOWPROP InfoWindow (QUOTE REGION))
					 HEIGHT ←(HEIGHTIFWINDOW (fetch (REGION HEIGHT)
								      of (WINDOWPROP
									     InfoWindow
									     (QUOTE EXTENT)))
								   T)))
         (ATTACHWINDOW InfoWindow Window (QUOTE TOP)
			 (QUOTE JUSTIFY)
			 (QUOTE LOCALCLOSE))
         (NC.MoveWindowOntoScreen Window)
         (REDISPLAYW InfoWindow)
         (WINDOWPROP InfoWindow (QUOTE ShowInfo)
		       (QUOTE Showing))
         (WINDOWADDPROP InfoWindow (QUOTE CLOSEFN)
			  (FUNCTION FREEATTACHEDWINDOW)
			  T))))
)
(* * Changes to NCPARAMETERS)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.IncludeCardObjectInShowInfo)
)

(RPAQ? NC.IncludeCardObjectInShowInfo T)
(* * Add IncludeCardObjectInShowInfo to the VARS for NC.NoteCardsParameters right after 
ShowNoteFileOnCards.)

(* * Add the two atoms IncludeCardObjectInShowInfo and NC.IncludeCardObjectInShowInfo in order
 after the atom NC.ShowNoteFileOnCards in the SETPROPLIST of NC.NoteCardsParameters.)

(PUTPROPS RHTPATCH071 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (900 3880 (NC.ShowInfo 910 . 3878)))))
STOP