(FILECREATED "28-Aug-84 10:45:00" {PHYLUM}<PSA>NOTECARDS>PROMPTWINPATCH.;2 3596   

      changes to:  (VARS PROMPTWINPATCHCOMS)
		   (FNS NC.PromptWinToggle NC.BringUpTEditCard1 NC.PromptWinOff)

      previous date: "28-Aug-84 10:33:32" {PHYLUM}<PSA>NOTECARDS>PROMPTWINPATCH.;1)


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

(PRETTYCOMPRINT PROMPTWINPATCHCOMS)

(RPAQQ PROMPTWINPATCHCOMS ((FNS NC.BringUpTEditCard1 NC.PromptWinToggle)
			   (P (SAVEDEF (QUOTE NC.BringUpTEditCard1)))
			   (P (PUTPROP (QUOTE NC.BringUpTEditCard)
				       (QUOTE CODE)
				       (GETPROP (QUOTE NC.BringUpTEditCard1)
						(QUOTE CODE))))))
(DEFINEQ

(NC.BringUpTEditCard1
  (LAMBDA (ID TextStream Region/Position)                    (* rht: "28-Aug-84 10:17")
                                                             (* Bring up a TEdit window for Card ID whose text stream
							     is TextStream in Region specified by Region/Position or 
							     by the user.)
    (PROG (Region TEditWindow TEditProcess Title)
          (COND
	    ((AND (SETQ TEditWindow (fetch \WINDOW of (TEXTOBJ TextStream)))
		  (SETQ TEditProcess (WINDOWPROP TEditWindow (QUOTE PROCESS))))
	      (TOTOPW TEditWindow)
	      (RPTQ 2 (FLASHW TEditWindow))
	      (TTY.PROCESS TEditProcess)
	      (RETURN TEditWindow)))
          (SETQ Region (COND
	      ((type? REGION Region/Position)
		Region/Position)
	      ((POSITIONP Region/Position)
		(CREATEREGION (fetch XCOORD of Region/Position)
			      (fetch YCOORD of Region/Position)
			      PSA.TEditCardDefaultWidth PSA.TEditCardDefaultHeight))
	      (T (COND
		   ((SETQ Region (NC.FetchRegion ID))
		     (GETBOXREGION (fetch WIDTH of Region)
				   (fetch HEIGHT of Region)
				   (GETMOUSEX)
				   (IDIFFERENCE (GETMOUSEY)
						(fetch HEIGHT of Region))
				   NIL
				   (CONCAT "Please specify location for edit of Note Card " ID)))
		   (T (GETBOXREGION PSA.TEditCardDefaultWidth PSA.TEditCardDefaultHeight (GETMOUSEX)
				    (IDIFFERENCE (GETMOUSEY)
						 PSA.TEditCardDefaultHeight)
				    NIL
				    (CONCAT "Please specify location for edit of Note Card " ID)))))))
          (SETQ Title (NC.FetchTitle ID))
          (SETQ TEditWindow (CREATEW Region Title (NC.DetermineBorderWidth (NC.FetchType ID))
				     T))
          (WINDOWPROP TEditWindow (QUOTE SHRINKFN)
		      (FUNCTION NC.ShrinkFn))
          (WINDOWPROP TEditWindow (QUOTE NoteCardID)
		      ID)
          (WINDOWPROP TEditWindow (QUOTE NoteCardsLeftButtonMenu)
		      (NC.MakeTEditLeftMenu (NC.FetchType ID)))
          (WINDOWPROP TEditWindow (QUOTE NoteCardsMiddleButtonMenu)
		      (NC.MakeTEditMiddleMenu))
          (WINDOWADDPROP TEditWindow (QUOTE CLOSEFN)
			 (FUNCTION NC.TEditCloseFn))
          (TEDIT TextStream TEditWindow NIL (LIST (QUOTE FONT)
						  PSA.TimesRoman10
						  (QUOTE TITLEMENUFN)
						  (FUNCTION NC.TEditMenuFn)
						  (QUOTE PROMPTWINDOW)
						  (QUOTE DON'T)))
          (RETURN TEditWindow))))

(NC.PromptWinToggle
  (LAMBDA NIL                                                (* rht: "28-Aug-84 10:43")

          (* * Toggles between two def's of NC.BringUpTEditCard, the original and one that doesn't use companion prompt 
	  windows.)


    (UNSAVEDEF (QUOTE NC.BringUpTEditCard))))
)
(SAVEDEF (QUOTE NC.BringUpTEditCard1))
(PUTPROP (QUOTE NC.BringUpTEditCard)
	 (QUOTE CODE)
	 (GETPROP (QUOTE NC.BringUpTEditCard1)
		  (QUOTE CODE)))
(PUTPROPS PROMPTWINPATCH COPYRIGHT ("Xerox Corporation" 1984))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (660 3361 (NC.BringUpTEditCard1 670 . 3051) (NC.PromptWinToggle 3053 . 3359)))))
STOP