(FILECREATED " 2-Aug-86 23:40:17" {QV}<NOTECARDS>1.3K>RHTPATCH084.;1 6559   

      changes to:  (VARS RHTPATCH084COMS))


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

(PRETTYCOMPRINT RHTPATCH084COMS)

(RPAQQ RHTPATCH084COMS ((* * Changes to NCTEXTCARD)
			  (FNS NC.BringUpTEditCard NC.MakeTEditPropsList)
			  (* * Changes to NCFILEBOXCARD)
			  (FNS NC.MakeFileBox)))
(* * Changes to NCTEXTCARD)

(DEFINEQ

(NC.BringUpTEditCard
  (LAMBDA (Card TextStream Region/Position)                  (* rht: " 2-Aug-86 23:14")
                                                             (* Bring up a TEdit window for Card ID whose text 
							     stream is TextStream in Region specified by 
							     Region/Position or by the user.)

          (* * rht 9/10/85: Fixed call to NC.MakeTEditPropsList so prompt window gets fixed up before card is brought up.)



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



          (* * kirk 2Dec85 Removed illegal RETURN)



          (* * rht 4/11/86: Added Type arg to call to NC.MakeTEditMiddleMenu and changed names of menu windowprops.)



          (* * rht 5/5/86: Now calls NC.InstallTitleBarLeftMenu and NC.InstallTextTitleBarMiddleMenu.)



          (* * rht 8/2/86: Now doesn't throw in any extra tedit props if card is a filebox.)


    (LET (Region TEditWindow TEditProcess Title TextStreamDirtyFlg Type)
         (if (AND (SETQ TEditWindow (WINDOW.FROM.TEDIT.THING TextStream))
		      (SETQ TEditProcess (WINDOWPROP TEditWindow (QUOTE PROCESS))))
	     then (TOTOPW TEditWindow)
		    (RPTQ 2 (FLASHW TEditWindow))
		    (TTY.PROCESS TEditProcess)
		    TEditWindow
	   else (SETQ Region (NC.DetermineDisplayRegion Card Region/Position))
		  (SETQ Title (NC.RetrieveTitle Card))
		  (SETQ Type (NC.RetrieveType Card))
		  (SETQ TEditWindow (CREATEW Region Title NIL T))
		  (WINDOWADDPROP TEditWindow (QUOTE SHRINKFN)
				   (FUNCTION NC.TextCardShrinkFn))
		  (NC.InstallTitleBarLeftMenu TEditWindow Type)
		  (NC.InstallTextTitleBarMiddleMenu TEditWindow Type)
		  (SETQ TextStreamDirtyFlg (NC.CardDirtyP Card))
		  (TEDIT TextStream TEditWindow NIL (NC.MakeTEditPropsList TEditWindow
									       (NC.FileBoxP Card T))
			   )
		  (AND TextStreamDirtyFlg (NC.MarkCardDirty Card)))
     TEditWindow)))

(NC.MakeTEditPropsList
  (LAMBDA (TEditWindow Don'tAttachUserSpecifiedPropsFlg)     (* rht: " 2-Aug-86 23:13")

          (* * Create the props list to hand to all TEdit and OPENTEXTSTREAM calls)



          (* * rht 9/10/85: Now takes a TEditWindow arg so can compute a prompt window.)



          (* * 5/1/86: Now appends NC-specific props in front of TEdit props specified as global param by user.)



          (* * rht 8/2/86: Added Don'tAttachUserSpecifiedPropsFlg to override attaching user-specified props.
	  For use by fileboxes.)


    (APPEND (LIST (QUOTE FONT)
		      NC.DefaultFont
		      (QUOTE TITLEMENUFN)
		      (FUNCTION NC.TEditMenuFn)
		      (QUOTE PUTFN)
		      (FUNCTION NC.TEditPutFn)
		      (QUOTE GETFN)
		      (FUNCTION NC.TEditGetFn)
		      (QUOTE QUITFN)
		      (LIST (FUNCTION NC.TEditPropsListQuitFn)
			      (FUNCTION (LAMBDA NIL
				  (QUOTE DON'T))))
		      (QUOTE PROMPTWINDOW)
		      (AND TEditWindow (NC.GetPromptWindow TEditWindow)))
	      (if Don'tAttachUserSpecifiedPropsFlg
		  then NIL
		else NC.UserSpecifiedTEditProps))))
)
(* * Changes to NCFILEBOXCARD)

(DEFINEQ

(NC.MakeFileBox
  (LAMBDA (Card Title DontDisplay)                           (* rht: " 2-Aug-86 23:16")
                                                             (* 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.)



          (* * rht 4/11/86: Now passes Type and Window to NC.MakeTEditLeftMenu.)



          (* * rht 8/2/86: Now lets NC.MakeTEditPropsList build the props to be passed to TEDIT.)


    (LET ((Spacer (CONCAT (CHARACTER 13)
			    (CHARACTER 13)))
	  Window TextStream Type)
         (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"))))
	      (SETQ Type (NC.RetrieveType Card))
	      (NC.InstallTextTitleBarMiddleMenu Window Type)
	      (NC.InstallTitleBarLeftMenu Window Type)     (* Display the card)
	      (WINDOWADDPROP Window (QUOTE SHRINKFN)
			       (FUNCTION NC.TextCardShrinkFn))
	      (TEDIT TextStream Window NIL (NC.MakeTEditPropsList Window T))
	      (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)))))
)
(PUTPROPS RHTPATCH084 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (437 3680 (NC.BringUpTEditCard 447 . 2488) (NC.MakeTEditPropsList 2490 . 3678)) (3718 
6477 (NC.MakeFileBox 3728 . 6475)))))
STOP