(FILECREATED "16-Feb-85 02:11:36" {PHYLUM}<NOTECARDS>RELEASE1.2>FGHPATCH004.;9 23342  

      changes to:  (VARS FGHPATCH004COMS)
		   (FNS NC.InsertLinkFn NC.TranslateWindowPositionFn NC.AddSubstanceType 
			NC.AddCardType NC.AddGraphSubstance NC.AddTextSubstance)

      previous date: "16-Feb-85 00:05:40" {PHYLUM}<NOTECARDS>RELEASE1.2>FGHPATCH004.;7)


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

(PRETTYCOMPRINT FGHPATCH004COMS)

(RPAQQ FGHPATCH004COMS ((* * all these support new NoteCardType and SubstanceType records and the 
			   ASSOC calling parameters stuff for AddcardType and AddSubstanceType)
			(* * New fns to support No-Link cards/substances Should go in NCLINKS)
			(FNS NC.LinksSupportedP NC.LinkAnchorModesFromType)
			(* * New FNS for the NCTYPESMECH)
			(FNS NC.InsertLinkFn NC.TranslateWindowPositionFn)
			(* * Redefined from NCTYPESMECH)
			(RECORDS SubstanceType NoteCardType)
			(FNS NC.AddSubstanceType NC.AddCardType NC.MakeCardTypesList)
			(* * REDEFINED from various NCXXXCARD and NCXXXXSUBSTANCE files)
			(FNS NC.AddSketchSubstance NC.AddGraphSubstance NC.AddTextSubstance)
			(FNS NC.AddLinkIndexCard NC.AddStructEditCard NC.AddDocumentCard 
			     NC.AddSearchCard NC.AddBrowserCard NC.AddFileBoxCard NC.AddGraphCard 
			     NC.AddSketchCard NC.AddTextCard)
			(* * REDEFINED from NCPROGINT)
			(FNS NCP.CreateSubstanceType NCP.CreateCardType)
			(* * JUNK , just makes these changes work when loadedon top of old code)
			(P (NC.MakeCardTypesList)
			   (NC.AddTextSubstance)
			   (NC.AddGraphSubstance)
			   (NC.AddSketchSubstance)
			   (NC.AddTextCard)
			   (NC.AddSketchCard)
			   (NC.AddGraphCard)
			   (NC.AddFileBoxCard)
			   (NC.AddBrowserCard)
			   (NC.AddSearchCard)
			   (NC.AddDocumentCard)
			   (NC.AddStructEditCard)
			   (NC.AddLinkIndexCard))))
(* * all these support new NoteCardType and SubstanceType records and the ASSOC calling 
parameters stuff for AddcardType and AddSubstanceType)

(* * New fns to support No-Link cards/substances Should go in NCLINKS)

(DEFINEQ

(NC.LinksSupportedP
  (LAMBDA (ID AnchorModesList)                               (* fgh: " 8-Feb-85 21:00")

          (* * Are all of the anchor modes supporterd by the card ID)


    (PROG ((SupportedAnchorModes (NC.LinkAnchorModesFromType (NC.FetchType ID))))
          (COND
	    ((EQ SupportedAnchorModes T)
	      (RETURN T))
	    ((NULL SupportedAnchorModes)
	      (RETURN NIL))
	    (T (RETURN (for AnchorMode in AnchorModesList always (FMEMB AnchorMode 
									SupportedAnchorModes))))))))

(NC.LinkAnchorModesFromType
  (LAMBDA (NoteCardType)                                     (* fgh: " 8-Feb-85 18:59")

          (* * Return a list of the link anchor modes supported by cards of type NoteCardType)


    (PROG ((Result (NC.Inherit NC.LinkAnchorModesFromType CardLinkAnchorModesSupported 
			       SubstanceLinkAnchorModesSupported NoteCardType)))
          (COND
	    ((EQ Result T)
	      (RETURN T))
	    (T (RETURN (MKLIST Result)))))))
)
(* * New FNS for the NCTYPESMECH)

(DEFINEQ

(NC.InsertLinkFn
  (LAMBDA (NoteCardType)                                     (* fgh: "16-Feb-85 00:54")

          (* * Find the InsertLinkFn for NoteCardType)


    (NC.Inherit NC.InsertLinkFn InsertLinkInCardFn InsertLinkInSubstanceFn NoteCardType)))

(NC.TranslateWindowPositionFn
  (LAMBDA (NoteCardType)                                     (* fgh: "16-Feb-85 00:59")

          (* * Find the TrasnalteWindowPosition for NoteCardType)


    (NC.Inherit NC.TranslateWindowPositionFn TranslateWindowPositionToCardPositionFn 
		TranslateWindowPositionToSubstancePositionFn NoteCardType)))
)
(* * Redefined from NCTYPESMECH)

[DECLARE: EVAL@COMPILE 

(RECORD SubstanceType (SubstanceName CreateSubstanceFn EditSubstanceFn QuitSubstanceFn GetSubstanceFn 
				     PutSubstanceFn CopySubstanceFn MarkSubstanceDirtyFn 
				     SubstanceDirtyPFn CollectLinksInSubstanceFn 
				     DeleteLinksInSubstanceFn UpdateLinkIconsInSubstanceFn 
				     InsertLinkInSubstanceFn 
				     TranslateWindowPositionToSubstancePositionFn 
				     SubstanceDefaultWidth SubstanceDefaultHeight 
				     SubstanceLinkAnchorModesSupported))

(RECORD NoteCardType (TypeName SuperType SubstanceType MakeCardFn EditCardFn QuitCardFn GetCardFn 
			       PutCardFn CopyCardFn MarkCardDirtyFn CardDirtyPFn CollectLinksInCardFn 
			       DeleteLinksInCardFn UpdateLinkIconsInCardFn InsertLinkInCardFn 
			       TranslateWindowPositionToCardPositionFn LinkDisplayMode 
			       CardDefaultWidth CardDefaultHeight CardLinkAnchorModesSupported 
			       CardDisplayedInMenuFlg))
]
(DEFINEQ

(NC.AddSubstanceType
  (LAMBDA (SubstanceName FnsAssocList VarsAssocList)         (* fgh: "16-Feb-85 01:35")

          (* * Add a substance ttype to the lists of substance types.)


    (PROG (NewType)
          (COND
	    ((NULL SubstanceName)
	      (NC.ReportError "NC.AddSubstanceType" "Illegal substance type name: NIL")))

          (* * Remove old instance of SubstanceType)


          (for SubstanceType in NC.SubstanceTypes when (EQ (fetch (SubstanceType SubstanceName)
							      of SubstanceType)
							   SubstanceName)
	     do (SETQ NC.SubstanceTypes (REMOVE SubstanceType NC.SubstanceTypes)))

          (* * Add new SubstanceType to NC.SubstanceTypes list)


          (SETQ NC.SubstanceTypes (CONS (SETQ NewType (create SubstanceType
							      SubstanceName ← SubstanceName
							      CreateSubstanceFn ←(CADR
								(ASSOC (QUOTE CreateSubstanceFn)
								       FnsAssocList))
							      EditSubstanceFn ←(CADR
								(ASSOC (QUOTE EditSubstanceFn)
								       FnsAssocList))
							      QuitSubstanceFn ←(CADR
								(ASSOC (QUOTE QuitSubstanceFn)
								       FnsAssocList))
							      GetSubstanceFn ←(CADR
								(ASSOC (QUOTE GetSubstanceFn)
								       FnsAssocList))
							      PutSubstanceFn ←(CADR
								(ASSOC (QUOTE PutSubstanceFn)
								       FnsAssocList))
							      CopySubstanceFn ←(CADR
								(ASSOC (QUOTE CopySubstanceFn)
								       FnsAssocList))
							      MarkSubstanceDirtyFn ←(CADR
								(ASSOC (QUOTE MarkSubstanceDirtyFn)
								       FnsAssocList))
							      SubstanceDirtyPFn ←(CADR
								(ASSOC (QUOTE SubstanceDirtyPFn)
								       FnsAssocList))
							      CollectLinksInSubstanceFn ←(CADR
								(ASSOC (QUOTE 
									CollectLinksInSubstanceFn)
								       FnsAssocList))
							      DeleteLinksInSubstanceFn ←(CADR
								(ASSOC (QUOTE 
									 DeleteLinksInSubstanceFn)
								       FnsAssocList))
							      UpdateLinkIconsInSubstanceFn ←(CADR
								(ASSOC (QUOTE 
								     UpdateLinkIconsInSubstanceFn)
								       FnsAssocList))
							      InsertLinkInSubstanceFn ←(CADR
								(ASSOC (QUOTE InsertLinkInSubstanceFn)
								       FnsAssocList))
							      
						     TranslateWindowPositionToSubstancePositionFn ←(
								CADR (ASSOC (QUOTE 
						     TranslateWindowPositionToSubstancePositionFn)
									    FnsAssocList))
							      SubstanceDefaultWidth ←(CADR
								(ASSOC (QUOTE SubstanceDefaultWidth)
								       VarsAssocList))
							      SubstanceDefaultHeight ←(CADR
								(ASSOC (QUOTE SubstanceDefaultHeight)
								       VarsAssocList))
							      SubstanceLinkAnchorModesSupported ←(
								CADR (ASSOC (QUOTE 
								SubstanceLinkAnchorModesSupported)
									    VarsAssocList))))
					NC.SubstanceTypes))
          (RETURN NewType))))

(NC.AddCardType
  (LAMBDA (TypeName SuperType SubstanceType FnsAssocList VarsAssocList)
                                                             (* fgh: "16-Feb-85 01:36")

          (* * Create a new note acrd type and link it into the card type heirarchy.)


    (PROG (NewType)
          (COND
	    ((NULL TypeName)
	      (NC.ReportError "NC.AddCardType" "Illegal type name: NIL"))
	    ((for Type in NC.CardTypes never (EQ (fetch (NoteCardType TypeName) of Type)
						 SuperType))
	      (NC.ReportError "NC.AddCardType" (CONCAT "Unknown type in super type field:  " 
						       SuperType)))
	    ((for Substance in NC.SubstanceTypes never (EQ SubstanceType (fetch (SubstanceType 
										    SubstanceName)
									    of Substance)))
	      (NC.ReportError "NC.AddCardType" (CONCAT "Unknown substance type field:  " 
						       SubstanceType))))

          (* * Remove old instance of this NoteCardType)


          (for CardType in NC.CardTypes when (EQ (fetch (NoteCardType TypeName) of CardType)
						 TypeName)
	     do (SETQ NC.CardTypes (REMOVE CardType NC.CardTypes)))

          (* * Create new NoteCardType)


          (SETQ NC.CardTypes
	    (NCONC1 NC.CardTypes
		    (SETQ NewType (create NoteCardType
					  TypeName ← TypeName
					  SuperType ← SuperType
					  SubstanceType ← SubstanceType
					  MakeCardFn ←(CADR (ASSOC (QUOTE MakeCardFn)
								   FnsAssocList))
					  EditCardFn ←(CADR (ASSOC (QUOTE EditCardFn)
								   FnsAssocList))
					  QuitCardFn ←(CADR (ASSOC (QUOTE QuitCardFn)
								   FnsAssocList))
					  GetCardFn ←(CADR (ASSOC (QUOTE GetCardFn)
								  FnsAssocList))
					  PutCardFn ←(CADR (ASSOC (QUOTE PutCardFn)
								  FnsAssocList))
					  CopyCardFn ←(CADR (ASSOC (QUOTE CopyCardFn)
								   FnsAssocList))
					  MarkCardDirtyFn ←(CADR (ASSOC (QUOTE MarkCardDirtyFn)
									FnsAssocList))
					  CardDirtyPFn ←(CADR (ASSOC (QUOTE CardDirtyPFn)
								     FnsAssocList))
					  CollectLinksInCardFn ←(CADR (ASSOC (QUOTE 
									     CollectLinksInCardFn)
									     FnsAssocList))
					  DeleteLinksInCardFn ←(CADR (ASSOC (QUOTE 
									      DeleteLinksInCardFn)
									    FnsAssocList))
					  UpdateLinkIconsInCardFn ←(CADR (ASSOC (QUOTE 
									  UpdateLinkIconsInCardFn)
										FnsAssocList))
					  InsertLinkInCardFn ←(CADR (ASSOC (QUOTE InsertLinkInCardFn)
									   FnsAssocList))
					  TranslateWindowPositionToCardPositionFn ←(CADR
					    (ASSOC (QUOTE TranslateWindowPositionToCardPositionFn)
						   FnsAssocList))
					  LinkDisplayMode ←(CADR (ASSOC (QUOTE LinkDisplayMode)
									VarsAssocList))
					  CardDefaultHeight ←(CADR (ASSOC (QUOTE DefaultHeight)
									  VarsAssocList))
					  CardDefaultWidth ←(CADR (ASSOC (QUOTE DefaultWidth)
									 VarsAssocList))
					  CardLinkAnchorModesSupported ←(CADR (ASSOC (QUOTE 
								     CardLinkAnchorModesSupported)
										     VarsAssocList))
					  CardDisplayedInMenuFlg ←(CADR (ASSOC (QUOTE 
									   CardDisplayedInMenuFlg)
									       VarsAssocList))))))
          (SETQ NC.NoteCardTypeMenu)
          (RETURN NewType))))

(NC.MakeCardTypesList
  (LAMBDA NIL                                                (* fgh: "12-Feb-85 23:18")

          (* * Make initial set of card types.)


    (SETQ NC.CardTypes (LIST (create NoteCardType
				     TypeName ←(QUOTE NoteCard)
				     SuperType ← NIL
				     SubstanceType ← NIL
				     MakeCardFn ← NIL
				     EditCardFn ← NIL
				     QuitCardFn ← NIL
				     GetCardFn ← NIL
				     PutCardFn ← NIL
				     CopyCardFn ← NIL
				     MarkCardDirtyFn ← NIL
				     CardDirtyPFn ← NIL
				     CollectLinksInCardFn ← NIL
				     DeleteLinksInCardFn ← NIL
				     UpdateLinkIconsInCardFn ← NIL
				     LinkDisplayMode ←(QUOTE Icon)
				     CardDefaultWidth ← NIL
				     CardDefaultHeight ← NIL)))
    (SETQ NC.NoteCardTypeMenu)))
)
(* * REDEFINED from various NCXXXCARD and NCXXXXSUBSTANCE files)

(DEFINEQ

(NC.AddSketchSubstance
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 22:58")
    (NC.AddSubstanceType (QUOTE SKETCH)
			 (BQUOTE ((CreateSubstanceFn , (FUNCTION (LAMBDA NIL
							 (create SKETCH))))
				  (EditSubstanceFn , (FUNCTION NC.BringUpSketchCard))
				  (QuitSubstanceFn , (FUNCTION NC.SketchCardCloseFn))
				  (GetSubstanceFn , (FUNCTION (LAMBDA (Stream ID Region)
						      (PROG ((Value (NC.GetSketchSubstance Stream)))
							    (NC.SetScale ID (CADR Value))
							    (NC.SetRegionViewed ID (CADDR Value))
							    (RETURN (CAR Value))))))
				  (PutSubstanceFn , (FUNCTION NC.PutSketchSubstance))
				  (CopySubstanceFn , (FUNCTION NC.SketchCopySubstance))
				  (MarkSubstanceDirtyFn , (FUNCTION NC.MarkSketchDirty))
				  (SubstanceDirtyPFn , (FUNCTION NC.SketchDirtyP))
				  (CollectLinksInSubstanceFn , (FUNCTION NC.CollectReferencesInSketch)
							     )
				  (DeleteLinksInSubstanceFn , (FUNCTION 
							      NC.DelReferencesToCardFromSketch))
				  (UpdateLinkIconsInSubstanceFn , (FUNCTION 
								  NC.UpdateLinkImagesInSketch))
				  (InsertLinkInSubstanceFn , (FUNCTION NC.InsertLinkInSketch))
				  (TranslateWindowPositionToSubstancePositionFn
				    ,
				    (FUNCTION NC.TranslateWindowPositionToSketchPosition))))
			 (QUOTE ((SubstanceDefaultWidth 400)
				  (SubstanceDefaultHeight 350)
				  (SubstanceLinkAnchorModesSupported T))))))

(NC.AddGraphSubstance
  (LAMBDA NIL                                                (* fgh: "16-Feb-85 00:02")
    (NC.AddSubstanceType (QUOTE GRAPH)
			 (BQUOTE ((CreateSubstanceFn (LAMBDA NIL
						       (create GRAPH)))
				  (EditSubstanceFn , (FUNCTION NC.BringUpGraphCard))
				  (QuitSubstanceFn , (FUNCTION NC.GraphCardCloseFn))
				  (GetSubstanceFn , (FUNCTION NC.GetGraphSubstance))
				  (PutSubstanceFn , (FUNCTION NC.PutGraphSubstance))
				  (CopySubstanceFn , (FUNCTION NC.GraphCopySubstance))
				  (MarkSubstanceDirtyFn , (FUNCTION NC.MarkGraphDirty))
				  (SubstanceDirtyPFn , (FUNCTION NC.GraphDirtyP))
				  (CollectLinksInSubstanceFn , (FUNCTION NC.CollectReferencesInGraph))
				  (DeleteLinksInSubstanceFn , (FUNCTION 
							      NC.DelReferencesToCardFromGraph))
				  (UpdateLinkIconsInSubstanceFn , (FUNCTION 
								  NC.UpdateLinkImagesInGraph))
				  (InsertLinkInSubstanceFn , (FUNCTION NC.InsertLinkInGraph))
				  (TranslateWindowPositionToSubstancePositionFn
				    ,
				    (FUNCTION NC.TranslateWindowPositionToGraphPosition))))
			 (QUOTE ((SubstanceDefaultWidth 300)
				  (SubstanceDefaultHeight 200)
				  (SubstanceLinkAnchorModesSupported T))))))

(NC.AddTextSubstance
  (LAMBDA NIL                                                (* fgh: "16-Feb-85 00:02")
    (NC.AddSubstanceType (QUOTE TEXT)
			 (BQUOTE ((CreateSubstanceFn , (FUNCTION OPENTEXTSTREAM))
				  (EditSubstanceFn , (FUNCTION NC.BringUpTEditCard))
				  (QuitSubstanceFn , (FUNCTION NC.TEditCloseFn))
				  (GetSubstanceFn , (FUNCTION NC.GetTextSubstance))
				  (PutSubstanceFn , (FUNCTION NC.PutTextSubstance))
				  (CopySubstanceFn , (FUNCTION NC.TextCopySubstance))
				  (MarkSubstanceDirtyFn , (FUNCTION NC.MarkTextDirty))
				  (SubstanceDirtyPFn , (FUNCTION NC.TextDirtyP))
				  (CollectLinksInSubstanceFn , (FUNCTION NC.CollectReferencesInText))
				  (DeleteLinksInSubstanceFn , (FUNCTION 
							      NC.DelReferencesToCardFromText))
				  (UpdateLinkIconsInSubstanceFn , (FUNCTION NC.UpdateLinkImagesInText)
								)
				  (InsertLinkInSubstanceFn , (FUNCTION NC.InsertLinkInTextWindow))
				  (TranslateWindowPositionToSubstancePositionFn
				    ,
				    (FUNCTION NC.TranslateWindowPositionToTEditPosition))))
			 (QUOTE ((SubstanceDefaultWidth 300)
				  (SubstanceDefaultHeight 200)
				  (SubstanceLinkAnchorModesSupported T))))))
)
(DEFINEQ

(NC.AddLinkIndexCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:09")
    (NC.AddCardType (QUOTE LinkIndex)
		    (QUOTE Text)
		    (QUOTE TEXT)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeLinkIndex))))
		    (BQUOTE ((LinkDisplayMode Title)
			     (CardDisplayedInMenuFlg , T))))))

(NC.AddStructEditCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:12")
    (NC.AddCardType (QUOTE StructEdit)
		    (QUOTE Graph)
		    (QUOTE GRAPH)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeStructEditCard))))
		    (BQUOTE ((CardDisplayedInMenuFlg , T))))))

(NC.AddDocumentCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:13")
    (NC.AddCardType (QUOTE Document)
		    (QUOTE Text)
		    (QUOTE TEXT)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeDocument))))
		    (BQUOTE ((LinkDisplayMode Icon)
			     (CardDisplayedInMenuFlg , T))))))

(NC.AddSearchCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:14")
    (NC.AddCardType (QUOTE Search)
		    (QUOTE Text)
		    (QUOTE TEXT)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeSearchCard))))
		    (BQUOTE ((LinkDisplayMode Title)
			     (CardDisplayedInMenuFlg , T))))))

(NC.AddBrowserCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:16")
    (NC.AddCardType (QUOTE Browser)
		    (QUOTE Graph)
		    (QUOTE GRAPH)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeBrowserCard))
			     (EditCardFn , (FUNCTION NC.BringUpBrowserCard))))
		    (BQUOTE ((LinkDisplayMode Title)
			     (CardDefaultHeight 350)
			     (CardDefaultWidth 500)
			     (CardDisplayedInMenuFlg , T))))))

(NC.AddFileBoxCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:18")
    (NC.AddCardType (QUOTE FileBox)
		    (QUOTE Text)
		    (QUOTE TEXT)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeContentsCard))))
		    (BQUOTE ((LinkDisplayMode Title)
			     (CardDefaultHeight 200)
			     (CardDefaultWidth 335)
			     (CardDisplayedInMenuFlg , T))))))

(NC.AddGraphCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:18")
    (NC.AddCardType (QUOTE Graph)
		    (QUOTE NoteCard)
		    (QUOTE GRAPH)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeGraphCard))))
		    (BQUOTE ((LinkDisplayMode Title)
			     (CardDisplayedInMenuFlg , T))))))

(NC.AddSketchCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:19")
    (NC.AddCardType (QUOTE Sketch)
		    (QUOTE NoteCard)
		    (QUOTE SKETCH)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeSketchCard))))
		    (BQUOTE ((LinkDisplayMode Icon)
			     (CardDisplayedInMenuFlg , T))))))

(NC.AddTextCard
  (LAMBDA NIL                                                (* fgh: "15-Feb-85 13:20")
    (NC.AddCardType (QUOTE Text)
		    (QUOTE NoteCard)
		    (QUOTE TEXT)
		    (BQUOTE ((MakeCardFn , (FUNCTION NC.MakeTEditCard))))
		    (BQUOTE ((LinkDisplayMode Icon)
			     (CardDisplayedInMenuFlg , T))))))
)
(* * REDEFINED from NCPROGINT)

(DEFINEQ

(NCP.CreateSubstanceType
  (LAMBDA (SubstanceName CreateSubstanceFn EditSubstanceFn QuitSubstanceFn GetSubstanceFn 
			 PutSubstanceFn CopySubstanceFn MarkSubstanceDirtyFn SubstanceDirtyPFn 
			 CollectLinksInSubstanceFn DeleteLinksInSubstanceFn 
			 UpdateLinkIconsInSubstanceFn DefaultWidth DefaultHeight)
                                                             (* fgh: "14-Feb-85 21:44")

          (* * Create a new substance type. If already exists, then print message and overwrite.)


    (COND
      ((FMEMB SubstanceName (NCP.GetSubstancesTypes))
	(NCP.ReportWarning "Redefining substance type: " SubstanceName)))
    (NC.AddSubstanceType SubstanceName (BQUOTE ((CreateSubstanceFn , CreateSubstanceFn)
						(EditSubstanceFn , EditSubstanceFn)
						(QuitSubstanceFn , QuitSubstanceFn)
						(GetSubstanceFn , GetSubstanceFn)
						(PutSubstanceFn , PutSubstanceFn)
						(CopySubstanceFn , CopySubstanceFn)
						(MarkSubstanceDirtyFn , MarkSubstanceDirtyFn)
						(SubstanceDirtyPFn , SubstanceDirtyPFn)
						(CollectLinksInSubstanceFn , 
									CollectLinksInSubstanceFn)
						(DeleteLinksInSubstanceFn , DeleteLinksInSubstanceFn)
						(UpdateLinkIconsInSubstanceFn , 
								     UpdateLinkIconsInSubstanceFn)
						(InsertLinkInSubstanceFn , NIL)
						(TranslateWindowPositionToSubstancePositionFn , NIL)))
			 (BQUOTE ((SubstanceDefaultWidth , DefaultWidth)
				  (SubstanceDefaultHeight , DefaultHeight)
				  (SubstanceLinkAnchorModesSupported , T))))))

(NCP.CreateCardType
  (LAMBDA (TypeName SuperType SubstanceType MakeCardFn EditCardFn QuitCardFn GetCardFn PutCardFn 
		    CopyCardFn MarkCardDirtyFn CardDirtyPFn CollectLinksInCardFn DeleteLinksInCardFn 
		    UpdateLinkIconsInCardFn LinkDisplayMode DefaultWidth DefaultHeight)
                                                             (* fgh: "15-Feb-85 13:07")

          (* * Make a new card type. If there is already a card type by that name, then print message and overwrite.)


    (COND
      ((FMEMB TypeName (NCP.GetCardTypes))
	(NCP.ReportWarning "Redefining NoteCard type: " TypeName)))
    (NC.AddCardType TypeName SuperType SubstanceType (BQUOTE ((MakeCardFn , MakeCardFn)
							      (EditCardFn , EditCardFn)
							      (QuitCardFn , QuitCardFn)
							      (GetCardFn , GetCardFn)
							      (PutCardFn , PutCardFn)
							      (CopyCardFn , CopyCardFn)
							      (MarkCardDirtyFn , MarkCardDirtyFn)
							      (CardDirtyPFn , CardDirtyPFn)
							      (CollectLinksInCardFn , 
									     CollectLinksInCardFn)
							      (DeleteLinksInCardFn , 
									      DeleteLinksInCardFn)
							      (UpdateLinkIconsInCardFn , 
									  UpdateLinkIconsInCardFn)
							      (InsertLinkInCardFn , NIL)
							      (TranslateWindowPositionToCardPositionFn
								, NIL)))
		    (BQUOTE ((LinkDisplayMode , LinkDisplayMode)
			     (CardDefaultHeight , DefaultHeight)
			     (CardDefaultWidth , DefaultWidth)
			     (CardLinkAnchorModesSupported , NIL)
			     (CardDisplayedInMenuFlg , T))))
    TypeName))
)
(* * JUNK , just makes these changes work when loadedon top of old code)

(NC.MakeCardTypesList)
(NC.AddTextSubstance)
(NC.AddGraphSubstance)
(NC.AddSketchSubstance)
(NC.AddTextCard)
(NC.AddSketchCard)
(NC.AddGraphCard)
(NC.AddFileBoxCard)
(NC.AddBrowserCard)
(NC.AddSearchCard)
(NC.AddDocumentCard)
(NC.AddStructEditCard)
(NC.AddLinkIndexCard)
(PUTPROPS FGHPATCH004 COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2072 3141 (NC.LinksSupportedP 2082 . 2647) (NC.LinkAnchorModesFromType 2649 . 3139)) (
3182 3808 (NC.InsertLinkFn 3192 . 3457) (NC.TranslateWindowPositionFn 3459 . 3806)) (4788 12200 (
NC.AddSubstanceType 4798 . 7908) (NC.AddCardType 7910 . 11397) (NC.MakeCardTypesList 11399 . 12198)) (
12272 16334 (NC.AddSketchSubstance 12282 . 13812) (NC.AddGraphSubstance 13814 . 15084) (
NC.AddTextSubstance 15086 . 16332)) (16335 19755 (NC.AddLinkIndexCard 16345 . 16706) (
NC.AddStructEditCard 16708 . 17046) (NC.AddDocumentCard 17048 . 17405) (NC.AddSearchCard 17407 . 17763
) (NC.AddBrowserCard 17765 . 18249) (NC.AddFileBoxCard 18251 . 18674) (NC.AddGraphCard 18676 . 19034) 
(NC.AddSketchCard 19036 . 19397) (NC.AddTextCard 19399 . 19753)) (19793 22910 (NCP.CreateSubstanceType
 19803 . 21321) (NCP.CreateCardType 21323 . 22908)))))
STOP