Window Framework for UI Toolkit v2.0.x
GWG.WindowFramework.Theming.PlayerThemeStateBinding Class Referencesealed

Applies state-specific surface colours to framework tabs and context-menu rows. More...

Inheritance diagram for GWG.WindowFramework.Theming.PlayerThemeStateBinding:
Collaboration diagram for GWG.WindowFramework.Theming.PlayerThemeStateBinding:

Public Member Functions

 PlayerThemeStateBinding (VisualElement element, PlayerThemeValues values, bool tab)
 Binds a known stateful role, without intercepting click behaviour.
void Dispose ()
 Removes callbacks and returns owned styles to their original values.
void Refresh ()
 Reconciles active/disabled class and descendant label changes.

Properties

bool IsDisposed [get]
 Gets whether callbacks and overrides have been released.

Private Member Functions

void CancelPress (PointerCancelEvent evt)
void CaptureOut (PointerCaptureOutEvent evt)
void Detach (DetachFromPanelEvent evt)
void Enter (PointerEnterEvent evt)
void Leave (PointerLeaveEvent evt)
void Press (PointerDownEvent evt)
void Release (PointerUpEvent evt)

Private Attributes

string _backgroundToken
string _borderToken
Label _currentLabel
bool _disposed
readonly VisualElement _element
bool _hover
string _imageToken
PlayerThemeSurfaceBinding _label
bool _pressed
Action _releaseFocus
readonly bool _scrollbarArrow
readonly PlayerThemeSurfaceBinding _scrollbarGeometry
readonly bool _scrollbarThumb
readonly Scroller _scroller
readonly PlayerThemeValues _source
PlayerThemeSurfaceBinding _surface
readonly bool _tab
string _textToken
string _tintToken

Detailed Description

Applies state-specific surface colours to framework tabs and context-menu rows.

Owners call Refresh after class/enabled changes. Pointer hover is event-driven. Missing tokens leave original styles intact. Nested label colours use the same state as their row. Disposal restores original values through reversible surface bindings.

Constructor & Destructor Documentation

◆ PlayerThemeStateBinding()

GWG.WindowFramework.Theming.PlayerThemeStateBinding.PlayerThemeStateBinding ( VisualElement element,
PlayerThemeValues values,
bool tab )
inline

Binds a known stateful role, without intercepting click behaviour.

Parameters
elementFramework tab or context-menu item.
valuesResolved semantic values.
tabTrue for tab selection; false for context-menu hover/disabled state.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ CancelPress()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.CancelPress ( PointerCancelEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaptureOut()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.CaptureOut ( PointerCaptureOutEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Detach()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.Detach ( DetachFromPanelEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dispose()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.Dispose ( )
inline

Removes callbacks and returns owned styles to their original values.

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

◆ Enter()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.Enter ( PointerEnterEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Leave()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.Leave ( PointerLeaveEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Press()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.Press ( PointerDownEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Refresh()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.Refresh ( )
inline

Reconciles active/disabled class and descendant label changes.

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

◆ Release()

void GWG.WindowFramework.Theming.PlayerThemeStateBinding.Release ( PointerUpEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ _backgroundToken

string GWG.WindowFramework.Theming.PlayerThemeStateBinding._backgroundToken
private

◆ _borderToken

string GWG.WindowFramework.Theming.PlayerThemeStateBinding._borderToken
private

◆ _currentLabel

Label GWG.WindowFramework.Theming.PlayerThemeStateBinding._currentLabel
private

◆ _disposed

bool GWG.WindowFramework.Theming.PlayerThemeStateBinding._disposed
private

◆ _element

readonly VisualElement GWG.WindowFramework.Theming.PlayerThemeStateBinding._element
private

◆ _hover

bool GWG.WindowFramework.Theming.PlayerThemeStateBinding._hover
private

◆ _imageToken

string GWG.WindowFramework.Theming.PlayerThemeStateBinding._imageToken
private

◆ _label

PlayerThemeSurfaceBinding GWG.WindowFramework.Theming.PlayerThemeStateBinding._label
private

◆ _pressed

bool GWG.WindowFramework.Theming.PlayerThemeStateBinding._pressed
private

◆ _releaseFocus

Action GWG.WindowFramework.Theming.PlayerThemeStateBinding._releaseFocus
private

◆ _scrollbarArrow

readonly bool GWG.WindowFramework.Theming.PlayerThemeStateBinding._scrollbarArrow
private

◆ _scrollbarGeometry

readonly PlayerThemeSurfaceBinding GWG.WindowFramework.Theming.PlayerThemeStateBinding._scrollbarGeometry
private

◆ _scrollbarThumb

readonly bool GWG.WindowFramework.Theming.PlayerThemeStateBinding._scrollbarThumb
private

◆ _scroller

readonly Scroller GWG.WindowFramework.Theming.PlayerThemeStateBinding._scroller
private

◆ _source

readonly PlayerThemeValues GWG.WindowFramework.Theming.PlayerThemeStateBinding._source
private

◆ _surface

PlayerThemeSurfaceBinding GWG.WindowFramework.Theming.PlayerThemeStateBinding._surface
private

◆ _tab

readonly bool GWG.WindowFramework.Theming.PlayerThemeStateBinding._tab
private

◆ _textToken

string GWG.WindowFramework.Theming.PlayerThemeStateBinding._textToken
private

◆ _tintToken

string GWG.WindowFramework.Theming.PlayerThemeStateBinding._tintToken
private

Property Documentation

◆ IsDisposed

bool GWG.WindowFramework.Theming.PlayerThemeStateBinding.IsDisposed
get

Gets whether callbacks and overrides have been released.