(FILECREATED "30-Oct-85 23:05:20" {QV}<NOTECARDS>RELEASE1.2I>NCPARAMETERS.;6 18840  

      changes to:  (VARS NCPARAMETERSCOMS)

      previous date: " 3-Oct-85 12:48:00" {QV}<NOTECARDS>RELEASE1.2I>NCPARAMETERS.;5)


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

(PRETTYCOMPRINT NCPARAMETERSCOMS)

(RPAQQ NCPARAMETERSCOMS ((E (SETQ NC.SystemDate (DATE))
			    (UNMARKASCHANGED (QUOTE NC.SystemDate)
					     (QUOTE VARS)))
	(VARS NC.SystemDate)
	(P (UNMARKASCHANGED (QUOTE NC.SystemDate)
			    (QUOTE VARS)))
	(* * Tailoring parameters for the user to set.)
	(GLOBALVARS NC.FixedMenuFlg NC.AdviseWindowMenuFlg NC.ForceSourcesFlg NC.ForceFilingFlg 
		    NC.ForceTitlesFlg NC.MarkersInFileBoxesFlg NC.AlphabetizedFileBoxChildrenFlg 
		    NC.LinkIconAttachBitmapFlg NC.LinkIconShowLinkTypeFlg NC.LinkIconShowTitleFlg 
		    NC.MainMenuPosition World5File NC.SpecialBrowserSpecsFlg NC.AnnoFlg 
		    NC.LinkDashingInBrowser NC.ArrowHeadsInBrowser NC.EnableBravoToTEditConversionFlg 
		    NC.DefaultFont NC.LinkIconFont NC.DefaultCardType NC.BringUpCardAtOldPosFlg 
		    NC.CloseCardsOffScreenFlg NC.NoteCardsParameters NC.SpecialBrowserMiddleButtonFn 
		    NCINITIALGLOBALPARAMS)
	(INITVARS (NC.FixedMenuFlg NIL)
		  (NC.ShortWindowMenuFlg T)
		  (NC.ForceSourcesFlg NIL)
		  (NC.ForceFilingFlg T)
		  (NC.ForceTitlesFlg T)
		  (NC.MarkersInFileBoxesFlg T)
		  (NC.AlphabetizedFileBoxChildrenFlg NIL)
		  (NC.LinkIconAttachBitmapFlg T)
		  (NC.LinkIconShowTitleFlg T)
		  (NC.LinkIconShowLinkTypeFlg NIL)
		  (NC.MainMenuPosition NIL)
		  (World5File (QUOTE {DSK}WORLD5.MAPDATA))
		  (NC.SpecialBrowserSpecsFlg NIL)
		  (NC.AnnoFlg NIL)
		  (NC.DefaultCardType (QUOTE Text))
		  (NC.CloseCardsOffScreenFlg NIL)
		  (NC.BringUpCardAtOldPosFlg NIL)
		  (NC.EnableBravoToTEditConversionFlg NIL)
		  (NC.DefaultFont (FONTCREATE (QUOTE TimesRoman)
					      12))
		  (NC.LinkIconFont (FONTCREATE (QUOTE HELVETICA)
					       10
					       (QUOTE BOLD)))
		  (NCINITIALGLOBALPARAMS NIL))
	(VARS (NC.NoteCardsParameters (QUOTE (DefaultCardType FixedTopLevelMenu ShortWindowMenus 
							      ForceSources ForceFiling ForceTitles 
							      CloseCardsOffScreen 
							      BringUpCardsAtPreviousPos 
							      MarkersInFileBoxes 
							      AlphabetizedFileBoxChildren 
							      DefaultLinkIconAttachBitmap 
							      DefaultLinkIconShowTitle 
							      DefaultLinkIconShowLinkType 
							      LinkDashingInBrowsers 
							      ArrowHeadsInBrowsers 
							      SpecialBrowserSpecs AnnoAccessible 
							      EnableBravoToTEditConversion 
							      DefaultFont LinkIconFont))))
	(P (SETPROPLIST (QUOTE NC.NoteCardsParameters)
			(QUOTE (DefaultCardType (NC.DefaultCardType EVAL 
								    NC.DefaultCardTypeSelectionFn 
								    NC.DefaultCardTypeCheckFn)
						FixedTopLevelMenu NC.FixedMenuFlg ShortWindowMenus 
						NC.ShortWindowMenuFlg ForceSources NC.ForceSourcesFlg 
						ForceFiling NC.ForceFilingFlg ForceTitles 
						NC.ForceTitlesFlg CloseCardsOffScreen 
						NC.CloseCardsOffScreenFlg BringUpCardsAtPreviousPos 
						NC.BringUpCardAtOldPosFlg MarkersInFileBoxes 
						NC.MarkersInFileBoxesFlg AlphabetizedFileBoxChildren 
						NC.AlphabetizedFileBoxChildrenFlg 
						DefaultLinkIconAttachBitmap 
						NC.LinkIconAttachBitmapFlg DefaultLinkIconShowTitle 
						NC.LinkIconShowTitleFlg DefaultLinkIconShowLinkType 
						NC.LinkIconShowLinkTypeFlg SpecialBrowserSpecs 
						NC.SpecialBrowserSpecsFlg AnnoAccessible NC.AnnoFlg 
						LinkDashingInBrowsers NC.LinkDashingInBrowser 
						ArrowHeadsInBrowsers (NC.ArrowHeadsInBrowser EVAL 
								NC.ArrowHeadsInBrowserSelectionFn 
								    NC.ArrowHeadsInBrowserCheckFn)
						EnableBravoToTEditConversion
						(NC.EnableBravoToTEditConversionFlg 
							   NC.EnableBravoToTEditConversionFetchFn 
						       NC.EnableBravoToTEditConversionSelectionFn NIL)
						DefaultFont
						(NC.DefaultFont NC.DefaultFontFetchFn 
								NC.DefaultFontSelectionFn FONTP)
						LinkIconFont
						(NC.LinkIconFont NC.DefaultFontFetchFn 
								 NC.DefaultFontSelectionFn FONTP)
						VALUE
						(DefaultCardType FixedTopLevelMenu ShortWindowMenus 
								 ForceSources ForceFiling ForceTitles 
								 CloseCardsOffScreen 
								 BringUpCardsAtPreviousPos 
								 MarkersInFileBoxes 
								 DefaultLinkIconAttachBitmap 
								 DefaultLinkIconShowTitle 
								 DefaultLinkIconShowLinkType 
								 LinkDashingInBrowsers 
								 ArrowHeadsInBrowsers 
								 EnableBravoToTEditConversion 
								 SpecialBrowserSpecs AnnoAccessible 
								 DefaultFont LinkIconFont)))))
	(* * Parameter Inspector & Editor)
	(RECORDS GLOBALPARAMETER)
	(FNS NC.BuildInspector NC.InspectorFetchFn NC.InspectorTitleCommandFn NC.InspectorSelectionFn 
	     NC.DefaultCardTypeSelectionFn NC.DefaultCardTypeCheckFn 
	     NC.ArrowHeadsInBrowserSelectionFn NC.ArrowHeadsInBrowserCheckFn 
	     NC.EnableBravoToTEditConversionFetchFn NC.EnableBravoToTEditConversionSelectionFn 
	     NC.DefaultFontFetchFn NC.DefaultFontSelectionFn NC.GetFontFromUser NC.FontFaceShorthand))
)

(RPAQQ NC.SystemDate "30-Oct-85 23:05:25")
(UNMARKASCHANGED (QUOTE NC.SystemDate)
		 (QUOTE VARS))
(* * Tailoring parameters for the user to set.)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.FixedMenuFlg NC.AdviseWindowMenuFlg NC.ForceSourcesFlg NC.ForceFilingFlg 
	    NC.ForceTitlesFlg NC.MarkersInFileBoxesFlg NC.AlphabetizedFileBoxChildrenFlg 
	    NC.LinkIconAttachBitmapFlg NC.LinkIconShowLinkTypeFlg NC.LinkIconShowTitleFlg 
	    NC.MainMenuPosition World5File NC.SpecialBrowserSpecsFlg NC.AnnoFlg 
	    NC.LinkDashingInBrowser NC.ArrowHeadsInBrowser NC.EnableBravoToTEditConversionFlg 
	    NC.DefaultFont NC.LinkIconFont NC.DefaultCardType NC.BringUpCardAtOldPosFlg 
	    NC.CloseCardsOffScreenFlg NC.NoteCardsParameters NC.SpecialBrowserMiddleButtonFn 
	    NCINITIALGLOBALPARAMS)
)

(RPAQ? NC.FixedMenuFlg NIL)

(RPAQ? NC.ShortWindowMenuFlg T)

(RPAQ? NC.ForceSourcesFlg NIL)

(RPAQ? NC.ForceFilingFlg T)

(RPAQ? NC.ForceTitlesFlg T)

(RPAQ? NC.MarkersInFileBoxesFlg T)

(RPAQ? NC.AlphabetizedFileBoxChildrenFlg NIL)

(RPAQ? NC.LinkIconAttachBitmapFlg T)

(RPAQ? NC.LinkIconShowTitleFlg T)

(RPAQ? NC.LinkIconShowLinkTypeFlg NIL)

(RPAQ? NC.MainMenuPosition NIL)

(RPAQ? World5File (QUOTE {DSK}WORLD5.MAPDATA))

(RPAQ? NC.SpecialBrowserSpecsFlg NIL)

(RPAQ? NC.AnnoFlg NIL)

(RPAQ? NC.DefaultCardType (QUOTE Text))

(RPAQ? NC.CloseCardsOffScreenFlg NIL)

(RPAQ? NC.BringUpCardAtOldPosFlg NIL)

(RPAQ? NC.EnableBravoToTEditConversionFlg NIL)

(RPAQ? NC.DefaultFont (FONTCREATE (QUOTE TimesRoman)
				  12))

(RPAQ? NC.LinkIconFont (FONTCREATE (QUOTE HELVETICA)
				   10
				   (QUOTE BOLD)))

(RPAQ? NCINITIALGLOBALPARAMS NIL)

(RPAQQ NC.NoteCardsParameters (DefaultCardType FixedTopLevelMenu ShortWindowMenus ForceSources 
					       ForceFiling ForceTitles CloseCardsOffScreen 
					       BringUpCardsAtPreviousPos MarkersInFileBoxes 
					       AlphabetizedFileBoxChildren 
					       DefaultLinkIconAttachBitmap DefaultLinkIconShowTitle 
					       DefaultLinkIconShowLinkType LinkDashingInBrowsers 
					       ArrowHeadsInBrowsers SpecialBrowserSpecs 
					       AnnoAccessible EnableBravoToTEditConversion 
					       DefaultFont LinkIconFont))
(SETPROPLIST (QUOTE NC.NoteCardsParameters)
	     (QUOTE (DefaultCardType (NC.DefaultCardType EVAL NC.DefaultCardTypeSelectionFn 
							 NC.DefaultCardTypeCheckFn)
				     FixedTopLevelMenu NC.FixedMenuFlg ShortWindowMenus 
				     NC.ShortWindowMenuFlg ForceSources NC.ForceSourcesFlg 
				     ForceFiling NC.ForceFilingFlg ForceTitles NC.ForceTitlesFlg 
				     CloseCardsOffScreen NC.CloseCardsOffScreenFlg 
				     BringUpCardsAtPreviousPos NC.BringUpCardAtOldPosFlg 
				     MarkersInFileBoxes NC.MarkersInFileBoxesFlg 
				     AlphabetizedFileBoxChildren NC.AlphabetizedFileBoxChildrenFlg 
				     DefaultLinkIconAttachBitmap NC.LinkIconAttachBitmapFlg 
				     DefaultLinkIconShowTitle NC.LinkIconShowTitleFlg 
				     DefaultLinkIconShowLinkType NC.LinkIconShowLinkTypeFlg 
				     SpecialBrowserSpecs NC.SpecialBrowserSpecsFlg AnnoAccessible 
				     NC.AnnoFlg LinkDashingInBrowsers NC.LinkDashingInBrowser 
				     ArrowHeadsInBrowsers (NC.ArrowHeadsInBrowser EVAL 
								NC.ArrowHeadsInBrowserSelectionFn 
								    NC.ArrowHeadsInBrowserCheckFn)
				     EnableBravoToTEditConversion
				     (NC.EnableBravoToTEditConversionFlg 
							   NC.EnableBravoToTEditConversionFetchFn 
						       NC.EnableBravoToTEditConversionSelectionFn NIL)
				     DefaultFont
				     (NC.DefaultFont NC.DefaultFontFetchFn NC.DefaultFontSelectionFn 
						     FONTP)
				     LinkIconFont
				     (NC.LinkIconFont NC.DefaultFontFetchFn NC.DefaultFontSelectionFn 
						      FONTP)
				     VALUE
				     (DefaultCardType FixedTopLevelMenu ShortWindowMenus ForceSources 
						      ForceFiling ForceTitles CloseCardsOffScreen 
						      BringUpCardsAtPreviousPos MarkersInFileBoxes 
						      DefaultLinkIconAttachBitmap 
						      DefaultLinkIconShowTitle 
						      DefaultLinkIconShowLinkType 
						      LinkDashingInBrowsers ArrowHeadsInBrowsers 
						      EnableBravoToTEditConversion 
						      SpecialBrowserSpecs AnnoAccessible DefaultFont 
						      LinkIconFont))))
(* * Parameter Inspector & Editor)

[DECLARE: EVAL@COMPILE 

(RECORD GLOBALPARAMETER (PARAMGLOBALVAR PARAMFETCHFN PARAMSELECTIONFN PARAMCHECKFN))
]
(DEFINEQ

(NC.BuildInspector
  (LAMBDA NIL                                                (* rht: "25-Oct-84 15:31")

          (* * Build and dislay an inspector window on the user tailoring flgs)


    (PROG (InspectWindow)
          (COND
	    ((SETQ InspectWindow (for Window in (OPENWINDOWS) when (WINDOWPROP Window (QUOTE 
									       NoteCardsInspector))
				    do (RETURN Window)))
	      (INSPECTW.REDISPLAY InspectWindow)
	      (MOVEW InspectWindow))
	    (T (SETQ InspectWindow (INSPECTW.CREATE T NC.NoteCardsParameters (FUNCTION 
						      NC.InspectorFetchFn)
						    NIL NIL NIL (FUNCTION NC.InspectorTitleCommandFn)
						    "NoteCards Parameters"
						    (FUNCTION NC.InspectorSelectionFn)
						    NIL NIL))
	       (WINDOWPROP InspectWindow (QUOTE NoteCardsInspector)
			   T))))))

(NC.InspectorFetchFn
  (LAMBDA (Object Property)                                  (* rht: "19-Mar-85 10:54")

          (* * Fetches the value of the atom specified by property. Object is a dummy argument in this case.)



          (* * rht 10/25/84: Now find relevant globalvar on proplist of NC.NoteCardsParameters. If there is a valuesfn, then 
	  we just display the value. If not, then it's assumed to be a binary T/NIL type globalvar and we display either Yes 
	  or No.)



          (* * rht 3/19/85: Rewrote to use the new GLOBALPARAMETER record which contains GlobalVar's name and fetchFn among 
	  other stuff.)


    (PROG ((ParameterInfo (GETPROP (QUOTE NC.NoteCardsParameters)
				   Property))
	   GlobalVar FetchFn Value)
          (if (LISTP ParameterInfo)
	      then (SETQ GlobalVar (fetch (GLOBALPARAMETER PARAMGLOBALVAR) of ParameterInfo))
		   (SETQ FetchFn (fetch (GLOBALPARAMETER PARAMFETCHFN) of ParameterInfo))
	    else (SETQ GlobalVar ParameterInfo))
          (RETURN (COND
		    (FetchFn (APPLY* FetchFn GlobalVar))
		    ((EVAL GlobalVar)
		      (QUOTE Yes))
		    (T (QUOTE No)))))))

(NC.InspectorTitleCommandFn
  (LAMBDA (InspectWindow Object)                             (* fgh: " 8-Aug-84 14:29")
    (AND (EQ (MENU (create MENU
			   ITEMS ←(QUOTE (Yes No))
			   TITLE ← "Close?"))
	     (QUOTE Yes))
	 (CLOSEW InspectWindow))))

(NC.InspectorSelectionFn
  (LAMBDA (Property ValueFlg InspectWindow)                  (* rht: "19-Mar-85 11:07")

          (* * Actions to be taken when the user selects an item in the Inspector. If a value, then ignore.
	  If a property, ask for a new value.)



          (* * KLUDGED to hadle the NC.DefaultcardType property --- should be fixed to be general!!!!!!! fgh 10/23/84)



          (* * rht 10/25/84: Rewritten to access the NC.NoteCardsParameters variable's prop list to get all info including the
	  name of the relevant globalvar for this parameter and an optional function. The latter returns a list of possible 
	  values. If no such function, then just toggle between Yes and No.)



          (* * rht 3/19/85: Rewritten to use new GLOBALPARAMETER record which contains globalvar's name and selection fn among
	  other stuff.)


    (PROG (Answer (ParameterInfo (GETPROP (QUOTE NC.NoteCardsParameters)
					  Property))
		  SelectionFn GlobalVar)
          (AND ValueFlg (RETURN (INSPECTW.SELECTITEM InspectWindow)))
          (if (LISTP ParameterInfo)
	      then (SETQ GlobalVar (fetch (GLOBALPARAMETER PARAMGLOBALVAR) of ParameterInfo))
		   (SETQ SelectionFn (fetch (GLOBALPARAMETER PARAMSELECTIONFN) of ParameterInfo))
	    else (SETQ GlobalVar ParameterInfo))
          (COND
	    (SelectionFn (if (NEQ (QUOTE NOTCHANGED)
				  (SETQ Answer (APPLY* SelectionFn GlobalVar)))
			     then (SET GlobalVar Answer)
				  (INSPECTW.REDISPLAY InspectWindow Property)))
	    (T (COND
		 ((EVAL GlobalVar)
		   (SET GlobalVar NIL))
		 (T (SET GlobalVar T)))
	       (INSPECTW.REDISPLAY InspectWindow Property)))
          (INSPECTW.SELECTITEM InspectWindow))))

(NC.DefaultCardTypeSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht: "18-Mar-85 18:22")

          (* * Let user choose from a menu of card types.)


    (OR (MENU (create MENU
		      ITEMS ←(NC.ListOfCardTypes)
		      TITLE ← "Choose New Value"))
	(QUOTE NOTCHANGED))))

(NC.DefaultCardTypeCheckFn
  (LAMBDA (CandidateVal)                                     (* rht: "18-Mar-85 18:23")

          (* * Must be a valid card type.)


    (FMEMB CandidateVal (NC.ListOfCardTypes))))

(NC.ArrowHeadsInBrowserSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht: "18-Mar-85 18:34")

          (* * Ask user for new value from a menu of choices.)


    (OR (MENU (create MENU
		      ITEMS ←(QUOTE ((AtMidpoint (QUOTE AtMidpoint)
						 "Place arrow heads at midpoints of browser links.")
				      (AtEndpoint (QUOTE AtEndpoint)
						  "Place arrow heads at endpoints of browser links.")
				      (None (QUOTE None)
					    "Do not draw arrow heads in browsers.")))
		      TITLE ← "Choose New Value"))
	(QUOTE NOTCHANGED))))

(NC.ArrowHeadsInBrowserCheckFn
  (LAMBDA (CandidateVar)                                     (* rht: "18-Mar-85 18:36")

          (* * Check candidate against list of possible values.)


    (FMEMB CandidateVar (QUOTE (AtMidpoint AtEndpoint None)))))

(NC.EnableBravoToTEditConversionFetchFn
  (LAMBDA (GlobalVar)                                        (* rht: "19-Mar-85 10:36")

          (* * Just convert T/NIL to Yes/No.)


    (if (EVAL GlobalVar)
	then (QUOTE Yes)
      else (QUOTE No))))

(NC.EnableBravoToTEditConversionSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht: "19-Mar-85 11:03")

          (* * Just toggle the value, but do side effect of setting or unsetting TEdit's input formats.)


    (if (EVAL GlobalVar)
	then (SETQ TEDIT.INPUT.FORMATS NIL)
	     NIL
      else (SETQ TEDIT.INPUT.FORMATS (BQUOTE ((\TEDIT.BRAVOFILE? TEDITFROMBRAVO))))
	   T)))

(NC.DefaultFontFetchFn
  (LAMBDA (GlobalVar)                                        (* rht: "19-Mar-85 10:47")

          (* * Return the shorthand display of font.)


    (PROG ((Font (EVAL GlobalVar)))
          (RETURN (LIST (FONTPROP Font (QUOTE FAMILY))
			(FONTPROP Font (QUOTE SIZE))
			(NC.FontFaceShorthand (FONTPROP Font (QUOTE FACE))))))))

(NC.DefaultFontSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht: "19-Mar-85 11:15")

          (* * Just go get a font from the user.)


    (OR (NC.GetFontFromUser (EVAL GlobalVar))
	(QUOTE NOTCHANGED))))

(NC.GetFontFromUser
  (LAMBDA (CurrentFont)                                      (* rht: "20-Mar-85 10:45")

          (* * Get a font from the user. Current font characteristics serve as the default.)


    (PROG (Answer)
          (RETURN (AND (SETQ Answer
			 (STYLESHEET (CREATE.STYLE (QUOTE TITLE)
						   "Please select a font:"
						   (QUOTE ITEM.TITLES)
						   (QUOTE (Family Size Face))
						   (QUOTE ITEM.TITLE.FONT)
						   (QUOTE (TIMESROMAN 12 BOLD))
						   (QUOTE ITEMS)
						   (LIST (create MENU
								 ITEMS ←(QUOTE (TIMESROMAN HELVETICA 
											   GACHA 
											  CLASSIC 
											   MODERN 
											 TERMINAL)))
							 (create MENU
								 ITEMS ←(QUOTE (8 9 10 11 12 14)))
							 (create MENU
								 ITEMS ←(QUOTE (STANDARD BOLD ITALIC 
										       BOLDITALIC))))
						   (QUOTE SELECTIONS)
						   (LIST (FONTPROP CurrentFont (QUOTE FAMILY))
							 (FONTPROP CurrentFont (QUOTE SIZE))
							 (NC.FontFaceShorthand (FONTPROP
										 CurrentFont
										 (QUOTE FACE))))
						   (QUOTE NEED.NOT.FILL.IN)
						   NIL))
			 (APPLY (FUNCTION FONTCREATE)
				Answer)))))))

(NC.FontFaceShorthand
  (LAMBDA (FontFace)                                         (* rht: " 6-Mar-85 18:17")

          (* * If there's a shorthand atomic representation of this face, then return it, else just return the 3-tuple 
	  representation.)


    (PROG ((Regular (QUOTE (MEDIUM REGULAR REGULAR)))
	   (Italic (QUOTE (MEDIUM ITALIC REGULAR)))
	   (Bold (QUOTE (BOLD REGULAR REGULAR)))
	   (BoldItalic (QUOTE (BOLD ITALIC REGULAR))))
          (RETURN (COND
		    ((EQUAL FontFace Regular)
		      (QUOTE STANDARD))
		    ((EQUAL FontFace Italic)
		      (QUOTE ITALIC))
		    ((EQUAL FontFace Bold)
		      (QUOTE BOLD))
		    ((EQUAL FontFace BoldItalic)
		      (QUOTE BOLDITALIC))
		    (T FontFace))))))
)
(PUTPROPS NCPARAMETERS COPYRIGHT ("Xerox Corporation" 1984 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (9551 18752 (NC.BuildInspector 9561 . 10456) (NC.InspectorFetchFn 10458 . 11687) (
NC.InspectorTitleCommandFn 11689 . 11974) (NC.InspectorSelectionFn 11976 . 13823) (
NC.DefaultCardTypeSelectionFn 13825 . 14160) (NC.DefaultCardTypeCheckFn 14162 . 14390) (
NC.ArrowHeadsInBrowserSelectionFn 14392 . 15005) (NC.ArrowHeadsInBrowserCheckFn 15007 . 15277) (
NC.EnableBravoToTEditConversionFetchFn 15279 . 15559) (NC.EnableBravoToTEditConversionSelectionFn 
15561 . 16009) (NC.DefaultFontFetchFn 16011 . 16417) (NC.DefaultFontSelectionFn 16419 . 16683) (
NC.GetFontFromUser 16685 . 17956) (NC.FontFaceShorthand 17958 . 18750)))))
STOP