Window Framework for UI Toolkit v2.0.x
GWG.WindowFramework.WindowFrameTheme Class Reference

Represents an individual theme definition within the Window Framework. Encapsulates theme metadata, styling stylesheets, and visual preview iconography. More...

Public Member Functions

void AssignStableId (string id)
 Assigns identity oncefor editor migration or runtime imported entries.
void SetCollectionApplicationSheets (bool usesSharedSheets)
 Records the validated stylesheet composition contract during authoring/migration.
void SetPreparedSnapshot (Theming.PreparedThemeSnapshot snapshot)
 Stores derived preparation output on this theme without rewriting stylesheet sources.

Data Fields

string description
 Descriptive summary of the theme visual styling and palette.
Texture2D icon
 Raster preview icon texture (Texture2D), used for PNG/JPG previews.
bool isDefault
 Indicates whether this theme is configured as the active default fallback theme.
string name
 Display name of the theme.
ThemeStyleSheet themeStyleSheet
 Entry TSS asset: modern consolidated entries import local settings only; legacy entries retain self-contained chains. For runtime/manual styling use the owning data asset's ComposeStyleSheets, not this modern asset alone. Referenced project assets are borrowed; this data record does not own/dispose them or compile player-provided source.

Properties

Theming.PreparedThemeSnapshot PreparedSnapshot [get]
 Gets derived portable values prepared from referenced authoritative stylesheets.
string StableId [get]
 Gets persistent theme identity independent of display name and ordering.
bool UsesCollectionApplicationSheets [get]
 Whether the theme settings require the collection's shared application sheets.

Private Attributes

Theming.PreparedThemeSnapshot _preparedSnapshot
string _stableId
bool _usesCollectionApplicationSheets

Detailed Description

Represents an individual theme definition within the Window Framework. Encapsulates theme metadata, styling stylesheets, and visual preview iconography.

Supports both standard raster images (Texture2D) and native UI Toolkit vector graphics (VectorImage) for theme preview cards and runtime selector forms.

Member Function Documentation

◆ AssignStableId()

void GWG.WindowFramework.WindowFrameTheme.AssignStableId ( string id)
inline

Assigns identity oncefor editor migration or runtime imported entries.

Parameters
idStable built-in- or player- identifier.
Exceptions
ArgumentExceptionIdentity is invalid or conflicts with an existing ID.

Checks reserved prefix and prevents changing this record's existing different ID. Repeating the same ID is permitted. It does not inspect other collection entries, enforce full player-manifest syntax or save the owning asset; authoring/resolver must perform those checks.

Here is the caller graph for this function:

◆ SetCollectionApplicationSheets()

void GWG.WindowFramework.WindowFrameTheme.SetCollectionApplicationSheets ( bool usesSharedSheets)
inline

Records the validated stylesheet composition contract during authoring/migration.

Parameters
usesSharedSheetsTrue for settings-only collection themes; false for self-contained sources.
Here is the caller graph for this function:

◆ SetPreparedSnapshot()

void GWG.WindowFramework.WindowFrameTheme.SetPreparedSnapshot ( Theming.PreparedThemeSnapshot snapshot)
inline

Stores derived preparation output on this theme without rewriting stylesheet sources.

Parameters
snapshotValidated preparation output, or null to invalidate.

Editor tooling records Undo, marks the owning theme data dirty and saves it. This method does not select themes, save assets or acquire resources.

Here is the caller graph for this function:

Field Documentation

◆ _preparedSnapshot

Theming.PreparedThemeSnapshot GWG.WindowFramework.WindowFrameTheme._preparedSnapshot
private

◆ _stableId

string GWG.WindowFramework.WindowFrameTheme._stableId
private

◆ _usesCollectionApplicationSheets

bool GWG.WindowFramework.WindowFrameTheme._usesCollectionApplicationSheets
private

◆ description

string GWG.WindowFramework.WindowFrameTheme.description

Descriptive summary of the theme visual styling and palette.

◆ icon

Texture2D GWG.WindowFramework.WindowFrameTheme.icon

Raster preview icon texture (Texture2D), used for PNG/JPG previews.

◆ isDefault

bool GWG.WindowFramework.WindowFrameTheme.isDefault

Indicates whether this theme is configured as the active default fallback theme.

◆ name

string GWG.WindowFramework.WindowFrameTheme.name

Display name of the theme.

◆ themeStyleSheet

ThemeStyleSheet GWG.WindowFramework.WindowFrameTheme.themeStyleSheet

Entry TSS asset: modern consolidated entries import local settings only; legacy entries retain self-contained chains. For runtime/manual styling use the owning data asset's ComposeStyleSheets, not this modern asset alone. Referenced project assets are borrowed; this data record does not own/dispose them or compile player-provided source.

Property Documentation

◆ PreparedSnapshot

Theming.PreparedThemeSnapshot GWG.WindowFramework.WindowFrameTheme.PreparedSnapshot
get

Gets derived portable values prepared from referenced authoritative stylesheets.

Stored inside this theme definition, not a separate shipping config. Missing data does not alter normal stylesheet rendering. Editor preparation must validate source freshness.

◆ StableId

string GWG.WindowFramework.WindowFrameTheme.StableId
get

Gets persistent theme identity independent of display name and ordering.

Built-in IDs must be assigned and saved by editor tooling before player builds. Runtime imported IDs use the reserved player- namespace.

◆ UsesCollectionApplicationSheets

bool GWG.WindowFramework.WindowFrameTheme.UsesCollectionApplicationSheets
get

Whether the theme settings require the collection's shared application sheets.

False preserves existing self-contained 1.0 chains. True is set by editor authoring for consolidated settings-only themes. This is composition metadata, not a palette.