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

Read-only preflight checks for the Theme Manager's project repository setup form. More...

Static Public Member Functions

static string GetShippedDefaultPath (string packageRoot)
 Returns the shipped default repository by stable asset identity inside the actual installation.
static string GetThemeDataAssetPath (string folder, string name)
 Returns the named ThemeData asset path inside an already validated repository folder.
static bool InspectSource (WindowFrameThemeData source, out List< WindowFrameTheme > supported, out List< string > excluded, out string error, string packageRoot=null)
 Lists source entries according to source ownership, not guessed stylesheet contents.
static bool IsDemoRepository (WindowFrameThemeData data, string packageRoot)
 Classifies every ThemeData under the installed Demo directory as Demo data, regardless of its name.
static bool IsProjectRepository (WindowFrameThemeData data, string packageRoot)
 Identifies saved project ThemeData outside the entire installed package for alternate source selection.
static bool IsShippedDefault (WindowFrameThemeData data, string packageRoot)
 Identifies the actual shipped default by its controlled asset reference, never its display name.
static WindowFrameThemeData LoadShippedDefault (string packageRoot)
 Loads only the canonical asset default; a missing asset is not replaced with a Demo/project repository.
static bool ResolveRequiredFrameworkStylesheets (WindowFrameThemeData data, string packageRoot, out StyleSheet[] required, out string error)
 Resolves protected framework-role assets and validates their existing leading composition order.
static bool ValidateDestination (WindowFrameThemeData source, string packageRoot, string parentFolder, string repositoryName, out string destination, out string error)
 Validates a new repository folder without creating folders or probing through writes.
static bool ValidateDestination (WindowFrameThemeData source, string packageRoot, string parentFolder, string repositoryName, out string destination, out string error, out bool folderConflict)
 Also indicates a folder-name/existing-output conflict for field-local presentation.
static bool ValidateSaveFileName (string fileName, out string error)
 Validates the controller's existing persistent JSON filename, not the ThemeData asset name.
static bool ValidateSourceOrigin (WindowFrameThemeData data, string packageRoot, out string error)
 Restricts creation sources to the canonical default or an explicitly selected project repository.
static bool ValidateThemeDataName (string name, out string error)
 Validates the repository asset/display name without silently altering it.

Static Public Attributes

const string DefaultThemeDataName = "MyProjectThemeRepo"
 Suggested editable name for a new project's ThemeData repository asset.

Static Private Member Functions

static bool IsWithin (string path, string folder)
 Compares project paths with an explicit directory boundary.
static bool ValidateLeafName (string name, out string error)
 Validates one portable Windows-safe file/folder component without normalizing away invalid input.

Detailed Description

Read-only preflight checks for the Theme Manager's project repository setup form.

These checks do not copy, import, save, upgrade, prepare or mutate source assets. They validate source identity, destination safety and explicit setup choices, not theme versions or stylesheet content. The later copy engine reruns input validation and checks copied references and wiring. Prepared snapshots are copied as serialized data, not treated as source eligibility certificates.

Member Function Documentation

◆ GetShippedDefaultPath()

string GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.GetShippedDefaultPath ( string packageRoot)
inlinestatic

Returns the shipped default repository by stable asset identity inside the actual installation.

Renaming the asset does not change ownership. A missing/moved-outside asset is not replaced by a name search, Demo repository or first-found fallback.

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

◆ GetThemeDataAssetPath()

string GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.GetThemeDataAssetPath ( string folder,
string name )
inlinestatic

Returns the named ThemeData asset path inside an already validated repository folder.

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

◆ InspectSource()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.InspectSource ( WindowFrameThemeData source,
out List< WindowFrameTheme > supported,
out List< string > excluded,
out string error,
string packageRoot = null )
inlinestatic

Lists source entries according to source ownership, not guessed stylesheet contents.

Parameters
sourceThe saved ThemeData selected as the source.
supportedOnly the supplied v2.0 entries for the canonical private defaults; otherwise every developer entry in its original order.
excludedHistorical entries omitted only from our controlled publication.
errorMissing source or missing supplied 2.0 entries, otherwise null.
packageRootActual installation boundary used to identify the canonical defaults.
Returns
True when the saved source can be copied or published.

Developer repositories are not interpreted, filtered by version or converted. Publication from our private defaults uses the existing package v2.0 folder and excludes historical v1.0 content. Portable export preparation is a separate operation.

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

◆ IsDemoRepository()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.IsDemoRepository ( WindowFrameThemeData data,
string packageRoot )
inlinestatic

Classifies every ThemeData under the installed Demo directory as Demo data, regardless of its name.

No Unity asset label, naming convention or opt-out is consulted. Demo data is not a creation source.

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

◆ IsProjectRepository()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.IsProjectRepository ( WindowFrameThemeData data,
string packageRoot )
inlinestatic

Identifies saved project ThemeData outside the entire installed package for alternate source selection.

Origin is not complete independence certification and does not filter theme versions.

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

◆ IsShippedDefault()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.IsShippedDefault ( WindowFrameThemeData data,
string packageRoot )
inlinestatic

Identifies the actual shipped default by its controlled asset reference, never its display name.

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

◆ IsWithin()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.IsWithin ( string path,
string folder )
inlinestaticprivate

Compares project paths with an explicit directory boundary.

Here is the caller graph for this function:

◆ LoadShippedDefault()

WindowFrameThemeData GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.LoadShippedDefault ( string packageRoot)
inlinestatic

Loads only the canonical asset default; a missing asset is not replaced with a Demo/project repository.

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

◆ ResolveRequiredFrameworkStylesheets()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.ResolveRequiredFrameworkStylesheets ( WindowFrameThemeData data,
string packageRoot,
out StyleSheet[] required,
out string error )
inlinestatic

Resolves protected framework-role assets and validates their existing leading composition order.

Parameters
requiredNative controls, framework components and slide-toggle references, including nulls for diagnostics.

For the canonical shipped default only, trusted known asset identities supply unrecorded roles. Project copies retain recorded role references, including intentional external assets; missing metadata never reconnects them to shipped assets. This inspection does not save, reorder or repair the source collection.

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

◆ ValidateDestination() [1/2]

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.ValidateDestination ( WindowFrameThemeData source,
string packageRoot,
string parentFolder,
string repositoryName,
out string destination,
out string error )
inlinestatic

Validates a new repository folder without creating folders or probing through writes.

Parameters
sourceSource owner, used to prevent nesting a copy inside its repository folder.
packageRootProject-relative installed package boundary derived from the manager script.
parentFolderAssets-contained parent folder; it may not exist yet.
repositoryNameA single folder name, not a path or asset filename.
destinationCanonical project-relative output folder on success.
errorA user-facing input/containment diagnostic on failure.
Returns
True for a distinct, nonexisting, Assets-contained destination with no inspected reparse ancestors.

Does not promise filesystem write permission, free space or full dependency safety. Existing destination folders are rejected rather than merged or overwritten.

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

◆ ValidateDestination() [2/2]

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.ValidateDestination ( WindowFrameThemeData source,
string packageRoot,
string parentFolder,
string repositoryName,
out string destination,
out string error,
out bool folderConflict )
inlinestatic

Also indicates a folder-name/existing-output conflict for field-local presentation.

False folderConflict means the parent/location needs attention. Validation decisions are unchanged.

Here is the call graph for this function:

◆ ValidateLeafName()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.ValidateLeafName ( string name,
out string error )
inlinestaticprivate

Validates one portable Windows-safe file/folder component without normalizing away invalid input.

Here is the caller graph for this function:

◆ ValidateSaveFileName()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.ValidateSaveFileName ( string fileName,
out string error )
inlinestatic

Validates the controller's existing persistent JSON filename, not the ThemeData asset name.

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

◆ ValidateSourceOrigin()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.ValidateSourceOrigin ( WindowFrameThemeData data,
string packageRoot,
out string error )
inlinestatic

Restricts creation sources to the canonical default or an explicitly selected project repository.

Parameters
errorAn explicit exclusion reason, or null for an allowed source origin.

This guard does not alter normal Manager viewing/Open actions for Demo assets.

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

◆ ValidateThemeDataName()

bool GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.ValidateThemeDataName ( string name,
out string error )
inlinestatic

Validates the repository asset/display name without silently altering it.

The name is separate from the folder and runtime JSON filename. Enter it without .asset.

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

Field Documentation

◆ DefaultThemeDataName

const string GWG.WindowFramework.Editor.ThemeRepositorySetupValidation.DefaultThemeDataName = "MyProjectThemeRepo"
static

Suggested editable name for a new project's ThemeData repository asset.