(FILECREATED "17-Feb-86 19:40:19" {QV}<NOTECARDS>1.3K>FGHPATCH022.;2 9620   

      changes to:  (VARS FGHPATCH022COMS)
		   (FNS NC.MakeCardTypesList NC.AddTextCard NC.AddFileBoxCard NC.AddGraphCard)

      previous date: "17-Feb-86 19:33:09" {QV}<NOTECARDS>1.3K>FGHPATCH022.;1)


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

(PRETTYCOMPRINT FGHPATCH022COMS)

(RPAQQ FGHPATCH022COMS ((* * Patches to new types mech)
			  (* * redefined from NCTYPESMECH)
			  (MACROS NC.ApplySupersFn)
			  (FNS NC.MakeCardTypesList)
			  (* * New for NCTYPESMECH)
			  (BITMAPS NC.TypelessIcon)
			  (* * redefined from NCTEXTCARD)
			  (FNS NC.AddTextCard)
			  (* * new for NCTEXTCARD)
			  (BITMAPS NC.TextCardIcon)
			  (* * redefined from NCFILEBOXCARD)
			  (FNS NC.AddFileBoxCard NC.MakeFileBox)
			  (* * new for NCFILEBOXCARD)
			  (BITMAPS NC.FileBoxIcon)
			  (* * redefined from NCGRAPHCARD)
			  (FNS NC.AddGraphCard)
			  (* * new for NCGRAPHCARD)
			  (BITMAPS NC.GraphCardIcon)))
(* * Patches to new types mech)

(* * redefined from NCTYPESMECH)

(DECLARE: EVAL@COMPILE 
(PUTPROPS NC.ApplySupersFn MACRO (Args (BQUOTE (LET ((SuperType (fetch (Card SuperType)
								       of Card)))
						    (APPLY* (NC.GetCardTypeField , (CAR Args)
										 SuperType)
							    ,@
							    (CDR Args))))))
)
(DEFINEQ

(NC.MakeCardTypesList
  (LAMBDA NIL                                                (* fgh: "17-Feb-86 19:38")

          (* * Make initial set of card types.)



          (* * fgh 1/31/86 Updated to handle hash table for card types.)



          (* * fgh 2/17/86 Added typless attached bit map to NoteCards card type.)


    (SETQ NC.CardTypes (OR (HARRAYP NC.CardTypes)
			       (HASHARRAY 50)))
    (PUTHASH (QUOTE NoteCard)
	       (create NoteCardType
			 TypeName ←(QUOTE NoteCard)
			 SuperType ← NIL
			 CopyFn ←(FUNCTION (LAMBDA (Card ToStream FromStream Length)
                                                             (* Copy a card's substance using copybytes.)
			     (LET* ((FromStartPtr (GETFILEPTR FromStream))
				    (FromEndPtr (PLUS Length FromStartPtr)))
			           (COPYBYTES FromStream ToStream FromStartPtr FromEndPtr)
			       T)))
			 CollectLinksFn ←(FUNCTION NILL)
			 LinkDisplayMode ←(create LINKDISPLAYMODE
						    ATTACHBITMAPFLG ← T)
			 DefaultWidth ← 100
			 DefaultHeight ← 100
			 LinkIconAttachedBitMap ← NC.TypelessIcon)
	       NC.CardTypes)
    (SETQ NC.NoteCardTypeMenu)))
)
(* * New for NCTYPESMECH)


(RPAQ NC.TypelessIcon (READBITMAP))
(7 18
"ON@@"
"ON@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"LF@@"
"ON@@")
(* * redefined from NCTEXTCARD)

(DEFINEQ

(NC.AddTextCard
  (LAMBDA NIL                                                (* fgh: "17-Feb-86 19:39")

          (* * fgh 2/17/86 Added attached bit map field.)


    (NC.AddCardType (QUOTE Text)
		      (QUOTE NoteCard)
		      (BQUOTE ((MakeFn , (FUNCTION NC.MakeTEditCard))
				 (EditFn , (FUNCTION NC.BringUpTEditCard))
				 (QuitFn , (FUNCTION NC.TEditCloseFn))
				 (GetFn , (FUNCTION NC.GetTextSubstance))
				 (PutFn , (FUNCTION NC.PutTextSubstance))
				 (CopyFn , (FUNCTION NC.TextCopySubstance))
				 (MarkDirtyFn , (FUNCTION NC.MarkTextDirty))
				 (DirtyPFn , (FUNCTION NC.TextDirtyP))
				 (CollectLinksFn , (FUNCTION NC.CollectReferencesInText))
				 (DeleteLinksFn , (FUNCTION NC.DelReferencesToCardFromText))
				 (UpdateLinkIconsFn , (FUNCTION NC.UpdateLinkImagesInText))
				 (InsertLinkFn , (FUNCTION NC.InsertLinkInTextWindow))
				 (TranslateWindowPositionFn , (FUNCTION 
							NC.TranslateWindowPositionToTEditPosition))))
		      (BQUOTE ((LinkDisplayMode Title)
				 (DisplayedInMenuFlg T)
				 (DefaultWidth 300)
				 (DefaultHeight 200)
				 (LinkAnchorModesSupported T)
				 (LinkIconAttachedBitMap , NC.TextCardIcon))))))
)
(* * new for NCTEXTCARD)


(RPAQ NC.TextCardIcon (READBITMAP))
(21 18
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"H@@@@H@@"
"OOOOOH@@")
(* * redefined from NCFILEBOXCARD)

(DEFINEQ

(NC.AddFileBoxCard
  (LAMBDA NIL                                                (* fgh: "17-Feb-86 19:39")

          (* * fgh 2/17/86 Added attached bitmap field.)


    (NC.AddCardType (QUOTE FileBox)
		      (QUOTE Text)
		      (BQUOTE ((MakeFn , (FUNCTION NC.MakeFileBox))))
		      (BQUOTE ((LinkDisplayMode Title)
				 (DefaultHeight 200)
				 (DefaultWidth 335)
				 (DisplayedInMenuFlg , T)
				 (LinkIconAttachedBitMap , NC.FileBoxIcon))))))

(NC.MakeFileBox
  (LAMBDA (Card Title DontDisplay)                           (* fgh: " 6-Feb-86 22:36")
                                                             (* Make up a blank contents card, hook it to the user 
							     specified parent contents cards, and display it.)

          (* * rht 12/2/84: In DontDisplay case, changed to return ID rather than TextStream.)



          (* * rht 12/8/84: Massive shaving. Took out code to force filing now (at creation time))



          (* * rht 9/11/85: Took out insertion of spacer when no markers.)



          (* * fgh 11/13/85 Updated to handle Card object.)



          (* * fgh 2/6/86 Chaged calls to NC.FetchDefaultHeight & NC.FetchDefaultWidth)



          (* * fgh 2/6/86 Removed bug where NC.ClearMsg was deleteing card immediately.)


    (LET (Window TextStream (Spacer (CONCAT (CHARACTER 13)
					      (CHARACTER 13))))
         (SETQ TextStream (OPENTEXTSTREAM ""))
         (COND
	   (NC.MarkersInFileBoxesFlg (TEDIT.INSERT.OBJECT (NC.MakePlaceMarker 
									     NC.SubBoxMarkerLabel)
							    TextStream 1)
				     (TEDIT.INSERT TextStream Spacer 2)
				     (TEDIT.INSERT.OBJECT (NC.MakePlaceMarker 
									  NC.FiledCardMarkerLabel)
							    TextStream 4)
				     (TEDIT.INSERT TextStream Spacer 5)))
         (NC.SetSubstance Card TextStream)
         (NC.SetRegion Card (CREATEREGION 0 0 (NC.FetchDefaultWidth Card)
					      (NC.FetchDefaultHeight Card)))
         (COND
	   (DontDisplay Card)
	   (T (SETQ Window (CREATEW (NC.DetermineDisplayRegion Card NIL)
					(NC.SetTitle Card (OR Title "Untitled"))))
	      (WINDOWPROP Window (QUOTE NoteCardsLeftButtonMenu)
			    (NC.MakeTEditLeftMenu (NC.RetrieveType Card)))
	      (WINDOWPROP Window (QUOTE NoteCardsMiddleButtonMenu)
			    (NC.MakeTEditMiddleMenu))      (* Display the card)
	      (WINDOWADDPROP Window (QUOTE SHRINKFN)
			       (FUNCTION NC.TextCardShrinkFn))
	      (TEDIT TextStream Window NIL (LIST (QUOTE FONT)
						     NC.DefaultFont
						     (QUOTE TITLEMENUFN)
						     (FUNCTION NC.TEditMenuFn)))
	      (until (WINDOWPROP Window (QUOTE TEXTSTREAM)) do (BLOCK))
	      (NC.ActivateCard Card)
	      (COND
		(NC.AlphabetizedFileBoxChildrenFlg (NCP.CardProp Card (QUOTE OrderingFn)
								   (FUNCTION NC.IDAlphOrder))))
	      (COND
		((GETPROMPTWINDOW Window NIL NIL T)
		  (PROG1 (DISMISS 1000)
			   (NC.ClearMsg (GETPROMPTWINDOW Window NIL NIL T)
					  T))))
	      Window)))))
)
(* * new for NCFILEBOXCARD)


(RPAQ NC.FileBoxIcon (READBITMAP))
(21 18
"OOOOOH@@"
"OOOOOH@@"
"OOOOOH@@"
"H@@@@H@@"
"H@@@@H@@"
"H@B@@H@@"
"H@@@@H@@"
"OOOOOH@@"
"H@@@@H@@"
"H@@@@H@@"
"H@B@@H@@"
"H@@@@H@@"
"OOOOOH@@"
"H@@@@H@@"
"H@@@@H@@"
"H@B@@H@@"
"H@@@@H@@"
"OOOOOH@@")
(* * redefined from NCGRAPHCARD)

(DEFINEQ

(NC.AddGraphCard
  (LAMBDA NIL                                                (* fgh: "17-Feb-86 19:39")

          (* * fgh 11/14/85: Updated to conform to merge of substance and card types.)



          (* * fgh 2/17/86 Added attached bitmap field.)


    (NC.AddCardType (QUOTE Graph)
		      (QUOTE NoteCard)
		      (BQUOTE ((MakeFn , (FUNCTION NC.MakeGraphCard))
				 (EditFn , (FUNCTION NC.BringUpGraphCard))
				 (QuitFn , (FUNCTION NC.GraphCardCloseFn))
				 (GetFn , (FUNCTION NC.GetGraphSubstance))
				 (PutFn , (FUNCTION NC.PutGraphSubstance))
				 (CopyFn , (FUNCTION NC.GraphCopySubstance))
				 (MarkDirtyFn , (FUNCTION NC.MarkGraphDirty))
				 (DirtyPFn , (FUNCTION NC.GraphDirtyP))
				 (CollectLinksFn , (FUNCTION NC.CollectReferencesInGraph))
				 (DeleteLinksFn , (FUNCTION NC.DelReferencesToCardFromGraph))
				 (UpdateLinkIconsFn , (FUNCTION NC.UpdateLinkImagesInGraph))
				 (InsertLinkFn , (FUNCTION NC.InsertLinkInGraph))
				 (TranslateWindowPositionFn , (FUNCTION 
							NC.TranslateWindowPositionToGraphPosition))))
		      (BQUOTE ((LinkDisplayMode Title)
				 (DisplayedInMenuFlg , T)
				 (DefaultWidth 300)
				 (DefaultHeight 200)
				 (LinkAnchorModesSupported T)
				 (LinkIconAttachedBitMap , NC.GraphCardIcon))))))
)
(* * new for NCGRAPHCARD)


(RPAQ NC.GraphCardIcon (READBITMAP))
(21 18
"OOOOOH@@"
"H@@@@H@@"
"H@@@@H@@"
"H@N@@H@@"
"H@J@@H@@"
"HAJ@@H@@"
"HBO@@H@@"
"HD@KHH@@"
"KH@FHH@@"
"JH@BHH@@"
"JH@CHH@@"
"KL@@@H@@"
"HBN@@H@@"
"HAJ@@H@@"
"H@J@@H@@"
"H@N@@H@@"
"H@@@@H@@"
"OOOOOH@@")
(PUTPROPS FGHPATCH022 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1345 2568 (NC.MakeCardTypesList 1355 . 2566)) (2809 4058 (NC.AddTextCard 2819 . 4056)) 
(4374 7592 (NC.AddFileBoxCard 4384 . 4871) (NC.MakeFileBox 4873 . 7590)) (7908 9262 (NC.AddGraphCard 
7918 . 9260)))))
STOP