9
$\begingroup$

tl;dr

I'm interested in finding a complete list of the strings that can be passed to FrontEndResource (I only need the first string, in the cases where two strings would normally be passed)

Full explanation

I've been playing with button appearances recently and I stumbled upon the "FEExpressions" argument to FrontEndResource.

This is great as it significantly improves the appearances of the my various interface components, particularly buttons and panels, as many appearances are documented there:

Button[
 Style["Orange Button", White],
 Appearance -> 
  FrontEndResource["FEExpressions", 
      "OrangeButtonNinePatchAppearance"]
 ]

which generates the following button set:

Orange buttons

Or they can be constructed from what's there already:

 Panel[
  InputField["", String],
  Alignment -> Center,
  Appearance -> {
   "Default" ->
     Last@Last@
      FrontEndResource["NotebookTemplatingExpressions", 
       "ButtonDefaultAppearanceCloud"],
   "Hover" ->
     Last@Last@
      FrontEndResource["NotebookTemplatingExpressions", 
        "ButtonOKAppearanceCloud"]
    }
  ]

Input fields

I used my standard scraping procedure on the list of them and got a seemingly pretty comprehensive list:

{
    "ActivationDialog",
    "CellInsertionMenu",
    "CloudDialogs",
    "CodeCaptionsText",
    "CompatibilityToolbarText",
    "ContextMenus",
    "DeployCDFDialog",
    "DrawingToolsDialog",
    "DynamicUpdatingToolbarText",
    "ExportDialogs",
    "FEBitmaps",
    "FEExpressions",
    "FEStrings",
    "FindReplaceDialog",
    "GraphicsInspectorDialog",
    "HeadersFootersDialog",
    "HelpToolbarText",
    "HistoryOverviewDialog",
    "Image3DEditModeMenu",
    "ImageEditModeMenu",
    "ImportDialogs",
    "InsertCitationDialog",
    "LicenseFailureDialog",
    "LocalizedBitmaps",
    "MathematicaClosingDialog",
    "MessageToolbarText",
    "MUnitExpressions",
    "MUnitStrings",
    "NotebookTemplatingBitmaps",
    "NotebookTemplatingExpressions",
    "NotebookTemplatingStrings",
    "PackageToolbarText",
    "PreferencesDialog",
    "ProductSpecificToolbarText",
    "RGBColorValueSelector",
    "RGBColorValueSelectorStrings",
    "SecurityToolbarText",
    "SlideshowToolbarText",
    "StylesheetThumbnails",
    "StylesheetToolbarText",
    "SystemInformationDialog",
    "TemplateBoxTooltips",
    "VersionedStylesheetToolbar",
    "WAStrings",
    "WelcomeScreen",
    "WolframCloudLoginErrors"
    };

Even amongst these there are many things I can't find that I know there are front-end files for, such as the images used in the toolbar buttons:

 Button[
  Style["Special Button", Black],
  Appearance -> {
   "Default" ->
     FrontEnd`FileName[{"Toolbars"}, "Button.9.png"],
   "Hover" -> 
     FrontEnd`FileName[{"Toolbars"}, "Button-Hover.9.png"],
   "Pressed" ->
     FrontEnd`FileName[{"Toolbars"}, "DefaultButton.9.png"]
    }]

enter image description here

Does anyone know how to find a complete list of FrontEndResource strings?


Further reading:

Can one effectively edit a Front End Resource that is already loaded?

How to create and use my own *.tr FrontEndResource and FrontEndResourceString files

$\endgroup$
4
  • $\begingroup$ I think these "resources" are in the files with tr extension in the TextResources directory: FileNames["*.tr", $InstallationDirectory, Infinity] $\endgroup$
    – kglr
    Mar 1, 2017 at 2:05
  • $\begingroup$ Ah! Right you are. {$InstallationDirectory, "FrontEnd", "TextResources", "MiscExpressions.tr"} has @@resource FEExpressions at the top. Let me do a quick scrape and we'll have the names in no time. $\endgroup$
    – b3m2a1
    Mar 1, 2017 at 2:07
  • $\begingroup$ At least for the few I tried, the function FrontEndResource[x] with a single argument ( the "resource" with name x ) gives the full list of text resources under x. E.g. FrontEndResource["ExportDialogs"], First /@ FrontEndResource["FEBitmaps"] etc. $\endgroup$
    – kglr
    Mar 1, 2017 at 2:18
  • $\begingroup$ Yep. That's a behavior I take advantage of when I'm searching for resources. Sorry, got side tracked writing grep stuff. I'll do the scrape in a moment. $\endgroup$
    – b3m2a1
    Mar 1, 2017 at 2:20

1 Answer 1

7
$\begingroup$

Leaving this open for a bit in case someone has an internal way to do this

So kglr found that all of these resources are in the .tr files and a quick glance at the files suggests that they are in files tagged with @@resource <resource_name>.

Grepping for that we find 1656 distinct matches. Selecting those that don't return $Failed from FrontEndResource we get 305 matches.

{
     "actionNoteStringTable" ,
     "ActivationDialog" ,
     "allAutomaticFitStringTable" ,
     "allAutomaticStringTable" ,
     "allNoneAutomaticStringTable" ,
     "allowedDimensionsStringTable" ,
     "animationCountStringTable" ,
     "animationDirectionStringTable" ,
     "animatorElementsStringTable" ,
     "appearanceSizeStringTable" ,
     "appearanceStateStringTable" ,
     "AssertFailedBoxExpression" ,
     "AssertInformationFailedBoxExpression" ,
     "automaticFullStringTable" ,
     "automaticInfinityStringTable" ,
     "backgroundAppearanceOptionsStringTable" ,
     "BasicMathAssistantPalette" ,
     "boolAndAllStringTable" ,
     "boolAndAutomaticStringTable" ,
     "boolNoneAutomaticStringTable" ,
     "boolStringTable" ,
     "browserCategoryElementNotItemOrCategory" ,
     "buttonAlignmentStringTable" ,
     "buttonFrameStringTable" ,
     "buttonSourceStringTable" ,
     "cellContextStringTable" ,
     "cellFrameMarginsStringTable" ,
     "cellFrameStringTable" ,
     "CellInsertionMenu" ,
     "cellLabelPositioningStringTable" ,
     "characterEncodingStringTable" ,
     "ChartElementSchemesPalette" ,
     "CheckBoxChecked" ,
     "CheckBoxMixed" ,
     "CheckBoxUnchecked" ,
     "ClassroomAssistantPalette" ,
     "closedOpenStringTable" ,
     "CloudDialogs" ,
     "CloudLoginDialog" ,
     "CloudLoginDialogStrings" ,
     "CMYKColorValueSelectorStrings" ,
     "codeAssistIncludedCompletionsStringTable" ,
     "codeAssistMatchingAlgorithmStringTable" ,
     "codeAssistStaticMenuExpr" ,
     "CodeCaptionsText" ,
     "ColorSchemeChooserStrings" ,
     "ColorSchemesPalette" ,
     "colorSetterElementsStringTable" ,
     "columnAlignStringTable" ,
     "columnLinesStringTable" ,
     "commandTargetStringTable" ,
     "CompatibilityToolbarText" ,
     "compressedDataStringTable" ,
     "ConnectSecondaryLinks" ,
     "controlPlacementStringTable" ,
     "controlsRenderingStringTable" ,
     "conversionCellTypesStringTable" ,
     "copySpecialStringTable" ,
     "counterDataStringTable" ,
     "counterFunctionStringTable" ,
     "createGridBoxTypeStringTable" ,
     "DangerousSymbols" ,
     "DateFormat" ,
     "DayNames" ,
     "debuggerBreakpointsWindowContents" ,
     "DebuggerDialogs" ,
     "debuggerStackWindowContents" ,
     "debuggerToolsWindowContents" ,
     "defaultFormatTypeStringTable" ,
     "DefaultInlineFormatTypeStringTable" ,
     "DefaultTemplate" ,
     "DeployCDFDialog" ,
     "dingbatCellStyleStringTable" ,
     "displayImagePixelsStringTable" ,
     "DynamicUpdatingToolbarText" ,
     "evaluationCompletionStringTable" ,
     "evaluationModeStringTable" ,
     "evaluationQueueActionsTable" ,
     "ExpirationDateFormat" ,
     "ExportDialogs" ,
     "extraFrontEndSymbolsTable" ,
     "falseOrAutomaticStringTable" ,
     "FEBitmaps" ,
     "FEExpressions" ,
     "FEStrings" ,
     "fileChangeProtectionStringsTable" ,
     "fileContentsStringTable" ,
     "fileFilters" ,
     "fileLeaderTrailerStringTable" ,
     "FindReplaceDialog" ,
     "firstArgToFunctionBrowserItemNotString" ,
     "fixCoordOrAutomaticAngleStringTable" ,
     "fixCoordOrAutomaticOrFitStringTable" ,
     "fixCoordOrAutomaticStringTable" ,
     "fontPostScriptNameNoteFontStringTable" ,
     "fontsNotListedInFontsMenu" ,
     "fontTypeStringTable" ,
     "fractionMultilineStringTable" ,
     "globalVariableNamesStringTable" ,
     "graphCoord2DHorizontalStringTable" ,
     "graphCoord2DSizeStringTable" ,
     "graphCoord2DStringTable" ,
     "graphCoord2DVerticalStringTable" ,
     "graphics3DRendererStringTable" ,
     "GraphicsInspectorDialog" ,
     "graphicsPrintingFormatStringTable" ,
     "GrayLevelValueSelectorStrings" ,
     "gridboxFrameStringTable" ,
     "groupLikeCellStyleStringTable" ,
     "HeadersFootersDialog" ,
     "HelpBrowserSetup" ,
     "HelpToolbarText" ,
     "HelpViewerHistoryAction" ,
     "HistoryOverviewDialog" ,
     "horizontalAlignStringTable" ,
     "horizontalVerticalStringTable" ,
     "HueValueSelectorStrings" ,
     "hyphenationCharacterStringTable" ,
     "illegalFormatForBoxData" ,
     "illustratorColorsStringTable" ,
     "Image3DEditModeMenu" ,
     "imageCacheContentsStringTable" ,
     "ImageEditModeMenu" ,
     "imageRenderingStringTable" ,
     "imageSizeActionStringTable" ,
     "imageSizeStringTable" ,
     "ImportDialogs" ,
     "indexCreationFormatStringTable" ,
     "InputField" ,
     "InsertCitationDialog" ,
     "inspectorScopeInDialogStringTable" ,
     "inspectorScopeStringTable" ,
     "inspectorViewAsInDialogStringTable" ,
     "inspectorViewAsStringTable" ,
     "KernelPostScriptDefinitions" ,
     "KeyEventTranslations" ,
     "keysStylesStringTable" ,
     "LABColorValueSelectorStrings" ,
     "languageCategoryStringTable" ,
     "languageStringTable" ,
     "LCHColorValueSelectorStrings" ,
     "leftRightBottomTopStringTable" ,
     "leftRightStringTable" ,
     "lhsOfOptionInHelpBrowserItemNotRule" ,
     "LicenseFailureDialog" ,
     "LicensingErrors" ,
     "linebreakSemicolonWeightStringTable" ,
     "LocalizedBitmaps" ,
     "locatorAppearanceStringTable" ,
     "locatorConstraintStringTable" ,
     "LongDateFormat" ,
     "LUVColorValueSelectorStrings" ,
     "magnificationInWindowStringTable" ,
     "magnificationStringTable" ,
     "MainToolbarText" ,
     "manualAutomaticStringTable" ,
     "MathematicaClosingDialog" ,
     "menuAppearanceStringTable" ,
     "messageTimeStampFormat" ,
     "MessageToolbarText" ,
     "MonthNames" ,
     "multilineStringTable" ,
     "NamespaceBoxTooltips" ,
     "NeXTAppOpeningOptionsStringTable" ,
     "ninePatchAppearanceStringTable" ,
     "noArgumentsToFunctionBrowserItem" ,
     "noneAllStringTable" ,
     "noneAutomaticManualStringTable" ,
     "noneAutomaticNumberStringTable" ,
     "noneAutomaticStringTable" ,
     "noRhsNameStringTable" ,
     "notebookFindElementsStringTable" ,
     "notebookOpeningOptionsStringTable" ,
     "notebookRendererStringTable" ,
     "NotebookTemplatingBitmaps" ,
     "NotebookTemplatingExpressions" ,
     "NotebookTemplatingStrings" ,
     "onlyAutomaticStringTable" ,
     "onlyNoneStringTable" ,
     "optionPositionInHelpBrowserItemNotRule" ,
     "PackageTemplate" ,
     "PackageToolbarText" ,
     "pageWidthStringTable" ,
     "paletteTypeCellStyleStringTable" ,
     "paneElementsStringTable" ,
     "paperOrientationStringTable" ,
     "placeholderStringTable" ,
     "PopupMenu" ,
     "PostScriptNameToFontDescription" ,
     "postSelectionStringTable" ,
     "PredictiveInterfaceBitmaps" ,
     "PredictiveInterfaceExpressions" ,
     "PredictiveInterfaceLocalizableBitmaps" ,
     "PredictiveInterfaceStrings" ,
     "preemptiveOrQueuedStringTable" ,
     "PreferencesDialog" ,
     "ProductSpecificToolbarText" ,
     "ProgressBar" ,
     "ProgressBarBackground" ,
     "ProgressBarIndeterminate" ,
     "progressTextBackColor" ,
     "progressTextColor" ,
     "progressTextLocation" ,
     "RadioButtonChecked" ,
     "RadioButtonUnchecked" ,
     "rasterizationResolutionStringTable" ,
     "readingTypeStringTable" ,
     "relativeOrAbsoluteStringTable" ,
     "renderingDeviceStringTable" ,
     "renderingEngineStringTable" ,
     "renderingEngineWinStringTable" ,
     "renderingMethodStringTable" ,
     "reportActionStringTable" ,
     "reportConsoleActionStringTable" ,
     "RGBColorValueSelectorStrings" ,
     "rotationActionStringTable" ,
     "roundingStringTable" ,
     "rowLinesStringTable" ,
     "rulerUnitsStringTable" ,
     "SafeContexts" ,
     "SafeExpressions" ,
     "safeFileOpenStringTable" ,
     "safeFileSaveStringTable" ,
     "saveAsSpecialStringTable" ,
     "scrollPositionStringTable" ,
     "searchTypeCellStyleStringTable" ,
     "SecurityToolbarText" ,
     "selectionMoveDirectionStringTable" ,
     "selectionUnitStringTable" ,
     "ShortDayNames" ,
     "ShortMonthNames" ,
     "showAtStartupStringTable" ,
     "sizeNoteFontStringTable" ,
     "slantNoteFontStringTable" ,
     "sliderAppearanceStringTable" ,
     "SliderBackground2D" ,
     "SliderBar2DHorizontal" ,
     "SliderBar2DVertical" ,
     "SliderBarHorizontal" ,
     "SliderBarVertical" ,
     "SliderThumb2D" ,
     "SliderThumbDownArrow" ,
     "SliderThumbHorizontal" ,
     "SliderThumbLeftArrow" ,
     "SliderThumbRightArrow" ,
     "SliderThumbUpArrow" ,
     "SliderThumbVertical" ,
     "SlideShowPalette" ,
     "SlideshowToolbarText" ,
     "soundPlayerElementsStringTable" ,
     "spanMaxStringTable" ,
     "spanMinStringTable" ,
     "SpecialCharactersPalette" ,
     "specialEditButtonStringTable" ,
     "spellCheckerScopeInDialogStringTable" ,
     "spellingOptionsLanguageStringTable" ,
     "spellingOptionsWordSplittingStringTable" ,
     "spellingOptionsWordTypesStringTable" ,
     "spherCartStringTable" ,
     "statisticsDomainStringTable" ,
     "StyleDialogDockedCell" ,
     "StylesheetThumbnails" ,
     "StylesheetToolbarText" ,
     "synchronousUpdatingStringTable" ,
     "SystemInformationDialog" ,
     "SystemMenuSetup" ,
     "tabFillingStringTable" ,
     "TagBoxTooltips" ,
     "TemplateBoxTooltips" ,
     "textAlignmentStringTable" ,
     "textCapTypeStringTable" ,
     "textClipboardTypeTable" ,
     "TextDirectionIndeterminate" ,
     "textJustificationStringTable" ,
     "textScriptPositionStringTable" ,
     "TokenTranslationDictionary" ,
     "toolStringTable" ,
     "trackingNoteFontStringTable" ,
     "transitionDirectionStringTable" ,
     "transitionDurationStringTable" ,
     "transitionEffectStringTable" ,
     "twoByteSyntaxCharacterAutoReplacementsTable" ,
     "undoInformationDescriptionText" ,
     "URL2HyperlinkTemplate" ,
     "urlPrefixStrings" ,
     "VersionedStylesheetToolbar" ,
     "verticalAlignStringTable" ,
     "viewProjectionStringTable" ,
     "WABitmaps" ,
     "WAExpressions" ,
     "WALocalizableBitmaps" ,
     "WAStrings" ,
     "weightNoteFontStringTable" ,
     "WelcomeScreen" ,
     "windowElementsStringTable" ,
     "windowFrameElementsStringTable" ,
     "windowFrameStringTable" ,
     "windowSizeStringTable" ,
     "windowTitleStringTable" ,
     "windowToolbarsStringTable" ,
     "WolframCloudLoginErrors" ,
     "WolframCloudSyncToolbar" ,
     "WritingAssistantPalette" ,
     "xyAlignmentStringTable" ,
     "XYZColorValueSelectorStrings" 
    }

Of these, 61 have sub-resources (the type of thing I'm most interested in):

{
     "ActivationDialog" ,
     "CloudDialogs" ,
     "CloudLoginDialog" ,
     "CloudLoginDialogStrings" ,
     "CMYKColorValueSelectorStrings" ,
     "CodeCaptionsText" ,
     "ColorSchemeChooserStrings" ,
     "CompatibilityToolbarText" ,
     "DebuggerDialogs" ,
     "DeployCDFDialog" ,
     "DynamicUpdatingToolbarText" ,
     "ExportDialogs" ,
     "FEBitmaps" ,
     "FEExpressions" ,
     "FEStrings" ,
     "FindReplaceDialog" ,
     "GraphicsInspectorDialog" ,
     "GrayLevelValueSelectorStrings" ,
     "HeadersFootersDialog" ,
     "HelpToolbarText" ,
     "HistoryOverviewDialog" ,
     "HueValueSelectorStrings" ,
     "Image3DEditModeMenu" ,
     "ImageEditModeMenu" ,
     "ImportDialogs" ,
     "InsertCitationDialog" ,
     "LABColorValueSelectorStrings" ,
     "LCHColorValueSelectorStrings" ,
     "LicenseFailureDialog" ,
     "LicensingErrors" ,
     "LocalizedBitmaps" ,
     "LUVColorValueSelectorStrings" ,
     "MathematicaClosingDialog" ,
     "MessageToolbarText" ,
     "NotebookTemplatingBitmaps" ,
     "NotebookTemplatingExpressions" ,
     "NotebookTemplatingStrings" ,
     "PackageToolbarText" ,
     "PredictiveInterfaceBitmaps" ,
     "PredictiveInterfaceExpressions" ,
     "PredictiveInterfaceStrings" ,
     "PreferencesDialog" ,
     "ProductSpecificToolbarText" ,
     "RGBColorValueSelectorStrings" ,
     "SecurityToolbarText" ,
     "SlideshowToolbarText" ,
     "StylesheetThumbnails" ,
     "StylesheetToolbarText" ,
     "SystemInformationDialog" ,
     "TemplateBoxTooltips" ,
     "twoByteSyntaxCharacterAutoReplacementsTable" ,
     "undoInformationDescriptionText" ,
     "VersionedStylesheetToolbar" ,
     "WABitmaps" ,
     "WAExpressions" ,
     "WALocalizableBitmaps" ,
     "WAStrings" ,
     "WelcomeScreen" ,
     "WolframCloudLoginErrors" ,
     "WolframCloudSyncToolbar" ,
     "XYZColorValueSelectorStrings" 
    }

And then of these 10 contain "Bitmaps" or "Expressions" in their names:

{
     "FEBitmaps" ,
     "FEExpressions" ,
     "LocalizedBitmaps" ,
     "NotebookTemplatingBitmaps" ,
     "NotebookTemplatingExpressions" ,
     "PredictiveInterfaceBitmaps" ,
     "PredictiveInterfaceExpressions" ,
     "WABitmaps" ,
     "WAExpressions" ,
     "WALocalizableBitmaps" 
    }

There are two more possible matches: "PredictiveInterfaceLocalizableBitmaps" and "SafeExpressions" but the first is an empty list for me and the second returns FEPrivate`FrontEndResource["SafeExpressions"] and it's unclear how to convert it into a proper expression (FE`Evaluate has no effect here).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.