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

Modern 2.0 Editor Window for inspecting and diagnosing the runtime state of the WindowFrameController, active window frames, system preferences, and theme bindings. More...

Inheritance diagram for GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow:
Collaboration diagram for GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow:

Public Member Functions

void CreateGUI ()
 Initializes the VisualElement tree, applies the 2.0 editor theme, and registers event subscriptions.

Static Public Member Functions

static void ShowWindow ()
 Opens or focuses the WindowFrame Controller Debugger window.

Private Member Functions

void AddCapabilityChip (VisualElement parent, string label, bool enabled)
 Adds a compact capability chip (pill) indicating whether a window permission or feature is enabled.
void AddPropertyRow (VisualElement parent, string label, string value, string variant=null)
 Appends a formatted property row to a container column.
void AutoRefresh ()
 Throttled auto-refresh loop called by EditorApplication.update. Runs at a controlled 2Hz rate to prevent editor layout thrashing and GC allocations.
VisualElement CreateActiveWindowsSection ()
 Creates the Active Windows section with live search/filter toolbar and container.
VisualElement CreateEmptyState ()
 Creates an empty state element displayed when no active windows exist or match the search filter.
VisualElement CreateHeader ()
 Creates the top header bar with title, breadcrumb, live badges, and refresh controls.
VisualElement CreateSystemOverviewCard ()
 Creates the system overview card containing runtime properties, preferences, and action buttons.
VisualElement CreateWindowCard (WindowFrame window)
 Constructs a modern 2.0 card for an individual active WindowFrame instance.
void LoadStyles ()
 Loads and applies the editor theme stylesheet to root VisualElement.
void OnDestroy ()
 Cleans up subscriptions when the editor window is closed or destroyed.
void PingController ()
 Pings and selects the active controller GameObject in the Unity Editor Hierarchy.
void RefreshActiveWindows ()
 Rebuilds the active windows list with cards matching the search filter.
void RefreshAll ()
 Refreshes all diagnostic data across controller state, properties, and active window cards.
void RefreshController ()
 Discovers and validates the active WindowFrameController singleton.
void RefreshProperties ()
 Rebuilds the 2-column system properties grid with live controller and PlayerPrefs values.
void ShowEmptyState (string title, string description)
 Displays the empty state container with specific title and description text.

Private Attributes

ScrollView _activeWindowsScrollView
bool _autoRefreshEnabled = true
Toggle _autoRefreshToggle
WindowFrameController _controller
Label _controllerStatusBadge
VisualElement _emptyStateContainer
double _lastRefreshTime
Label _modeBadge
VisualElement _propertiesGrid
Button _refreshButton
Label _windowCountBadge
ToolbarSearchField _windowSearchField
string _windowSearchFilter = string.Empty

Static Private Attributes

const double RefreshInterval = 0.5

Detailed Description

Modern 2.0 Editor Window for inspecting and diagnosing the runtime state of the WindowFrameController, active window frames, system preferences, and theme bindings.

Consumes the WindowFramework 2.0 tokenized editor design system (WFW.EditorTokens.*). Features a throttled auto-refresh cycle to eliminate editor GC churn, live search/filtering of active window instances, instant hierarchy pinging, and direct execution of controller actions.

Member Function Documentation

◆ AddCapabilityChip()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.AddCapabilityChip ( VisualElement parent,
string label,
bool enabled )
inlineprivate

Adds a compact capability chip (pill) indicating whether a window permission or feature is enabled.

Parameters
parentParent visual element container.
labelCapability display label.
enabledPermission status.
Here is the caller graph for this function:

◆ AddPropertyRow()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.AddPropertyRow ( VisualElement parent,
string label,
string value,
string variant = null )
inlineprivate

Appends a formatted property row to a container column.

Parameters
parentParent visual element container.
labelDisplay label string.
valueDisplay value string.
variantOptional semantic variant key.
Here is the caller graph for this function:

◆ AutoRefresh()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.AutoRefresh ( )
inlineprivate

Throttled auto-refresh loop called by EditorApplication.update. Runs at a controlled 2Hz rate to prevent editor layout thrashing and GC allocations.

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

◆ CreateActiveWindowsSection()

VisualElement GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.CreateActiveWindowsSection ( )
inlineprivate

Creates the Active Windows section with live search/filter toolbar and container.

Returns
A configured VisualElement section.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateEmptyState()

VisualElement GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.CreateEmptyState ( )
inlineprivate

Creates an empty state element displayed when no active windows exist or match the search filter.

Returns
A configured VisualElement empty state.
Here is the caller graph for this function:

◆ CreateGUI()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.CreateGUI ( )
inline

Initializes the VisualElement tree, applies the 2.0 editor theme, and registers event subscriptions.

Here is the call graph for this function:

◆ CreateHeader()

VisualElement GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.CreateHeader ( )
inlineprivate

Creates the top header bar with title, breadcrumb, live badges, and refresh controls.

Returns
A configured VisualElement header.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSystemOverviewCard()

VisualElement GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.CreateSystemOverviewCard ( )
inlineprivate

Creates the system overview card containing runtime properties, preferences, and action buttons.

Returns
A configured VisualElement card.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateWindowCard()

VisualElement GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.CreateWindowCard ( WindowFrame window)
inlineprivate

Constructs a modern 2.0 card for an individual active WindowFrame instance.

Parameters
windowThe target active window instance.
Returns
A configured VisualElement card.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadStyles()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.LoadStyles ( )
inlineprivate

Loads and applies the editor theme stylesheet to root VisualElement.

Here is the caller graph for this function:

◆ OnDestroy()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.OnDestroy ( )
inlineprivate

Cleans up subscriptions when the editor window is closed or destroyed.

Here is the call graph for this function:

◆ PingController()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.PingController ( )
inlineprivate

Pings and selects the active controller GameObject in the Unity Editor Hierarchy.

Here is the caller graph for this function:

◆ RefreshActiveWindows()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.RefreshActiveWindows ( )
inlineprivate

Rebuilds the active windows list with cards matching the search filter.

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

◆ RefreshAll()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.RefreshAll ( )
inlineprivate

Refreshes all diagnostic data across controller state, properties, and active window cards.

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

◆ RefreshController()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.RefreshController ( )
inlineprivate

Discovers and validates the active WindowFrameController singleton.

Here is the caller graph for this function:

◆ RefreshProperties()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.RefreshProperties ( )
inlineprivate

Rebuilds the 2-column system properties grid with live controller and PlayerPrefs values.

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

◆ ShowEmptyState()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.ShowEmptyState ( string title,
string description )
inlineprivate

Displays the empty state container with specific title and description text.

Parameters
titleTitle message to display.
descriptionExplanation or actionable guidance.
Here is the caller graph for this function:

◆ ShowWindow()

void GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.ShowWindow ( )
inlinestatic

Opens or focuses the WindowFrame Controller Debugger window.

Field Documentation

◆ _activeWindowsScrollView

ScrollView GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._activeWindowsScrollView
private

◆ _autoRefreshEnabled

bool GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._autoRefreshEnabled = true
private

◆ _autoRefreshToggle

Toggle GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._autoRefreshToggle
private

◆ _controller

WindowFrameController GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._controller
private

◆ _controllerStatusBadge

Label GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._controllerStatusBadge
private

◆ _emptyStateContainer

VisualElement GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._emptyStateContainer
private

◆ _lastRefreshTime

double GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._lastRefreshTime
private

◆ _modeBadge

Label GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._modeBadge
private

◆ _propertiesGrid

VisualElement GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._propertiesGrid
private

◆ _refreshButton

Button GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._refreshButton
private

◆ _windowCountBadge

Label GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._windowCountBadge
private

◆ _windowSearchField

ToolbarSearchField GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._windowSearchField
private

◆ _windowSearchFilter

string GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow._windowSearchFilter = string.Empty
private

◆ RefreshInterval

const double GWG.WindowFramework.Editor.WindowFrameControllerDebugWindow.RefreshInterval = 0.5
staticprivate