(FILECREATED "20-Mar-85 18:18:14" {PHYLUM}<NOTECARDS>RELEASE1.2>NCPARAMETERS.;14 18016 changes to: (VARS NCPARAMETERSCOMS) (RECORDS GLOBALPARAMETER) (FNS NC.InspectorFetchFn NC.InspectorSelectionFn NC.DefaultCardTypeSelectionFn NC.DefaultCardTypeCheckFn NC.ArrowHeadsInBrowserSelectionFn NC.ArrowHeadsInBrowserCheckFn NC.EnableBravoToTEditConversionFetchFn NC.EnableBravoToTEditConversionSelectionFn NC.DefaultFontFetchFn NC.DefaultFontSelectionFn NC.GetFontFromUser) previous date: "17-Mar-85 23:06:24" {PHYLUM}<NOTECARDS>RELEASE1.2>NCPARAMETERS.;13) (* 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.GCGAGFlg NC.AdviseWindowMenuFlg NC.ForceSourcesFlg NC.ForceFilingFlg NC.ForceTitlesFlg NC.MarkersInFileBoxesFlg 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.NoteCardsParameters NC.SpecialBrowserMiddleButtonFn) (INITVARS (NC.FixedMenuFlg NIL) (NC.GCGAGFlg NIL) (NC.ShortWindowMenuFlg T) (NC.ForceSourcesFlg NIL) (NC.ForceFilingFlg T) (NC.ForceTitlesFlg T) (NC.MarkersInFileBoxesFlg T) (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.EnableBravoToTEditConversionFlg NIL) (NC.DefaultFont (FONTCREATE (QUOTE TimesRoman) 12)) (NC.LinkIconFont (FONTCREATE (QUOTE HELVETICA) 10 (QUOTE BOLD)))) (VARS (NC.NoteCardsParameters (QUOTE (DefaultCardType FixedTopLevelMenu ShortWindowMenus ForceSources ForceFiling ForceTitles MarkersInFileBoxes 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 MarkersInFileBoxes NC.MarkersInFileBoxesFlg 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 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 "20-Mar-85 18:18:20") (UNMARKASCHANGED (QUOTE NC.SystemDate) (QUOTE VARS)) (* * Tailoring parameters for the user to set.) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS NC.FixedMenuFlg NC.GCGAGFlg NC.AdviseWindowMenuFlg NC.ForceSourcesFlg NC.ForceFilingFlg NC.ForceTitlesFlg NC.MarkersInFileBoxesFlg 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.NoteCardsParameters NC.SpecialBrowserMiddleButtonFn) ) (RPAQ? NC.FixedMenuFlg NIL) (RPAQ? NC.GCGAGFlg NIL) (RPAQ? NC.ShortWindowMenuFlg T) (RPAQ? NC.ForceSourcesFlg NIL) (RPAQ? NC.ForceFilingFlg T) (RPAQ? NC.ForceTitlesFlg T) (RPAQ? NC.MarkersInFileBoxesFlg T) (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.EnableBravoToTEditConversionFlg NIL) (RPAQ? NC.DefaultFont (FONTCREATE (QUOTE TimesRoman) 12)) (RPAQ? NC.LinkIconFont (FONTCREATE (QUOTE HELVETICA) 10 (QUOTE BOLD))) (RPAQQ NC.NoteCardsParameters (DefaultCardType FixedTopLevelMenu ShortWindowMenus ForceSources ForceFiling ForceTitles MarkersInFileBoxes 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 MarkersInFileBoxes NC.MarkersInFileBoxesFlg 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 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 (8727 17928 (NC.BuildInspector 8737 . 9632) (NC.InspectorFetchFn 9634 . 10863) ( NC.InspectorTitleCommandFn 10865 . 11150) (NC.InspectorSelectionFn 11152 . 12999) ( NC.DefaultCardTypeSelectionFn 13001 . 13336) (NC.DefaultCardTypeCheckFn 13338 . 13566) ( NC.ArrowHeadsInBrowserSelectionFn 13568 . 14181) (NC.ArrowHeadsInBrowserCheckFn 14183 . 14453) ( NC.EnableBravoToTEditConversionFetchFn 14455 . 14735) (NC.EnableBravoToTEditConversionSelectionFn 14737 . 15185) (NC.DefaultFontFetchFn 15187 . 15593) (NC.DefaultFontSelectionFn 15595 . 15859) ( NC.GetFontFromUser 15861 . 17132) (NC.FontFaceShorthand 17134 . 17926))))) STOP