|
Window Framework for UI Toolkit v2.0.x
|
Owns a runtime player catalog and selection leases for explicit UI scopes. More...


Public Member Functions | |
| PlayerThemeRuntime (IReadOnlyList< WindowFrameTheme > builtIns, Func< IEnumerable< VisualElement > > scopes, Action< int > applyBuiltIn, Action< string > persist, PlayerThemeExtensionRegistry extensions=null) | |
| Creates an application-owned runtime selection manager. | |
| async System.Threading.Tasks.Task<(bool Success, string FolderName, string Error)> | CreateEditableCopyAsync (string root, string name, VisualElement scope, System.Threading.CancellationToken cancellation=default) |
| Creates a copy, rasterizing a trusted configured vector preview when needed. | |
| void | Dispose () |
| Releases scope leases before catalog textures. | |
| bool | Refresh (string root, string savedId, int legacyIndex, out string error) |
| void | RefreshControls () |
| Reconciles dynamic controls after explicit application attachment notifications. | |
| bool | Select (string id, out string error) |
| Selects by identity from the live catalog or built-ins and persists after success. | |
| bool | TryCreateEditableCopy (string root, string name, VisualElement scope, out string folderName, out string error) |
| Creates an independent portable copy of the committed effective theme. | |
Properties | |
| string | ActiveId [get, private set] |
| Gets current successfully applied stable selection. | |
| PlayerThemeCatalog | Catalog [get] |
| Gets current imported catalog, or null before initialization. | |
| string | Status [get, private set] |
| Gets the safe last migration, fallback or selection explanation. | |
Events | |
| Action | Changed |
| Raised after a committed catalog/selection change, never during baseline application. | |
Private Member Functions | |
| bool | Apply (string id, PlayerThemeCatalog catalog, out string error) |
| PlayerThemeValues | FrameworkValues (WindowFrameTheme baseline, PlayerThemeFolder player) |
| PlayerThemeExtensionRegistry | ImportExtensions (string root=null) |
| void | Notify () |
| void | Release () |
| bool | TryCreateEditableCopyCore (string root, string name, VisualElement scope, UnityEngine.Texture2D renderedPreview, out string folderName, out string error, IReadOnlyDictionary< string, UnityEngine.Texture2D > renderedImages=null) |
Private Attributes | |
| readonly Action< int > | _applyBuiltIn |
| readonly HashSet< VisualElement > | _boundScopes = new HashSet<VisualElement>() |
| readonly IReadOnlyList< WindowFrameTheme > | _builtIns |
| bool | _busy |
| PlayerThemeCatalog | _catalog |
| System.Threading.CancellationTokenSource | _copyCancellation |
| bool | _disposed |
| readonly PlayerThemeExtensionRegistry | _extensions |
| readonly List< IDisposable > | _leases = new List<IDisposable>() |
| readonly Action< string > | _persist |
| bool | _refreshingControls |
| readonly Func< IEnumerable< VisualElement > > | _scopes |
Owns a runtime player catalog and selection leases for explicit UI scopes.
Application must supply its existing built-in selection and persistence authority. Release bindings before disposing imported textures. Refresh is transactional: discovery or validation failure retains the previous catalog. Defaults are never inferred from list order. This owner does not scan folders each frame or write an independent preference file.
|
inline |
Creates an application-owned runtime selection manager.
| builtIns | Shipped configuration with stable IDs. |
| scopes | Current explicit independent theme scopes. |
| applyBuiltIn | Existing stylesheet-selection path, invoked with shipped index. |
| persist | Existing persistence callback, invoked after successful application. |
| extensions | Optional compiled handler registry. |

|
inlineprivate |


|
inline |
Creates a copy, rasterizing a trusted configured vector preview when needed.
Main-thread runtime call. Preserves the synchronous raster API. Cancellation applies before commit; once committed the independent copy is never deleted. Source identity and scope attachment are checked again after rendering. No player SVG is read.
| root | Configured local root. |
| name | Safe copy name. |
| scope | Attached application scope. |
| cancellation | Cancels pre-commit rendering. |

|
inline |
Releases scope leases before catalog textures.


|
inlineprivate |

|
inlineprivate |


|
inlineprivate |

|
inline |
| root | Configured theme root. |
| savedId | Existing saved identity on first initialization. |
| legacyIndex | Shipped index for one-time migration. |
| error | Failure diagnostic. |


|
inline |
Reconciles dynamic controls after explicit application attachment notifications.
Attachment notifications refresh framework mappings and reapply extension leases even when their root scope is unchanged, so newly constructed window controls are discovered. Existing extension targets handle detach/reattach locally. No catalog reload or persistence write.


|
inlineprivate |

|
inline |
Selects by identity from the live catalog or built-ins and persists after success.
| id | Exact stable ID; unavailable IDs are rejected. |
| error | Failure diagnostic. |


|
inline |
Creates an independent portable copy of the committed effective theme.
| root | Configured local portable-theme root. |
| name | Bounded user-facing copy name, not a path. |
| scope | Attached baseline-resolved scope for complete tokens and extension snapshots. |
| folderName | New independent folder on export success, including when subsequent selection fails. |
| error | Safe actionable failure explanation. |
Never rewrites or deletes the source. A committed copy remains available if refresh or persistence fails. Unsupported/incomplete snapshots are refused before filesystem writes. Caller must wait for resolved custom styles after stylesheet changes. Main thread only.

|
inlineprivate |


|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
getprivate set |
Gets current successfully applied stable selection.
|
get |
Gets current imported catalog, or null before initialization.
|
getprivate set |
Gets the safe last migration, fallback or selection explanation.
| Action GWG.WindowFramework.Theming.PlayerThemeRuntime.Changed |
Raised after a committed catalog/selection change, never during baseline application.