(FILECREATED "29-Apr-85 13:04:48" {PHYLUM}<NOTECARDS>RELEASE1.2I>FGHPATCH007.;5 4589   

      changes to:  (VARS FGHPATCH007COMS)
		   (FNS NC.RegisterPlaceMarkerImageObj)

      previous date: " 1-Apr-85 18:09:57" {PHYLUM}<NOTECARDS>RELEASE1.2I>FGHPATCH007.;3)


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

(PRETTYCOMPRINT FGHPATCH007COMS)

(RPAQQ FGHPATCH007COMS ((FNS WINDOW.FROM.TEDIT.THING WINDOW.OF.TEXTSTREAM NC.ClosePropListEditor 
			     NC.DeletedLinkImageBoxFn NC.RegisterPlaceMarkerImageObj)
			(P (NC.RegisterPlaceMarkerImageObj))))
(DEFINEQ

(WINDOW.FROM.TEDIT.THING
  (LAMBDA (W)                                                (* fgh: "29-Mar-85 14:02")
    (COND
      ((WINDOWP W))
      ((STREAMP W)                                           (* We got passed a stream; find the window for it)
	(WINDOW.OF.TEXTSTREAM W))
      ((type? TEXTOBJ W)                                     (* We got a textobj; use its window)
	(CAR (MKLIST (fetch \WINDOW of W))))
      ((NULL W)                                              (* Create the window, if none is given.)
	(CREATEW NIL "Editing Window"))
      (T (ERROR W "not a window.")))))

(WINDOW.OF.TEXTSTREAM
  (LAMBDA (TEXTSTREAM)                                       (* fgh: "29-Mar-85 14:02")
                                                             (* returns the window in which a textstream is being 
							     editted.)
    (CAR (MKLIST (fetch (TEXTOBJ \WINDOW) of (TEXTOBJ TEXTSTREAM))))))

(NC.ClosePropListEditor
  (LAMBDA (Window SaveFlg)                                   (* fgh: "29-Mar-85 19:47")

          (* Close the prop list editor, saving or not saving the edited prop list as specified by the SaveFlg or by the user 
	  if SaveFlg is NIL)


    (PROG (TextObj Answered OldPropList NewPropList)
          (DETACHWINDOW Window)
          (SETQ TextObj (WINDOWPROP Window (QUOTE TEXTOBJ)))
          (SETQ OldPropList (WINDOWPROP Window (QUOTE PROPERTYLIST.BEING.EDITED)))
          (AND TextObj (COND
		 ((EQ SaveFlg (QUOTE Save))
		   (SETQ NewPropList (NC.ExtractPropList Window))
		   (NC.ProcessEditedPropList NewPropList OldPropList))
		 ((EQ SaveFlg (QUOTE NoSave)))
		 ((EQ (WINDOWPROP Window (QUOTE PropListEditor))
		      (QUOTE ShowOnly)))
		 (T (until Answered do (SELECTQ (MENU (OR (AND (BOUNDP (QUOTE NC.SavePropEditMenu))
							       (type? MENU NC.SavePropEditMenu)
							       NC.SavePropEditMenu)
							  (SETQ NC.SavePropEditMenu
							    (create MENU
								    ITEMS ←(QUOTE (Save% Changes
										    Cancel% Changes))
								    TITLE ← "Property Edits?"
								    CENTERFLG ← T))))
						(Save% Changes (SETQ NewPropList (NC.ExtractPropList
								   Window))
							       (NC.ProcessEditedPropList NewPropList 
										      OldPropList)
							       (SETQ Answered T))
						(Cancel% Changes (SETQ Answered T))
						NIL)))))
          (WINDOWPROP Window (QUOTE TEDIT.MENU)
		      NIL)
          (WINDOWPROP Window (QUOTE TEDIT.PROPS)
		      NIL)
          (WINDOWPROP Window (QUOTE PropListEditor)
		      NIL)
          (WINDOWDELPROP Window (QUOTE CLOSEFN)
			 (FUNCTION NC.ClosePropListEditor))
          (COND
	    (TextObj (replace (TEXTOBJ \DIRTY) of TextObj with NIL)
		     (\TEDIT.QUIT (CAR (MKLIST (fetch (TEXTOBJ \WINDOW) of TextObj))))
		     (until (fetch (TEXTOBJ EDITFINISHEDFLG) of TextObj) do (BLOCK)))))))

(NC.DeletedLinkImageBoxFn
  (LAMBDA (ImageObj Stream)                                  (* fgh: " 1-Apr-85 18:07")
    (PROG ((Font NC.DefaultFont))
          (RETURN (create IMAGEBOX
			  XSIZE ←(IPLUS 6 (STRINGWIDTH "Deleted" Font))
			  YSIZE ←(IPLUS 4 (FONTPROP Font (QUOTE HEIGHT)))
			  YDESC ←(IPLUS 2 (FONTPROP Font (QUOTE DESCENT)))
			  XKERN ← 0)))))

(NC.RegisterPlaceMarkerImageObj
  (LAMBDA NIL                                                (* fgh: "29-Apr-85 12:53")

          (* * Cause the PlaceMarker Image Obj to be registered by creating the make place marker function once)


    (NC.MakePlaceMarker)))
)
(NC.RegisterPlaceMarkerImageObj)
(PUTPROPS FGHPATCH007 COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (581 4474 (WINDOW.FROM.TEDIT.THING 591 . 1250) (WINDOW.OF.TEXTSTREAM 1252 . 1613) (
NC.ClosePropListEditor 1615 . 3778) (NC.DeletedLinkImageBoxFn 3780 . 4192) (
NC.RegisterPlaceMarkerImageObj 4194 . 4472)))))
STOP