(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10)
(FILECREATED "13-Oct-88 18:03:11" {QV}<NOTECARDS>1.3MNEXT>NCPARAMETERS.;1 37374  

      previous date%: "31-May-88 15:54:49" {QV}<NOTECARDS>1.3LNEXT>NCPARAMETERS.;5)


(* "
Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation.  All rights reserved.
")

(PRETTYCOMPRINT NCPARAMETERSCOMS)

(RPAQQ NCPARAMETERSCOMS
       (

(* ;;; "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 NC.ShowNoteFileOnCards NC.IncludeCardObjectInShowInfo 
               NC.SpecialBrowserSpecsFlg NC.AnnoFlg NC.LinkDashingInBrowser NC.ArrowHeadsInBrowser 
               NC.EnableBravoToTEditConversionFlg NC.DefaultFont NC.LinkIconFont 
               NC.NoteFileIndicatorFont NC.MenuFont NC.DefaultCardType NC.BringUpCardAtOldPosFlg 
               NC.CloseCardsOffScreenFlg NC.NoteCardsParameters NC.SpecialBrowserMiddleButtonFn 
               NCINITIALGLOBALPARAMS NC.UseDeletedLinkIconIndicatorsFlg NC.DelTEditProcessAtShrinkFlg
               NC.UserSpecifiedTEditProps NC.AskTEditPropsWindowWidth NC.AskTEditPropsWindowHeight 
               NC.NoteFileMenuLingerFlg NC.DefaultIndexSizeInEntries NC.MsgDelay 
               NC.LinkIconMultiLineMode NC.LinkIconMaxWidth)
        (INITVARS (NC.FixedMenuFlg NIL)
               (NC.ShortWindowMenuFlg T)
               (NC.ShowNoteFileOnCards T)
               (NC.IncludeCardObjectInShowInfo NIL)
               (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.LinkDashingInBrowser NIL)
               (NC.ArrowHeadsInBrowser 'None)
               (NC.MainMenuPosition NIL)
               (NC.SpecialBrowserSpecsFlg NIL)
               (NC.AnnoFlg NIL)
               (NC.DefaultCardType 'Text)
               (NC.CloseCardsOffScreenFlg NIL)
               (NC.BringUpCardAtOldPosFlg NIL)
               (NC.EnableBravoToTEditConversionFlg NIL)
               (NC.DefaultFont (FONTCREATE 'TimesRoman 12))
               (NC.LinkIconFont (FONTCREATE 'HELVETICA 10 'BOLD))
               (NC.NoteFileIndicatorFont (FONTCREATE 'HELVETICA 10 'BOLD))
               (NC.MenuFont (FONTCREATE 'HELVETICA 10 'BOLD))
               (NCINITIALGLOBALPARAMS NIL)
               (NC.UseDeletedLinkIconIndicatorsFlg T)
               (NC.DelTEditProcessAtShrinkFlg NIL)
               (NC.UserSpecifiedTEditProps NIL)
               (NC.AskTEditPropsWindowWidth 425)
               (NC.AskTEditPropsWindowHeight 70)
               (NC.NoteFileMenuLingerFlg T)
               (NC.DefaultIndexSizeInEntries 1000)
               (NC.MsgDelay 1500)
               (NC.LinkIconMultiLineMode NIL)
               (NC.LinkIconMaxWidth SCREENWIDTH))
        (GLOBALVARS NC.ListOfFontFamilies NC.ListOfFontSizes NC.ListOfFontFaces)
        [INITVARS (NC.ListOfFontFamilies '(TIMESROMAN HELVETICA GACHA CLASSIC MODERN TERMINAL TITAN 
                                                 CREAM OLDENGLISH))
               (NC.ListOfFontSizes '(8 9 10 11 12 14 18 24 30 36))
               (NC.ListOfFontFaces '(STANDARD BOLD ITALIC BOLDITALIC]
        [INITPROPS (NC.NoteCardsParameters (DefaultCardType (NC.DefaultCardType EVAL 
                                                                   NC.DefaultCardTypeSelectionFn 
                                                                   NC.DefaultCardTypeCheckFn))
                          (MenuLingersAfterNoteFileClose NC.NoteFileMenuLingerFlg)
                          (ShowNoteFileOnCards NC.ShowNoteFileOnCards)
                          (NewNoteFileInitialSize (NC.DefaultIndexSizeInEntries EVAL 
                                                         NC.SetNewFileInitialSize NIL))
                          (ForceFiling NC.ForceFilingFlg)
                          (ForceTitles NC.ForceTitlesFlg)
                          (CloseCardsOffScreen NC.CloseCardsOffScreenFlg)
                          (BringUpCardsAtPreviousPos NC.BringUpCardAtOldPosFlg)
                          (MarkersInFileBoxes NC.MarkersInFileBoxesFlg)
                          (AlphabetizedFileBoxChildren NC.AlphabetizedFileBoxChildrenFlg)
                          (DefaultLinkIconAttachBitmap (NC.LinkIconAttachBitmapFlg NIL 
                                                              NC.DefaultLinkIconParametersSelectionFn
                                                              NIL))
                          (DefaultLinkIconShowTitle (NC.LinkIconShowTitleFlg NIL 
                                                           NC.DefaultLinkIconParametersSelectionFn 
                                                           NIL))
                          (DefaultLinkIconShowLinkType (NC.LinkIconShowLinkTypeFlg NIL 
                                                              NC.DefaultLinkIconParametersSelectionFn
                                                              NIL))
                          (UseDeletedLinkIconIndicators NC.UseDeletedLinkIconIndicatorsFlg)
                          (DelTEditProcessWhenShrinking NC.DelTEditProcessAtShrinkFlg)
                          (ExtraTEditProps (NC.UserSpecifiedTEditProps EVAL 
                                                  NC.UserSpecifiedTEditPropsSelectionFn 
                                                  NC.UserSpecifiedTEditPropsCheckFn))
                          (EnableBravoToTEditConversion (NC.EnableBravoToTEditConversionFlg 
                                                               NC.EnableBravoToTEditConversionFetchFn
                                                               
                                                           NC.EnableBravoToTEditConversionSelectionFn
                                                               NIL))
                          (IncludeCardObjectInShowInfo NC.IncludeCardObjectInShowInfo)
                          (LinkDashingInBrowsers NC.LinkDashingInBrowser)
                          (ArrowHeadsInBrowsers (NC.ArrowHeadsInBrowser EVAL 
                                                       NC.ArrowHeadsInBrowserSelectionFn 
                                                       NC.ArrowHeadsInBrowserCheckFn))
                          (SpecialBrowserSpecs NC.SpecialBrowserSpecsFlg)
                          (DefaultFont (NC.DefaultFont NC.DefaultFontFetchFn 
                                              NC.DefaultFontSelectionFn FONTP))
                          (LinkIconFont (NC.LinkIconFont NC.DefaultFontFetchFn 
                                               NC.DefaultFontSelectionFn FONTP))
                          (MenuFont (NC.MenuFont NC.DefaultFontFetchFn NC.DefaultFontSelectionFn 
                                           FONTP NC.MenuFontAfterChangeFn))
                          (NoteFileIndicatorFont (NC.NoteFileIndicatorFont NC.DefaultFontFetchFn 
                                                        NC.DefaultFontSelectionFn FONTP))
                          (LinkIconMultiLineMode NC.LinkIconMultiLineMode)
                          (LinkIconMaxWidthInPixels (NC.LinkIconMaxWidth EVAL NC.SetLinkIconMaxWidth
                                                           NIL))
                          (LinkIconBorderWidth (NC.LinkIconBorderWidth EVAL NC.SetLinkIconBorderWidth
                                                      NIL))
                          (NewCrossFileLinksMode (NC.NewCrossFileLinksMode EVAL 
                                                        NC.NewCrossFileLinksModeSelectionFn 
                                                        NC.NewCrossFileLinksModeCheckFn]
        [INITVARS (NC.NoteCardsParameters (PROPNAMES 'NC.NoteCardsParameters]
        

(* ;;; "Parameter Inspector & Editor")

        (FNS NC.BuildInspector NC.InspectorFetchFn NC.InspectorSelectionFn 
             NC.DefaultCardTypeSelectionFn NC.DefaultCardTypeCheckFn 
             NC.ArrowHeadsInBrowserSelectionFn NC.ArrowHeadsInBrowserCheckFn 
             NC.EnableBravoToTEditConversionFetchFn NC.EnableBravoToTEditConversionSelectionFn 
             NC.DefaultFontFetchFn NC.DefaultFontSelectionFn NC.GetFontFromUser NC.FontFaceShorthand
             NC.UserSpecifiedTEditPropsSelectionFn NC.UserSpecifiedTEditPropsCheckFn 
             NC.DefaultLinkIconParametersSelectionFn NC.ClearAllLinkIconImageBoxCaches 
             NC.SetNewFileInitialSize NC.MenuFontAfterChangeFn NC.NewCrossFileLinksModeSelectionFn 
             NC.NewCrossFileLinksModeCheckFn)
        (FNS NC.SetLinkIconMaxWidth NC.SetLinkIconBorderWidth)
        (PROP (FILETYPE MAKEFILE-ENVIRONMENT)
              NCPARAMETERS)))



(* ;;; "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 NC.ShowNoteFileOnCards NC.IncludeCardObjectInShowInfo 
       NC.SpecialBrowserSpecsFlg NC.AnnoFlg NC.LinkDashingInBrowser NC.ArrowHeadsInBrowser 
       NC.EnableBravoToTEditConversionFlg NC.DefaultFont NC.LinkIconFont NC.NoteFileIndicatorFont 
       NC.MenuFont NC.DefaultCardType NC.BringUpCardAtOldPosFlg NC.CloseCardsOffScreenFlg 
       NC.NoteCardsParameters NC.SpecialBrowserMiddleButtonFn NCINITIALGLOBALPARAMS 
       NC.UseDeletedLinkIconIndicatorsFlg NC.DelTEditProcessAtShrinkFlg NC.UserSpecifiedTEditProps 
       NC.AskTEditPropsWindowWidth NC.AskTEditPropsWindowHeight NC.NoteFileMenuLingerFlg 
       NC.DefaultIndexSizeInEntries NC.MsgDelay NC.LinkIconMultiLineMode NC.LinkIconMaxWidth)
)

(RPAQ? NC.FixedMenuFlg NIL)

(RPAQ? NC.ShortWindowMenuFlg T)

(RPAQ? NC.ShowNoteFileOnCards T)

(RPAQ? NC.IncludeCardObjectInShowInfo NIL)

(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.LinkDashingInBrowser NIL)

(RPAQ? NC.ArrowHeadsInBrowser 'None)

(RPAQ? NC.MainMenuPosition NIL)

(RPAQ? NC.SpecialBrowserSpecsFlg NIL)

(RPAQ? NC.AnnoFlg NIL)

(RPAQ? NC.DefaultCardType 'Text)

(RPAQ? NC.CloseCardsOffScreenFlg NIL)

(RPAQ? NC.BringUpCardAtOldPosFlg NIL)

(RPAQ? NC.EnableBravoToTEditConversionFlg NIL)

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

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

(RPAQ? NC.NoteFileIndicatorFont (FONTCREATE 'HELVETICA 10 'BOLD))

(RPAQ? NC.MenuFont (FONTCREATE 'HELVETICA 10 'BOLD))

(RPAQ? NCINITIALGLOBALPARAMS NIL)

(RPAQ? NC.UseDeletedLinkIconIndicatorsFlg T)

(RPAQ? NC.DelTEditProcessAtShrinkFlg NIL)

(RPAQ? NC.UserSpecifiedTEditProps NIL)

(RPAQ? NC.AskTEditPropsWindowWidth 425)

(RPAQ? NC.AskTEditPropsWindowHeight 70)

(RPAQ? NC.NoteFileMenuLingerFlg T)

(RPAQ? NC.DefaultIndexSizeInEntries 1000)

(RPAQ? NC.MsgDelay 1500)

(RPAQ? NC.LinkIconMultiLineMode NIL)

(RPAQ? NC.LinkIconMaxWidth SCREENWIDTH)
(DECLARE%: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.ListOfFontFamilies NC.ListOfFontSizes NC.ListOfFontFaces)
)

(RPAQ? NC.ListOfFontFamilies '(TIMESROMAN HELVETICA GACHA CLASSIC MODERN TERMINAL TITAN CREAM 
                                         OLDENGLISH))

(RPAQ? NC.ListOfFontSizes '(8 9 10 11 12 14 18 24 30 36))

(RPAQ? NC.ListOfFontFaces '(STANDARD BOLD ITALIC BOLDITALIC))

[LOADINITPROPS (NC.NoteCardsParameters (DefaultCardType (NC.DefaultCardType EVAL 
                                                               NC.DefaultCardTypeSelectionFn 
                                                               NC.DefaultCardTypeCheckFn))
                      (MenuLingersAfterNoteFileClose NC.NoteFileMenuLingerFlg)
                      (ShowNoteFileOnCards NC.ShowNoteFileOnCards)
                      (NewNoteFileInitialSize (NC.DefaultIndexSizeInEntries EVAL 
                                                     NC.SetNewFileInitialSize NIL))
                      (ForceFiling NC.ForceFilingFlg)
                      (ForceTitles NC.ForceTitlesFlg)
                      (CloseCardsOffScreen NC.CloseCardsOffScreenFlg)
                      (BringUpCardsAtPreviousPos NC.BringUpCardAtOldPosFlg)
                      (MarkersInFileBoxes NC.MarkersInFileBoxesFlg)
                      (AlphabetizedFileBoxChildren NC.AlphabetizedFileBoxChildrenFlg)
                      (DefaultLinkIconAttachBitmap (NC.LinkIconAttachBitmapFlg NIL 
                                                          NC.DefaultLinkIconParametersSelectionFn NIL
                                                          ))
                      (DefaultLinkIconShowTitle (NC.LinkIconShowTitleFlg NIL 
                                                       NC.DefaultLinkIconParametersSelectionFn NIL))
                      (DefaultLinkIconShowLinkType (NC.LinkIconShowLinkTypeFlg NIL 
                                                          NC.DefaultLinkIconParametersSelectionFn NIL
                                                          ))
                      (UseDeletedLinkIconIndicators NC.UseDeletedLinkIconIndicatorsFlg)
                      (DelTEditProcessWhenShrinking NC.DelTEditProcessAtShrinkFlg)
                      (ExtraTEditProps (NC.UserSpecifiedTEditProps EVAL 
                                              NC.UserSpecifiedTEditPropsSelectionFn 
                                              NC.UserSpecifiedTEditPropsCheckFn))
                      (EnableBravoToTEditConversion (NC.EnableBravoToTEditConversionFlg 
                                                           NC.EnableBravoToTEditConversionFetchFn 
                                                           NC.EnableBravoToTEditConversionSelectionFn
                                                           NIL))
                      (IncludeCardObjectInShowInfo NC.IncludeCardObjectInShowInfo)
                      (LinkDashingInBrowsers NC.LinkDashingInBrowser)
                      (ArrowHeadsInBrowsers (NC.ArrowHeadsInBrowser EVAL 
                                                   NC.ArrowHeadsInBrowserSelectionFn 
                                                   NC.ArrowHeadsInBrowserCheckFn))
                      (SpecialBrowserSpecs NC.SpecialBrowserSpecsFlg)
                      (DefaultFont (NC.DefaultFont NC.DefaultFontFetchFn NC.DefaultFontSelectionFn 
                                          FONTP))
                      (LinkIconFont (NC.LinkIconFont NC.DefaultFontFetchFn NC.DefaultFontSelectionFn
                                           FONTP))
                      (MenuFont (NC.MenuFont NC.DefaultFontFetchFn NC.DefaultFontSelectionFn FONTP 
                                       NC.MenuFontAfterChangeFn))
                      (NoteFileIndicatorFont (NC.NoteFileIndicatorFont NC.DefaultFontFetchFn 
                                                    NC.DefaultFontSelectionFn FONTP))
                      (LinkIconMultiLineMode NC.LinkIconMultiLineMode)
                      (LinkIconMaxWidthInPixels (NC.LinkIconMaxWidth EVAL NC.SetLinkIconMaxWidth NIL)
                             )
                      (LinkIconBorderWidth (NC.LinkIconBorderWidth EVAL NC.SetLinkIconBorderWidth NIL
                                                  ))
                      (NewCrossFileLinksMode (NC.NewCrossFileLinksMode EVAL 
                                                    NC.NewCrossFileLinksModeSelectionFn 
                                                    NC.NewCrossFileLinksModeCheckFn]

(RPAQ? NC.NoteCardsParameters (PROPNAMES 'NC.NoteCardsParameters))



(* ;;; "Parameter Inspector & Editor")

(DEFINEQ

(NC.BuildInspector
  (LAMBDA NIL                                                (* pmi%: "15-May-87 15:32")
          
          (* * Build and dislay an inspector window on the user tailoring flgs)
          
          (* * rht 5/1/86%: Now flashes existing window instead of moving it.)
          
          (* * pmi 5/15/87%: Removed NC.InspectorTitleCommandFn
          (TITLECOMMANDFN arg) from call to INSPECTW.CREATE)

    (DECLARE (GLOBALVARS NC.NoteCardsParameters))
    (PROG (InspectWindow)
          (COND
             ((SETQ InspectWindow (for Window in (OPENWINDOWS) when (WINDOWPROP Window '
                                                                           NoteCardsInspector)
                                     do (RETURN Window)))
              (FLASHW InspectWindow))
             (T (SETQ InspectWindow (INSPECTW.CREATE T NC.NoteCardsParameters (FUNCTION 
                                                                               NC.InspectorFetchFn)
                                           NIL NIL NIL NIL "NoteCards Session Parameters"
                                           (FUNCTION NC.InspectorSelectionFn)
                                           NIL NIL))
                (WINDOWPROP InspectWindow 'NoteCardsInspector T))))))

(NC.InspectorFetchFn
  (LAMBDA (Object Property)                                  (* rht%: " 1-May-86 17:12")
          
          (* * 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.)

    (LET ((ParameterInfo (GETPROP '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))
         (COND
            (FetchFn (APPLY* FetchFn GlobalVar))
            ((EVAL GlobalVar)
             'Yes)
            (T 'No)))))

(NC.InspectorSelectionFn
  (LAMBDA (Property ValueFlg InspectWindow)                  (* pmi%: " 6-Apr-87 12:20")
          
          (* * 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.)
          
          (* * rht 5/1/86%: Now can toggle either by clicking attribute or value.)
          
          (* * pmi 4/1/87%: Added fifth field to GLOBALPARAMETER record%: 
          PARAMAFTERCHANGEFN. This function is called after the Global parameter has been 
          changed.)
          
          (* * pmi 4/6/87%: Added check for non-NIL AfterChangeFn before trying to apply 
          it to the GlobalVar.)

    (PROG (Answer (ParameterInfo (GETPROP 'NC.NoteCardsParameters Property))
                 SelectionFn AfterChangeFn GlobalVar)
          (if (LISTP ParameterInfo)
              then (SETQ GlobalVar (fetch (GLOBALPARAMETER PARAMGLOBALVAR) of ParameterInfo))
                   (SETQ SelectionFn (fetch (GLOBALPARAMETER PARAMSELECTIONFN) of ParameterInfo))
                   (SETQ AfterChangeFn (fetch (GLOBALPARAMETER PARAMAFTERCHANGEFN) of ParameterInfo))
            else (SETQ GlobalVar ParameterInfo))
          (COND
             (SelectionFn (if (NEQ 'NOTCHANGED (SETQ Answer (APPLY* SelectionFn GlobalVar)))
                              then (SET GlobalVar Answer)
                                   (if AfterChangeFn
                                       then (APPLY* AfterChangeFn GlobalVar))
                                   (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%: "12-Jun-87 11:56")
          
          (* * Let user choose from a menu of card types.)
          
          (* * pmi 3/25/87%: Added NC.MenuFont to all menus and cleaned up to use 
          NC.NoteCardTypeMenu)
          
          (* * rht 6/12/87%: Somehow this was broken in such a way that it wasn't calling 
          MENU when NC.NoteCardTypeMenu was bound.)

    (DECLARE (GLOBALVARS NC.NoteCardTypeMenu NC.MenuFont))
    (OR (AND (BOUNDP 'NC.NoteCardTypeMenu)
             (type? MENU NC.NoteCardTypeMenu))
        (SETQ NC.NoteCardTypeMenu (create MENU
                                         ITEMS ← (NC.ListOfCardTypes T)
                                         CENTERFLG ← T
                                         TITLE ← "Card Types"
                                         MENUFONT ← NC.MenuFont
                                         ITEMHEIGHT ← (IPLUS (FONTPROP NC.MenuFont 'HEIGHT)
                                                             1))))
    (OR (MENU NC.NoteCardTypeMenu (CREATEPOSITION LASTMOUSEX LASTMOUSEY))
        '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)                                        (* pmi%: "25-Mar-87 10:03")
          
          (* * Ask user for new value from a menu of choices.)
          
          (* * pmi 3/25/87%: Added NC.MenuFont to all menus and cleaned up for 
          consistency.)

    (DECLARE (GLOBALVARS NC.MenuFont))
    (OR (MENU (create MENU
                     ITEMS ← '((At% Midpoint 'AtMidpoint 
                                      "Place arrow heads at midpoints of browser links.")
                               (At% Endpoint 'AtEndpoint 
                                      "Place arrow heads at endpoints of browser links.")
                               (None 'None "Do not draw arrow heads in browsers."))
                     TITLE ← " Arrow Head Types "
                     CENTERFLG ← T
                     MENUFONT ← NC.MenuFont
                     ITEMHEIGHT ← (IPLUS (FONTPROP NC.MenuFont 'HEIGHT)
                                         1)))
        'NOTCHANGED)))

(NC.ArrowHeadsInBrowserCheckFn
  (LAMBDA (CandidateVar)                                     (* rht%: "18-Mar-85 18:36")
          
          (* * Check candidate against list of possible values.)

    (FMEMB CandidateVar '(AtMidpoint AtEndpoint None))))

(NC.EnableBravoToTEditConversionFetchFn
  (LAMBDA (GlobalVar)                                        (* rht%: "19-Mar-85 10:36")
          
          (* * Just convert T/NIL to Yes/No.)

    (if (EVAL GlobalVar)
        then 'Yes
      else '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 `((\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 'FAMILY)
                        (FONTPROP Font 'SIZE)
                        (NC.FontFaceShorthand (FONTPROP Font 'FACE)))))))

(NC.DefaultFontSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht%: "19-Mar-85 11:15")
          
          (* * Just go get a font from the user.)

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

(NC.GetFontFromUser
  (LAMBDA (CurrentFont)                                      (* ; "Edited  3-Dec-87 18:59 by rht:")
          
          (* * Get a font from the user. Current font characteristics serve as the 
          default.)
          
          (* * fgh |6/5/86| Fixed so that never returns a font it cannot find.
          If font is not found, returns old font.)
          
          (* * rht 2/7/87%: Fixed bug |#411:| now returns NIL when stylesheet was 
          aborted. Also does nicer things with prompt window in case of bad font choice.
          Lists of font families, sizes, and faces are now in global vars so users can 
          change them in their init files.)

    (DECLARE (GLOBALVARS NC.ListOfFontFamilies NC.ListOfFontSizes NC.ListOfFontFaces))
    (LET ((Answer (STYLESHEET (CREATE.STYLE 'TITLE "Please select a font:" 'ITEM.TITLES
                                     '(Family Size Face)
                                     'ITEM.TITLE.FONT
                                     '(TIMESROMAN 12 BOLD)
                                     'ITEMS
                                     (LIST (create MENU
                                                  ITEMS ← NC.ListOfFontFamilies)
                                           (create MENU
                                                  ITEMS ← (SORT NC.ListOfFontSizes))
                                           (create MENU
                                                  ITEMS ← NC.ListOfFontFaces))
                                     'SELECTIONS
                                     (LIST (FONTPROP CurrentFont 'FAMILY)
                                           (FONTPROP CurrentFont 'SIZE)
                                           (NC.FontFaceShorthand (FONTPROP CurrentFont 'FACE)))
                                     'NEED.NOT.FILL.IN NIL))))
         (RESETLST (RESETSAVE (SETQ HELPFLAG NIL)
                          `(SETQ HELPFLAG ,(KWOTE HELPFLAG)))
                (COND
                   ((NULL Answer)
                    NIL)
                   ((CAR (NLSETQ (APPLY (FUNCTION FONTCREATE)
                                        Answer))))
                   (T (NC.PrintMsg (LET ((InspectWindow (for Window in (OPENWINDOWS)
                                                           when (WINDOWPROP Window '
                                                                       NoteCardsInspector)
                                                           do (RETURN Window)))
                                         PromptWin)
                                        (if (AND InspectWindow (SETQ PromptWin (GETPROMPTWINDOW
                                                                                InspectWindow)))
                                            then (FLASHW PromptWin)
                                                 PromptWin
                                          else NIL))
                             T "Cannot find font: " Answer)
                      NIL))))))

(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 '(MEDIUM REGULAR REGULAR))
           (Italic '(MEDIUM ITALIC REGULAR))
           (Bold '(BOLD REGULAR REGULAR))
           (BoldItalic '(BOLD ITALIC REGULAR)))
          (RETURN (COND
                     ((EQUAL FontFace Regular)
                      'STANDARD)
                     ((EQUAL FontFace Italic)
                      'ITALIC)
                     ((EQUAL FontFace Bold)
                      'BOLD)
                     ((EQUAL FontFace BoldItalic)
                      'BOLDITALIC)
                     (T FontFace))))))

(NC.UserSpecifiedTEditPropsSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht%: " 1-May-86 21:24")
          
          (* * Get the user's tedit props by letting her type in a TTYIN window.)

    (LET ((TTYINWindow (CREATEW (CREATEREGION LASTMOUSEX LASTMOUSEY NC.AskTEditPropsWindowWidth 
                                       NC.AskTEditPropsWindowHeight)
                              "TEdit Props?"))
          (OldValue (EVAL GlobalVar))
          NewValue)
         (NC.MoveWindowOntoScreen TTYINWindow)
         (PRIN1 (CONCAT "Type sequence of pairs of attributes and values" (CHARACTER 13)
                       "followed by carriage return."
                       (CHARACTER 13)
                       "(Preface expressions with ctrl-Y to have them eval'ed.)"
                       (CHARACTER 13))
                TTYINWindow)
         (SETQ NewValue (RESETFORM (TTYDISPLAYSTREAM TTYINWindow)
                               (CAR (NLSETQ (TTYIN ">> " NIL NIL '(LISPXREAD) NIL NIL OldValue T)))))
         (CLOSEW TTYINWindow)
         (if (NC.UserSpecifiedTEditPropsCheckFn NewValue)
             then NewValue
           else (NC.PrintMsg NIL T "List must contain an even number of items.")
                (FLASHW PROMPTWINDOW)
                OldValue))))

(NC.UserSpecifiedTEditPropsCheckFn
  (LAMBDA (CandidateVar)                                     (* rht%: " 1-May-86 18:34")
          
          (* * Check that candidate is a list of pairs.)

    (OR (NULL CandidateVar)
        (AND (LISTP CandidateVar)
             (EVENP (LENGTH CandidateVar))))))

(NC.DefaultLinkIconParametersSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht%: "18-Nov-86 15:23")
          
          (* * Toggle setting of parameter and then update every card on the screen.)
          
          (* * fgh |6/5/86| First created.)
          
          (* * rht 11/18/86%: Commented out the clearing of all link icon caches.
          This functionality should be made available somewhere else than the session 
          params window.)

    (PROG1 (COND
              ((EVAL GlobalVar)
               (SET GlobalVar NIL))
              (T (SET GlobalVar T)))                         (* NC.ClearAllLinkIconImageBoxCaches)
           )))

(NC.ClearAllLinkIconImageBoxCaches
  (LAMBDA NIL                                                (* fgh%: " 5-Jun-86 18:01")
          
          (* * FOr all cards on the screen, clear the image box caches for all the link 
          icons in thee cards)
          
          (* * fgh |6/5/86| First created.)

    (bind Card for Window in (OPENWINDOWS) when (SETQ Card (NC.CoerceToCard Window))
       do (for LinkIcon in (CAR (NC.CollectReferences Card NIL T NIL))
             do (IMAGEOBJPROP LinkIcon 'BOUNDBOX (NC.LinkIconImageBoxFn LinkIcon (WINDOWPROP
                                                                                  Window
                                                                                  'DSP)))
                (if (WINDOWPROP Window 'TEXTSTREAM)
                    then (TEDIT.OBJECT.CHANGED (TEXTSTREAM Window)
                                LinkIcon)
                  else (REDISPLAYW Window))))))

(NC.SetNewFileInitialSize
  (LAMBDA NIL                                                (* kirk%: "14-Aug-86 21:11")
          
          (* * kirk 14Aug86 first created)

    (OR (RNUMBER "Initial Size of New NoteFiles" NIL NIL NIL T NIL)
        NC.DefaultIndexSizeInEntries)))

(NC.MenuFontAfterChangeFn
  (LAMBDA (GlobalVar)                                        (* pmi%: " 1-Apr-87 14:14")
          
          (* * pmi 4/1/87%: Reset menu global variables to force their recomputation 
          later.)

    (NC.ResetCachedMenus)))

(NC.NewCrossFileLinksModeSelectionFn
  (LAMBDA (GlobalVar)                                        (* rht%: " 3-Jun-87 18:13")
          
          (* * Ask user for new value from a menu of choices.)

    (DECLARE (GLOBALVARS NC.MenuFont))
    (OR (MENU (create MENU
                     ITEMS ← '((Two-way 'TWOWAY 
           "Make new cross-file links be two-way, i.e. back link is created in destination notefile."
                                      )
                               (One-way 'ONEWAY 
      "Make new cross-file links be one-way, i.e. no record of link is made in destination notefile."
                                      )
                               (Ask% User 'ASK 
                         "Ask user to find out whether cross-file link should be one-way or two-way."
                                      ))
                     TITLE ← "New cross-file links mode"
                     CENTERFLG ← T
                     MENUFONT ← NC.MenuFont
                     ITEMHEIGHT ← (IPLUS (FONTPROP NC.MenuFont 'HEIGHT)
                                         1)))
        'NOTCHANGED)))

(NC.NewCrossFileLinksModeCheckFn
  (LAMBDA (CandidateVar)                                     (* rht%: " 3-Jun-87 18:07")
          
          (* * Check candidate against list of possible values.)

    (FMEMB CandidateVar '(TWOWAY ONEWAY ASK))))
)
(DEFINEQ

(NC.SetLinkIconMaxWidth
  (LAMBDA NIL                                                (* pmi%: "13-Feb-87 14:33")
    (DECLARE (GLOBALVARS NC.LinkIconMaxWidth))
    (LET ((MaxScreenSpace (DIFFERENCE SCREENWIDTH 18))
          NewLinkIconMaxWidth InspectWindow)
         (SETQ NewLinkIconMaxWidth (OR (RNUMBER "Maximum Width of Link Icons (in Pixels)" NIL NIL NIL 
                                              T NIL)
                                       NC.LinkIconMaxWidth))
         (if (GREATERP NewLinkIconMaxWidth MaxScreenSpace)
             then (NC.PrintMsg (if (SETQ InspectWindow (for Window in (OPENWINDOWS)
                                                          when (WINDOWPROP Window 'NoteCardsInspector
                                                                      ) do (RETURN Window)))
                                   then (GETPROMPTWINDOW InspectWindow 1)
                                 else NIL)
                         T "You are limited to screen width of " MaxScreenSpace)
                  MaxScreenSpace
           else NewLinkIconMaxWidth))))

(NC.SetLinkIconBorderWidth
  (LAMBDA NIL                                                (* pmi%: "13-Feb-87 14:33")
    (DECLARE (GLOBALVARS NC.LinkIconBorderWidth))
    (LET ((MaxBorderWidth 20)
          NewLinkIconBorderWidth InspectWindow)
         (SETQ NewLinkIconBorderWidth (OR (RNUMBER "Width of Link Icon Borders (in Pixels)" NIL NIL 
                                                 NIL T NIL)
                                          NC.LinkIconBorderWidth))
         (if (GREATERP NewLinkIconBorderWidth MaxBorderWidth)
             then (NC.PrintMsg (if (SETQ InspectWindow (for Window in (OPENWINDOWS)
                                                          when (WINDOWPROP Window 'NoteCardsInspector
                                                                      ) do (RETURN Window)))
                                   then (GETPROMPTWINDOW InspectWindow 1)
                                 else NIL)
                         T "You are limited to a maximum border width of " MaxBorderWidth)
                  MaxBorderWidth
           else NewLinkIconBorderWidth))))
)

(PUTPROPS NCPARAMETERS FILETYPE :TCOMPL)

(PUTPROPS NCPARAMETERS MAKEFILE-ENVIRONMENT (:PACKAGE "IL" :READTABLE "INTERLISP" :BASE 10))
(PUTPROPS NCPARAMETERS COPYRIGHT ("Xerox Corporation" 1984 1985 1986 1987 1988))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (16481 34826 (NC.BuildInspector 16491 . 17792) (NC.InspectorFetchFn 17794 . 19026) (
NC.InspectorSelectionFn 19028 . 21589) (NC.DefaultCardTypeSelectionFn 21591 . 22781) (
NC.DefaultCardTypeCheckFn 22783 . 23005) (NC.ArrowHeadsInBrowserSelectionFn 23007 . 24048) (
NC.ArrowHeadsInBrowserCheckFn 24050 . 24307) (NC.EnableBravoToTEditConversionFetchFn 24309 . 24572) (
NC.EnableBravoToTEditConversionSelectionFn 24574 . 25028) (NC.DefaultFontFetchFn 25030 . 25419) (
NC.DefaultFontSelectionFn 25421 . 25675) (NC.GetFontFromUser 25677 . 28740) (NC.FontFaceShorthand 
28742 . 29575) (NC.UserSpecifiedTEditPropsSelectionFn 29577 . 30897) (
NC.UserSpecifiedTEditPropsCheckFn 30899 . 31204) (NC.DefaultLinkIconParametersSelectionFn 31206 . 
31897) (NC.ClearAllLinkIconImageBoxCaches 31899 . 32894) (NC.SetNewFileInitialSize 32896 . 33178) (
NC.MenuFontAfterChangeFn 33180 . 33442) (NC.NewCrossFileLinksModeSelectionFn 33444 . 34572) (
NC.NewCrossFileLinksModeCheckFn 34574 . 34824)) (34827 37118 (NC.SetLinkIconMaxWidth 34837 . 35970) (
NC.SetLinkIconBorderWidth 35972 . 37116)))))
STOP