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

DemoControl is a MonoBehaviour class used exclusively for the demo scene of the Window Framework. It demonstrates the initialization and usage of various window types, including the startup menu, demo control window, and escape menu functionality. More...

Inheritance diagram for GWG.WindowFramework.Demo.DemoControl:
Collaboration diagram for GWG.WindowFramework.Demo.DemoControl:

Public Member Functions

void CreateExampleWindow ()
 Generates a dynamically created generic example window with no content.
void OnDemoClicked ()
 Opens the demo page window and selects configured page zero.
void OnHelpClicked ()
 Opens the demo page window and selects page nine; requires at least ten valid pages.
void OnSettingsClicked ()
 Delegates to the configured controller's runtime settings-window workflow.
void OnThemeStudioClicked ()
 Opens the existing editor Theme Manager, then configured demo page one.

Properties

DemoPageData DemoPageData [get]
 Gets the configured DemoPageData asset containing documentation pages and metadata.
static DemoControl Instance [get, private set]

Private Member Functions

void Awake ()
WindowFrame CreateStartupMenuExample ()
 Creates a fullscreen startup menu window with custom styling and content. This window serves as an example of how to use the Window Framework for creating menus.
void OnDestroy ()
void Start ()
 Unity's Start method is called when the script is first initialized. It sets up the demo scene by removing unnecessary elements, creating the demo control window, and adding the startup menu to the UI hierarchy.
void Update ()
 Unity's Update method is called once per frame. It listens for the Escape KeyValue press to toggle the Example EscapeMenuWindow.

Private Attributes

DemoPageData _demoPageData
InputAction _escapeAction
VisualElement rootElement
 Gets the root element of the UI hierarchy from the WindowFrameController instance. This is the main container where all windows and UI elements are added.

Detailed Description

DemoControl is a MonoBehaviour class used exclusively for the demo scene of the Window Framework. It demonstrates the initialization and usage of various window types, including the startup menu, demo control window, and escape menu functionality.

Member Function Documentation

◆ Awake()

void GWG.WindowFramework.Demo.DemoControl.Awake ( )
inlineprivate

◆ CreateExampleWindow()

void GWG.WindowFramework.Demo.DemoControl.CreateExampleWindow ( )
inline

Generates a dynamically created generic example window with no content.

Here is the call graph for this function:

◆ CreateStartupMenuExample()

WindowFrame GWG.WindowFramework.Demo.DemoControl.CreateStartupMenuExample ( )
inlineprivate

Creates a fullscreen startup menu window with custom styling and content. This window serves as an example of how to use the Window Framework for creating menus.

Returns
A WindowFrame object representing the startup menu.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnDemoClicked()

void GWG.WindowFramework.Demo.DemoControl.OnDemoClicked ( )
inline

Opens the demo page window and selects configured page zero.

Requires initialized controller/root and valid page data. Root query follows existing instance policy; it is not guaranteed to refer to a newly allocated window after deduplication.

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

◆ OnDestroy()

void GWG.WindowFramework.Demo.DemoControl.OnDestroy ( )
inlineprivate

◆ OnHelpClicked()

void GWG.WindowFramework.Demo.DemoControl.OnHelpClicked ( )
inline

Opens the demo page window and selects page nine; requires at least ten valid pages.

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

◆ OnSettingsClicked()

void GWG.WindowFramework.Demo.DemoControl.OnSettingsClicked ( )
inline

Delegates to the configured controller's runtime settings-window workflow.

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

◆ OnThemeStudioClicked()

void GWG.WindowFramework.Demo.DemoControl.OnThemeStudioClicked ( )
inline

Opens the existing editor Theme Manager, then configured demo page one.

In player only the page launch executes. Requires at least two configured pages.

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

◆ Start()

void GWG.WindowFramework.Demo.DemoControl.Start ( )
inlineprivate

Unity's Start method is called when the script is first initialized. It sets up the demo scene by removing unnecessary elements, creating the demo control window, and adding the startup menu to the UI hierarchy.

Here is the call graph for this function:

◆ Update()

void GWG.WindowFramework.Demo.DemoControl.Update ( )
inlineprivate

Unity's Update method is called once per frame. It listens for the Escape KeyValue press to toggle the Example EscapeMenuWindow.

Here is the call graph for this function:

Field Documentation

◆ _demoPageData

DemoPageData GWG.WindowFramework.Demo.DemoControl._demoPageData
private

◆ _escapeAction

InputAction GWG.WindowFramework.Demo.DemoControl._escapeAction
private

◆ rootElement

VisualElement GWG.WindowFramework.Demo.DemoControl.rootElement
private

Gets the root element of the UI hierarchy from the WindowFrameController instance. This is the main container where all windows and UI elements are added.

Property Documentation

◆ DemoPageData

DemoPageData GWG.WindowFramework.Demo.DemoControl.DemoPageData
get

Gets the configured DemoPageData asset containing documentation pages and metadata.

◆ Instance

DemoControl GWG.WindowFramework.Demo.DemoControl.Instance
staticgetprivate set