mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixes #4057 - MASSIVE! Fully implements ColorScheme->Scheme + VisualRole + Colors.->SchemeManager. (#4062)
* touching publish.yml * ColorScheme->Scheme * ColorScheme->Scheme 2 * Prototype of GetAttributeForRole * Badly broke CM * Further Badly broke CM * Refactored CM big-time. View still broken * All unit test pass again. Tons added. CM is still WIP, but Schemes is not mostly refactored and working. * Actually: All unit test pass again. Tons added. CM is still WIP, but Schemes is not mostly refactored and working. * Bug fixes. DeepMemberWiseClone cleanup * Further cleanup of Scope<T>, ConfigProperty, etc. * Made ConfigManager thread safe. * WIP: Broken * WIP: new deep clone impl * WIP: new deep clone impl is done. Now fixing CM * WIP: - config.md - Working on AOT clean up - Core CM is broken; but known. * WIP * Merged. Removed CM from Application.Init * WIP * More WIP; Less broke * All CM unit tests pass... Not sure if it actually works though * All unit tests pass... Themes are broken though in UI Cat * CM Ready for review? * Fixed failures due to TextStyles PR * Working on Scheme/Attribute * Working on Scheme/Attribute 2 * Working on Scheme/Attribute 3 * Working on Scheme/Attribute 4 * Working on Scheme/Attribute 5 * Working on Scheme/Attribute 6 * Added test to show how awful memory usage is * Improved schema. Updated config.json * Nade Scope<T> concurrentdictionary and added test to prove * Made Themes ConcrurrentDictionary. Added bunches of tests * Code cleanup * Code cleanup 2 * Code cleanup 3 * Tweaking Scheme * ClearJsonErrors * ClearJsonErrors2 * Updated Attribute API * It all (mostly) works! * Skip odd unit test * Messed with Themes * Theme tweaks * Code reorg. New .md stuff * Fixed Enabled. Added mock driver * Fixed a bunch of View.Enabled related issues * Scheme -> Get/SetScheme() * Cleanup * Cleanup2 * Broke something * Fixed everything * Made CM.Enable better * Text Style Scenario * Added comments * Fixed UI Catalog Theme Changing * Fixed more dynamic CM update stuff * Warning cleanup * New Default Theme * fixed unit test * Refactoring Scheme and Attribute to fix inheritance * more unit tests * ConfigProperty is not updating schemes correctly * All unit tests pass. Code cleanup * All unit tests pass. Code cleanup2 * Fixed unit tests * Upgraded TextField and TextView * Fixed TextView !Enabled bug * More updates to TextView. More unit tests for SchemeManager * Upgraded CharMap * API docs * Fixe HexView API * upgrade HexView * Fixed shortcut KeyView * Fixed more bugs. Added new themes * updated themes * upgraded Border * Fixed themes memory usage...mostly * Fixed themes memory usage...mostly2 * Fixed themes memory usage...2 * Fixed themes memory usage...3 * Added new colors * Fixed GetHardCodedConfig bug * Added Themes Scenario - WIP * Added Themes Scenario * Tweaked Themes Scenario * Code cleanup * Fixed json schmea * updated deepdives * updated deepdives * Tweaked Themes Scenario * Made Schemes a concurrent dict * Test cleanup * Thread safe ConfigProperty tests * trying to make things more thread safe * more trying to make things more thread safe * Fixing bugs in shadowview * Fixing bugs in shadowview 2 * Refactored GetViewsUnderMouse to GetViewsUnderLocation etc... * Fixed dupe unit tests? * Added better description of layout and coordiantes to deep dive * Added better description of layout and coordiantes to deep dive * Modified tests that call v2.AddTimeout; they were returning true which means restart the timer! This was causing mac/linux unit test failures. I think * Fixed auto scheme. Broke TextView/TextField selection * Realized Attribute.IsExplicitlySet is stupid; just use nullable * Fixed Attribute. Simplified. MOre theme testing * Updated themes again * GetViewsUnderMouse to GetViewsUnderLocation broke TransparentMouse. * Fixing mouseunder bugs * rewriting... * All working again. Shadows are now slick as snot. GetViewsUnderLocation is rewritten to actually work and be readable. Tons more low-level unit tests. Margin is now actually ViewportSettings.Transparent. * Code cleanup * Code cleanup * Code cleanup of color apis * Fixed Hover/Highlight * Update Examples/UICatalog/Scenarios/AllViewsTester.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Examples/UICatalog/Scenarios/Clipping.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixed race condition? * reverted * Simplified Attribute API by removing events from SetAttributeForRole * Removed recursion from GetViewsAtLocation * Removed unneeded code * Code clean up. Fixed Scheme bug. * reverted temporary disable * Adjusted scheme algo * Upgraded TextValidateField * Fixed TextValidate bugs * Tweaks * Frameview rounded border by default * API doc cleanup * Readme fix * Addressed tznind feeback * Fixed more unit test issues by protecting Application statics from being set if Application.Initialized is not true * Fixed more unit test issues by protecting Application statics from being set if Application.Initialized is not true 2 * cleanup --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,234 +1,226 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "The JSON schema for the Terminal.Gui Configuration Manager (https://gui-cs.github.io/Terminal.GuiV2Docs/schemas/tui-config-schema.json).",
|
||||
"title": "Terminal.Gui Configuration",
|
||||
"description": "Configuration settings for Terminal.Gui applications. This schema defines settings for the application behavior, appearance, themes, key bindings, and component-specific options.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Application.ArrangeKey": {
|
||||
"description": "Key eanable arrange mode (move/size with keyboard).",
|
||||
"$ref": "#/definitions/Key"
|
||||
},
|
||||
"Application.Force16Colors": {
|
||||
"description": "Force the application to use 16 colors.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"Application.ForceDriver": {
|
||||
"description": "Force the application to use a specific driver.",
|
||||
"type": "string"
|
||||
},
|
||||
"Application.IsMouseDisabled": {
|
||||
"description": "Disable or enable the mouse. The mouse is enabled by default.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"Application.NextTabGroupKey": {
|
||||
"description": "Key to navigate to the next tab group.",
|
||||
"$ref": "#/definitions/Key"
|
||||
},
|
||||
"Application.NextTabKey": {
|
||||
"description": "Key to navigate to the next tab.",
|
||||
"$ref": "#/definitions/Key"
|
||||
},
|
||||
"Application.PrevTabGroupKey": {
|
||||
"description": "Key to navigate to the previous tab group.",
|
||||
"$ref": "#/definitions/Key"
|
||||
},
|
||||
"Application.PrevTabKey": {
|
||||
"description": "Key to navigate to the previous tab.",
|
||||
"$ref": "#/definitions/Key"
|
||||
},
|
||||
"Application.QuitKey": {
|
||||
"description": "The key to quit the application. Esc is the default.",
|
||||
"$ref": "#/definitions/Key"
|
||||
},
|
||||
"AppSettings": {
|
||||
"description": "Application-specific settings.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ConfigurationEditor.EditorColorScheme": {
|
||||
"description": "Color scheme for the configuration editor.",
|
||||
"$ref": "#/definitions/ColorScheme"
|
||||
},
|
||||
"UICatalog.StatusBar": {
|
||||
"description": "Enable or disable the status bar in the UI catalog.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Colors16": {
|
||||
"description": "Mapping of 16 colors to their names.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/Color"
|
||||
}
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "The URI of the schema that this configuration file adheres to. Optional but recommended for validation."
|
||||
},
|
||||
"ConfigurationManager.ThrowOnJsonErrors": {
|
||||
"description": "Throw exceptions on JSON errors.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"ContextMenu.DefaultKey": {
|
||||
"description": "Default key for the context menu.",
|
||||
"$ref": "#/definitions/Key"
|
||||
},
|
||||
"FileDialog.MaxSearchResults": {
|
||||
"description": "Maximum number of search results in the file dialog.",
|
||||
"type": "integer"
|
||||
},
|
||||
"FileDialogStyle.DefaultUseColors": {
|
||||
"description": "Use colors in the file dialog by default.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"FileDialogStyle.DefaultUseUnicodeCharacters": {
|
||||
"description": "Use Unicode characters in the file dialog by default.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"Glyphs": {
|
||||
"description": "Custom glyphs used in the application.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "If true, JSON parsing errors encountered during configuration loading will throw exceptions. If false, errors are typically logged, and default values may be used."
|
||||
},
|
||||
"Key.Separator": {
|
||||
"description": "Separator used in key combinations.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"default": "+",
|
||||
"description": "The character used to separate modifiers and keys in key string representations (e.g., 'Ctrl+Q')."
|
||||
},
|
||||
"Application.ArrangeKey": {
|
||||
"type": "string",
|
||||
"default": "Ctrl+F5",
|
||||
"description": "The key combination used to trigger an arrange or layout command, often for tiling or re-organizing windows."
|
||||
},
|
||||
"Application.Force16Colors": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "If true, forces the console driver to output only the basic 16 ANSI colors, even if the terminal supports more (e.g., 256 colors or TrueColor)."
|
||||
},
|
||||
"Application.ForceDriver": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"",
|
||||
"fake",
|
||||
"ansi",
|
||||
"curses",
|
||||
"net",
|
||||
"windows",
|
||||
null
|
||||
],
|
||||
"default": "",
|
||||
"description": "Forces the use of a specific console driver. If empty or null, Terminal.Gui will attempt to auto-detect the best driver. Options: 'fake', 'ansi', 'curses', 'net', 'windows'."
|
||||
},
|
||||
"Application.IsMouseDisabled": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Disables or enables mouse support for the application. If true, mouse events will be ignored."
|
||||
},
|
||||
"Application.NextTabGroupKey": {
|
||||
"type": "string",
|
||||
"default": "F6",
|
||||
"description": "The key combination to navigate to the next logical group of controls or container (e.g., 'F6', 'Ctrl+PageDown')."
|
||||
},
|
||||
"Application.NextTabKey": {
|
||||
"type": "string",
|
||||
"default": "Tab",
|
||||
"description": "The key combination to navigate to the next focusable view or tab stop (e.g., 'Tab')."
|
||||
},
|
||||
"Application.PrevTabGroupKey": {
|
||||
"type": "string",
|
||||
"default": "Shift+F6",
|
||||
"description": "The key combination to navigate to the previous logical group of controls or container (e.g., 'Shift+F6', 'Ctrl+PageUp')."
|
||||
},
|
||||
"Application.PrevTabKey": {
|
||||
"type": "string",
|
||||
"default": "Shift+Tab",
|
||||
"description": "The key combination to navigate to the previous focusable view or tab stop (e.g., 'Shift+Tab')."
|
||||
},
|
||||
"Application.QuitKey": {
|
||||
"type": "string",
|
||||
"default": "Esc",
|
||||
"description": "The primary key combination used to request the application to quit (e.g., 'Esc', 'Ctrl+Q')."
|
||||
},
|
||||
"Application.AlternateForwardKey": {
|
||||
"type": "string",
|
||||
"description": "An alternative key combination for forward navigation or cycling through elements, often used in specific contexts (e.g., 'Ctrl+CursorRight')."
|
||||
},
|
||||
"Application.AlternateBackwardKey": {
|
||||
"type": "string",
|
||||
"description": "An alternative key combination for backward navigation or cycling through elements (e.g., 'Ctrl+CursorLeft')."
|
||||
},
|
||||
"Application.ShortCutKey": {
|
||||
"type": "string",
|
||||
"description": "The key used to activate shortcuts or hotkeys within views (e.g., 'AltMask', 'F9'). Typically used for menu shortcuts."
|
||||
},
|
||||
"PopoverMenu.DefaultKey": {
|
||||
"type": "string",
|
||||
"default": "Shift+F10",
|
||||
"description": "Default key to open the context menu (PopoverMenu)."
|
||||
},
|
||||
"FileDialog.MaxSearchResults": {
|
||||
"type": "integer",
|
||||
"default": 10000,
|
||||
"description": "Maximum number of search results to display in the FileDialog."
|
||||
},
|
||||
"FileDialogStyle.DefaultUseColors": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Whether the FileDialog should use colors by default to differentiate file/directory types."
|
||||
},
|
||||
"FileDialogStyle.DefaultUseUnicodeCharacters": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Whether the FileDialog should use Unicode characters for icons by default."
|
||||
},
|
||||
"Colors16": {
|
||||
"type": "object",
|
||||
"description": "Defines the 3-byte/6-character hexadecimal string values for the 16 legacy ANSI color names (ColorName16). These definitions can be overridden by the user to customize the base 16 color palette.",
|
||||
"properties": {
|
||||
"Black": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Black (typically #000000)."
|
||||
},
|
||||
"Blue": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Blue (typically #000080, a dark blue like Navy)."
|
||||
},
|
||||
"Green": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Green (typically #008000, a dark green)."
|
||||
},
|
||||
"Cyan": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Cyan (typically #008080, a dark cyan like Teal)."
|
||||
},
|
||||
"Red": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Red (typically #800000, a dark red like Maroon)."
|
||||
},
|
||||
"Magenta": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Magenta (typically #800080, a dark magenta like Purple)."
|
||||
},
|
||||
"Yellow": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Yellow (typically #808000, a dark yellow like Olive)."
|
||||
},
|
||||
"Gray": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.Gray (typically #C0C0C0, a light gray like Silver)."
|
||||
},
|
||||
"DarkGray": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.DarkGray (typically #808080, a medium gray)."
|
||||
},
|
||||
"BrightBlue": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.BrightBlue (typically #0000FF)."
|
||||
},
|
||||
"BrightGreen": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.BrightGreen (typically #00FF00, like Lime)."
|
||||
},
|
||||
"BrightCyan": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.BrightCyan (typically #00FFFF, like Aqua)."
|
||||
},
|
||||
"BrightRed": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.BrightRed (typically #FF0000)."
|
||||
},
|
||||
"BrightMagenta": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.BrightMagenta (typically #FF00FF, like Fuchsia)."
|
||||
},
|
||||
"BrightYellow": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.BrightYellow (typically #FFFF00)."
|
||||
},
|
||||
"White": {
|
||||
"type": "string",
|
||||
"pattern": "^#[0-9a-fA-F]{6}$",
|
||||
"description": "Hex string for ColorName16.White (typically #FFFFFF)."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"Theme": {
|
||||
"description": "The currently selected theme. The default is 'Default'.",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"default": "Default",
|
||||
"description": "The name of the theme to be applied at application startup. This name must match one of the theme names defined in the 'Themes' array."
|
||||
},
|
||||
"Themes": {
|
||||
"description": "An array of Theme objects. Each Theme specifies a set of settings for an application. Set Theme to the name of the active theme.",
|
||||
"type": "array",
|
||||
"description": "A list of theme definitions. Each theme provides a distinct look and feel for the application.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Theme"
|
||||
"type": "object",
|
||||
"description": "A single theme definition. The object should have exactly one property, where the key is the unique name of the theme (e.g., 'Default', 'Dark'), and the value contains the theme's settings.",
|
||||
"maxProperties": 1,
|
||||
"minProperties": 1,
|
||||
"patternProperties": {
|
||||
"^[\\w\\s&\\(\\)-]+$": {
|
||||
"$ref": "#/definitions/themeSettings"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"definitions": {
|
||||
"Theme": {
|
||||
"description": "A Theme is a collection of settings that are named.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Button.DefaultHighlightStyle": {
|
||||
"description": "Default highlight style for buttons.",
|
||||
"type": "string"
|
||||
},
|
||||
"Button.DefaultShadow": {
|
||||
"description": "Default shadow style for buttons.",
|
||||
"type": "string"
|
||||
},
|
||||
"CheckBox.DefaultHighlightStyle": {
|
||||
"description": "Default highlight style for checkboxes.",
|
||||
"type": "string"
|
||||
},
|
||||
"ColorSchemes": {
|
||||
"description": "The ColorSchemes defined for this Theme.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ColorScheme"
|
||||
}
|
||||
},
|
||||
"Dialog.DefaultBorderStyle": {
|
||||
"description": "Default border style for dialogs.",
|
||||
"type": "string"
|
||||
},
|
||||
"Dialog.DefaultButtonAlignment": {
|
||||
"description": "Default button alignment for dialogs.",
|
||||
"type": "string"
|
||||
},
|
||||
"Dialog.DefaultButtonAlignmentModes": {
|
||||
"description": "Default button alignment modes for dialogs.",
|
||||
"type": "string"
|
||||
},
|
||||
"Dialog.DefaultMinimumHeight": {
|
||||
"description": "Default minimum height for dialogs.",
|
||||
"type": "integer"
|
||||
},
|
||||
"Dialog.DefaultMinimumWidth": {
|
||||
"description": "Default minimum width for dialogs.",
|
||||
"type": "integer"
|
||||
},
|
||||
"Dialog.DefaultShadow": {
|
||||
"description": "Default shadow style for dialogs.",
|
||||
"type": "string"
|
||||
},
|
||||
"FrameView.DefaultBorderStyle": {
|
||||
"description": "Default border style for frame views.",
|
||||
"type": "string"
|
||||
},
|
||||
"MessageBox.DefaultBorderStyle": {
|
||||
"description": "Default border style for message boxes.",
|
||||
"type": "string"
|
||||
},
|
||||
"MessageBox.DefaultButtonAlignment": {
|
||||
"description": "Default button alignment for message boxes.",
|
||||
"type": "string"
|
||||
},
|
||||
"MessageBox.DefaultMinimumHeight": {
|
||||
"description": "Default minimum height for message boxes.",
|
||||
"type": "integer"
|
||||
},
|
||||
"MessageBox.DefaultMinimumWidth": {
|
||||
"description": "Default minimum width for message boxes.",
|
||||
"type": "integer"
|
||||
},
|
||||
"NerdFonts.Enable": {
|
||||
"description": "Enable or disable Nerd Fonts.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"Window.DefaultBorderStyle": {
|
||||
"description": "Default border style for windows.",
|
||||
"type": "string"
|
||||
},
|
||||
"Window.DefaultShadow": {
|
||||
"description": "Default shadow style for windows.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ColorScheme": {
|
||||
"description": "A Terminal.Gui ColorScheme. Specifies the Foreground & Background colors for modes of an Terminal.Gui app.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Normal": {
|
||||
"description": "The foreground and background color for text when the view is not focused, hot, or disabled.",
|
||||
"$ref": "#/definitions/Attribute"
|
||||
},
|
||||
"Focus": {
|
||||
"description": "The foreground and background color for text when the view has focus.",
|
||||
"$ref": "#/definitions/Attribute"
|
||||
},
|
||||
"HotNormal": {
|
||||
"description": "The foreground and background color for text when the view is highlighted (hot).",
|
||||
"$ref": "#/definitions/Attribute"
|
||||
},
|
||||
"HotFocus": {
|
||||
"description": "The foreground and background color for text when the view is highlighted (hot) and has focus.",
|
||||
"$ref": "#/definitions/Attribute"
|
||||
},
|
||||
"Disabled": {
|
||||
"description": "The foreground and background color for text when the view is disabled.",
|
||||
"$ref": "#/definitions/Attribute"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Attribute": {
|
||||
"description": "A Terminal.Gui color attribute. Specifies the Foreground & Background colors for Terminal.Gui output.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Foreground": {
|
||||
"$ref": "#/definitions/Color"
|
||||
},
|
||||
"Background": {
|
||||
"$ref": "#/definitions/Color"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"Foreground",
|
||||
"Background"
|
||||
]
|
||||
},
|
||||
"Color": {
|
||||
"description": "One be either one of the W3C standard color names, an rgb(r,g,b) tuple, or a hex color string in the format #RRGGBB.",
|
||||
"description": "One be either one of the W3C standard color names (parsed case-insensitively), a ColorName16 (e.g. 'BrightBlue', parsed case-insensitively), an rgb(r,g,b) tuple, or a hex color string in the format #RRGGBB.",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "string",
|
||||
"oneOf": [
|
||||
@@ -236,6 +228,7 @@
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"AliceBlue",
|
||||
"AmberPhosphor",
|
||||
"AntiqueWhite",
|
||||
"Aqua",
|
||||
"Aquamarine",
|
||||
@@ -246,21 +239,26 @@
|
||||
"BlanchedAlmond",
|
||||
"Blue",
|
||||
"BlueViolet",
|
||||
"BrightBlue",
|
||||
"BrightCyan",
|
||||
"BrightGreen",
|
||||
"BrightMagenta",
|
||||
"BrightRed",
|
||||
"BrightYellow",
|
||||
"Brown",
|
||||
"BurlyWood",
|
||||
"CadetBlue",
|
||||
"Chartreuse",
|
||||
"Chocolate",
|
||||
"Coral",
|
||||
"Charcoal",
|
||||
"CornflowerBlue",
|
||||
"Cornsilk",
|
||||
"Crimson",
|
||||
"Cyan",
|
||||
"DarkBlue",
|
||||
"DarkCyan",
|
||||
"DarkGoldenRod",
|
||||
"DarkGoldenrod",
|
||||
"DarkGray",
|
||||
"DarkGreen",
|
||||
"DarkGrey",
|
||||
"DarkKhaki",
|
||||
"DarkMagenta",
|
||||
"DarkOliveGreen",
|
||||
@@ -271,28 +269,36 @@
|
||||
"DarkSeaGreen",
|
||||
"DarkSlateBlue",
|
||||
"DarkSlateGray",
|
||||
"DarkSlateGrey",
|
||||
"DarkTurquoise",
|
||||
"DarkViolet",
|
||||
"DeepPink",
|
||||
"DeepSkyBlue",
|
||||
"DimGray",
|
||||
"DimGrey",
|
||||
"DodgerBlue",
|
||||
"Ebony",
|
||||
"FireBrick",
|
||||
"FloralWhite",
|
||||
"FluorescentOrange",
|
||||
"ForestGreen",
|
||||
"Fuchsia",
|
||||
"Gainsboro",
|
||||
"GhostWhite",
|
||||
"Gold",
|
||||
"GoldenRod",
|
||||
"Goldenrod",
|
||||
"Gray",
|
||||
"Green",
|
||||
"GreenPhosphor",
|
||||
"GreenYellow",
|
||||
"Grey",
|
||||
"GuppieGreen",
|
||||
"HoneyDew",
|
||||
"HotPink",
|
||||
"IndianRed",
|
||||
"Indigo",
|
||||
"Ivory",
|
||||
"Jet",
|
||||
"Khaki",
|
||||
"Lavender",
|
||||
"LavenderBlush",
|
||||
@@ -301,14 +307,16 @@
|
||||
"LightBlue",
|
||||
"LightCoral",
|
||||
"LightCyan",
|
||||
"LightGoldenRodYellow",
|
||||
"LightGoldenrodYellow",
|
||||
"LightGray",
|
||||
"LightGreen",
|
||||
"LightGrey",
|
||||
"LightPink",
|
||||
"LightSalmon",
|
||||
"LightSeaGreen",
|
||||
"LightSkyBlue",
|
||||
"LightSlateGray",
|
||||
"LightSlateGrey",
|
||||
"LightSteelBlue",
|
||||
"LightYellow",
|
||||
"Lime",
|
||||
@@ -334,9 +342,11 @@
|
||||
"OldLace",
|
||||
"Olive",
|
||||
"OliveDrab",
|
||||
"Onyx",
|
||||
"Orange",
|
||||
"OrangeRed",
|
||||
"Orchid",
|
||||
"OuterSpace",
|
||||
"PaleGoldenRod",
|
||||
"PaleGreen",
|
||||
"PaleTurquoise",
|
||||
@@ -348,6 +358,7 @@
|
||||
"Plum",
|
||||
"PowderBlue",
|
||||
"Purple",
|
||||
"RaisinBlack",
|
||||
"RebeccaPurple",
|
||||
"Red",
|
||||
"RosyBrown",
|
||||
@@ -362,6 +373,7 @@
|
||||
"SkyBlue",
|
||||
"SlateBlue",
|
||||
"SlateGray",
|
||||
"SlateGrey",
|
||||
"Snow",
|
||||
"SpringGreen",
|
||||
"SteelBlue",
|
||||
@@ -388,10 +400,233 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"Key": {
|
||||
"description": "A key pressed on the keyboard (e.g. \"Ctrl+Q\")",
|
||||
"type": "string"
|
||||
"attribute": {
|
||||
"type": "object",
|
||||
"description": "Defines the foreground color, background color, and style for a specific UI element state.",
|
||||
"properties": {
|
||||
"Foreground": {
|
||||
"$ref": "#/definitions/Color"
|
||||
},
|
||||
"Background": {
|
||||
"$ref": "#/definitions/Color"
|
||||
},
|
||||
"Style": {
|
||||
"type": "string",
|
||||
"default": "None",
|
||||
"description": "Text style. Parsed case-insensitively by the application. Can be a single style or a comma-separated list of the following valid flags: None, Bold, Italic, Underline, Faint, Blink, Reverse, Strikethrough (e.g., 'Bold,Italic').",
|
||||
"pattern": "^(None|Bold|Italic|Underline|Faint|Blink|Reverse|Strikethrough)(\\s*,\\s*(None|Bold|Italic|Underline|Faint|Blink|Reverse|Strikethrough))*$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"Foreground",
|
||||
"Background"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"scheme": {
|
||||
"type": "object",
|
||||
"description": "A collection of attributes defining the appearance of UI elements in different states (normal, focused, etc.).",
|
||||
"properties": {
|
||||
"Normal": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance in the normal, non-focused state."
|
||||
},
|
||||
"Focus": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance when the element has input focus."
|
||||
},
|
||||
"HotNormal": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance for a 'hot' element (e.g., mouse hover) that is not focused."
|
||||
},
|
||||
"HotFocus": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance for a 'hot' element that also has input focus."
|
||||
},
|
||||
"Disabled": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance when the element is disabled."
|
||||
},
|
||||
"Active": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance when the element is active."
|
||||
},
|
||||
"HotActive": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance for a 'hot' element that is also active."
|
||||
},
|
||||
"Highlight": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance for a highlighted element."
|
||||
},
|
||||
"Editable": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance for an editable element."
|
||||
},
|
||||
"ReadOnly": {
|
||||
"$ref": "#/definitions/attribute",
|
||||
"description": "Appearance for a read-only element."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"Normal"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"themeSettings": {
|
||||
"type": "object",
|
||||
"description": "Contains all settings for a specific theme, including default styles for various UI elements, glyphs, and color schemes.",
|
||||
"properties": {
|
||||
"BasedOn": {
|
||||
"type": "string",
|
||||
"description": "The name of another theme that this theme inherits settings from. Settings in the current theme will override those from the base theme."
|
||||
},
|
||||
"Dialog.DefaultButtonAlignment": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Start",
|
||||
"End",
|
||||
"Center",
|
||||
"Fill"
|
||||
],
|
||||
"description": "Default horizontal alignment for buttons within Dialog views."
|
||||
},
|
||||
"Dialog.DefaultButtonAlignmentModes": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"AddSpaceBetweenItems",
|
||||
"AddSpaceAroundItems"
|
||||
],
|
||||
"description": "Specifies how extra space is distributed between buttons in Dialog views when alignment is 'Start', 'End', or 'Center'."
|
||||
},
|
||||
"Dialog.DefaultBorderStyle": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Single",
|
||||
"Double",
|
||||
"Heavy",
|
||||
"Rounded"
|
||||
],
|
||||
"description": "Default border style for Dialog views."
|
||||
},
|
||||
"Dialog.DefaultShadow": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Transparent",
|
||||
"Opaque"
|
||||
],
|
||||
"description": "Default shadow style for Dialog views, rendered behind the dialog."
|
||||
},
|
||||
"FrameView.DefaultBorderStyle": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Single",
|
||||
"Double",
|
||||
"Heavy",
|
||||
"Rounded"
|
||||
],
|
||||
"description": "Default border style for FrameView controls."
|
||||
},
|
||||
"Window.DefaultBorderStyle": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Single",
|
||||
"Double",
|
||||
"Heavy",
|
||||
"Rounded"
|
||||
],
|
||||
"description": "Default border style for Window views."
|
||||
},
|
||||
"MessageBox.DefaultButtonAlignment": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Start",
|
||||
"End",
|
||||
"Center",
|
||||
"Fill"
|
||||
],
|
||||
"description": "Default horizontal alignment for buttons within MessageBox views."
|
||||
},
|
||||
"MessageBox.DefaultBorderStyle": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Single",
|
||||
"Double",
|
||||
"Heavy",
|
||||
"Rounded"
|
||||
],
|
||||
"description": "Default border style for MessageBox views."
|
||||
},
|
||||
"Button.DefaultShadow": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Transparent",
|
||||
"Opaque"
|
||||
],
|
||||
"description": "Default shadow style for Button controls, often used for 3D effect."
|
||||
},
|
||||
"Menuv2.DefaultBorderStyle": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Single",
|
||||
"Double",
|
||||
"Heavy",
|
||||
"Rounded"
|
||||
],
|
||||
"description": "Default border style for the newer Menuv2 control and its sub-menus."
|
||||
},
|
||||
"MenuBarv2.DefaultBorderStyle": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Single",
|
||||
"Double",
|
||||
"Heavy",
|
||||
"Rounded"
|
||||
],
|
||||
"description": "Default border style for the MenuBarv2 control."
|
||||
},
|
||||
"StatusBar.DefaultSeparatorLineStyle": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"None",
|
||||
"Single",
|
||||
"Double",
|
||||
"Heavy"
|
||||
],
|
||||
"description": "Default style for separator lines in the StatusBar."
|
||||
},
|
||||
"Schemes": {
|
||||
"type": "array",
|
||||
"description": "A list of scheme definitions for this theme. Each item in the array is an object containing one or more named schemes (e.g., 'TopLevel', 'Base', 'Menu').",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "An object where each key is a scheme name (e.g., 'Base', 'Error') and its value is the scheme definition.",
|
||||
"patternProperties": {
|
||||
"^[A-Za-z][A-Za-z0-9_]*$": {
|
||||
"$ref": "#/definitions/scheme"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"minProperties": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"^Glyphs\\.[A-Za-z0-9]+$": {
|
||||
"type": "string",
|
||||
"description": "A specific glyph character used by the theme for drawing UI elements like borders, arrows, indicators, etc. (e.g., 'Glyphs.LeftArrow', 'Glyphs.HLine'). The string value is the character to be used."
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user