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

Read-only preparation of supported shipped 2.0 root values. More...

Static Public Member Functions

static bool IsCurrent (WindowFrameTheme theme, out string error)
 Checks whether prepared output matches freshly resolved source and image dependencies.
static bool TryPrepare (WindowFrameTheme theme, out PreparedThemeSnapshot snapshot, out int componentRuleCount, out string error)
 Prepares supported values using the actual source graph and referenced image assets.
static bool TryPrepare (WindowFrameThemeData data, WindowFrameTheme theme, out PreparedThemeSnapshot snapshot, out int componentRuleCount, out string error)
 Prepares the collection's configured application/settings composition.

Static Private Member Functions

static string FindImageOrigin (string token, ThemeSourceGraph graph, HashSet< string > seen)

Detailed Description

Read-only preparation of supported shipped 2.0 root values.

Returns derived data for the existing theme configuration; never saves or rewrites derives supported values without saving or rewriting source. It does not certify arbitrary component-rule parity. Compatible compiled VectorImage references are retained for the asynchronous runtime raster-copy path; player-provided SVG is never parsed here. Font and image dependencies participate in the fingerprint; no installation directory is assumed.

Member Function Documentation

◆ FindImageOrigin()

string GWG.WindowFramework.Editor.ThemePreparationService.FindImageOrigin ( string token,
ThemeSourceGraph graph,
HashSet< string > seen )
inlinestaticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCurrent()

bool GWG.WindowFramework.Editor.ThemePreparationService.IsCurrent ( WindowFrameTheme theme,
out string error )
inlinestatic

Checks whether prepared output matches freshly resolved source and image dependencies.

Parameters
themeTheme with embedded preparation.
errorFailure or stale-data report.
Returns
True only when isolated-source preparation succeeds and fingerprints match.

This overload has no collection parameter and calls isolated TryPrepare. A modern settings-only theme needing ApplicationStyleSheets can require the collection-aware TryPrepare path used by lifecycle tooling instead. No stored snapshot is updated here.

Here is the call graph for this function:

◆ TryPrepare() [1/2]

bool GWG.WindowFramework.Editor.ThemePreparationService.TryPrepare ( WindowFrameTheme theme,
out PreparedThemeSnapshot snapshot,
out int componentRuleCount,
out string error )
inlinestatic

Prepares supported values using the actual source graph and referenced image assets.

Parameters
themeShipped theme to inspect.
snapshotDerived snapshot, possibly containing a blocking report.
componentRuleCountRules outside root-token snapshot semantics.
errorBounded report; no sensitive absolute paths.
Returns
True only when all supported root values are representable.
if (ThemePreparationService.TryPrepare(theme, out var snapshot, out var rules, out var error))
theme.SetPreparedSnapshot(snapshot); // Owning editor records Undo and saves theme data.
Read-only preparation of supported shipped 2.0 root values.
Definition ThemePreparationService.cs:19
static bool TryPrepare(WindowFrameTheme theme, out PreparedThemeSnapshot snapshot, out int componentRuleCount, out string error)
Prepares supported values using the actual source graph and referenced image assets.
Definition ThemePreparationService.cs:30
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryPrepare() [2/2]

bool GWG.WindowFramework.Editor.ThemePreparationService.TryPrepare ( WindowFrameThemeData data,
WindowFrameTheme theme,
out PreparedThemeSnapshot snapshot,
out int componentRuleCount,
out string error )
inlinestatic

Prepares the collection's configured application/settings composition.

Parameters
dataShared application stylesheet owner.
themeSelected shipped theme.
snapshotDerived values, never a second authored palette.
componentRuleCountNonportable component rule count.
errorPreparation failure.
Returns
Whether preparation succeeded.
Here is the call graph for this function: