Window Framework for UI Toolkit v2.0.x
GWG.WindowFramework.Theming.PlayerThemeCatalog Class Referencesealed

Owns a bounded discovery snapshot of valid player theme folders. More...

Inheritance diagram for GWG.WindowFramework.Theming.PlayerThemeCatalog:
Collaboration diagram for GWG.WindowFramework.Theming.PlayerThemeCatalog:

Data Structures

class  RejectedEntry
 One rejected folder and its fatal validation explanation. More...

Public Member Functions

void Dispose ()
 Releases owned themes after all consumers have released their UI references.
bool TryGet (string id, out PlayerThemeFolder theme)
 Looks up a stable player ID, without using display names or indices.

Static Public Member Functions

static bool TryDiscover (string root, out PlayerThemeCatalog catalog, out string error, PlayerThemeExtensionRegistry extensions=null)
 Discovers immediate folders; missing root is a valid empty catalog.

Static Public Attributes

const int MaximumFolders = 100
 Maximum immediate folders considered in one discovery operation.
const int MaximumLoadedThemes = 100
 Maximum successfully retained themes per catalog (bounds aggregate texture memory).

Properties

IReadOnlyList< string > Diagnostics [get, private set]
 Gets bounded diagnostics for skipped entries.
bool IsDisposed [get, private set]
 Gets whether all owned folders have been released.
IReadOnlyList< RejectedEntry > Rejected [get]
 Unavailable folders with bounded fatal reports; never selectable.
IReadOnlyList< PlayerThemeFolder > Themes [get]
 Gets owned valid themesin ordinal folder-name order.

Private Attributes

readonly List< RejectedEntry > _rejected = new List<RejectedEntry>()
readonly List< PlayerThemeFolder > _themes = new List<PlayerThemeFolder>()

Detailed Description

Owns a bounded discovery snapshot of valid player theme folders.

Does not modify built-in theme assets or the selected theme. Owners create a new snapshot, resolve selection, release old UI bindings, then dispose the previous snapshot. Duplicate IDs reject every ambiguous entry, independent of directory enumeration order. Discovery is explicitly requested, never polled each frame.

Member Function Documentation

◆ Dispose()

void GWG.WindowFramework.Theming.PlayerThemeCatalog.Dispose ( )
inline

Releases owned themes after all consumers have released their UI references.

Here is the caller graph for this function:

◆ TryDiscover()

bool GWG.WindowFramework.Theming.PlayerThemeCatalog.TryDiscover ( string root,
out PlayerThemeCatalog catalog,
out string error,
PlayerThemeExtensionRegistry extensions = null )
inlinestatic

Discovers immediate folders; missing root is a valid empty catalog.

Parameters
rootConfigured player-theme root; no directory is created here.
catalogOwned snapshot on success.
errorRoot-level failure.
Returns
False for invalid root or exceeded folder bound; individual bad themes are skipped.
Parameters
extensionsSame compiled registry used by application/exports, or null for opaque unregistered sections.

Null or nonexistent root succeeds as an empty catalog without creating directories. Existing roots are validated for unsafe reparse/link access. Discovery eagerly loads valid folders and enforces immediate-folder/aggregate-image limits; this is not a lazy-on-selection loader. A root/budget failure returns false and disposes the pending snapshot; the caller must retain its previous active catalog. Individual invalid folders appear in Rejected.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryGet()

bool GWG.WindowFramework.Theming.PlayerThemeCatalog.TryGet ( string id,
out PlayerThemeFolder theme )
inline

Looks up a stable player ID, without using display names or indices.

Parameters
idValidated stable ID.
themeMatching owned folder.
Returns
True when the catalog is live and contains the ID.
Here is the caller graph for this function:

Field Documentation

◆ _rejected

readonly List<RejectedEntry> GWG.WindowFramework.Theming.PlayerThemeCatalog._rejected = new List<RejectedEntry>()
private

◆ _themes

readonly List<PlayerThemeFolder> GWG.WindowFramework.Theming.PlayerThemeCatalog._themes = new List<PlayerThemeFolder>()
private

◆ MaximumFolders

const int GWG.WindowFramework.Theming.PlayerThemeCatalog.MaximumFolders = 100
static

Maximum immediate folders considered in one discovery operation.

◆ MaximumLoadedThemes

const int GWG.WindowFramework.Theming.PlayerThemeCatalog.MaximumLoadedThemes = 100
static

Maximum successfully retained themes per catalog (bounds aggregate texture memory).

Property Documentation

◆ Diagnostics

IReadOnlyList<string> GWG.WindowFramework.Theming.PlayerThemeCatalog.Diagnostics
getprivate set

Gets bounded diagnostics for skipped entries.

◆ IsDisposed

bool GWG.WindowFramework.Theming.PlayerThemeCatalog.IsDisposed
getprivate set

Gets whether all owned folders have been released.

◆ Rejected

IReadOnlyList<RejectedEntry> GWG.WindowFramework.Theming.PlayerThemeCatalog.Rejected
get

Unavailable folders with bounded fatal reports; never selectable.

◆ Themes

IReadOnlyList<PlayerThemeFolder> GWG.WindowFramework.Theming.PlayerThemeCatalog.Themes
get

Gets owned valid themesin ordinal folder-name order.