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

Applies resolved player button tokens to one explicitly owned UI Toolkit button. More...

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

Public Member Functions

 PlayerThemeButtonBinding (Button button, PlayerThemeValues values)
 Binds a button to supplied semantic colours.
void Dispose ()
 Unsubscribes callbacks and restores only overrides still owned by this binding.
void Refresh ()
 Reevaluates enabled and interaction states after owner-controlled changes.

Properties

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

Private Member Functions

void Blur (BlurEvent evt)
void Cancel (PointerCancelEvent evt)
void CaptureOut (PointerCaptureOutEvent evt)
void Detach (DetachFromPanelEvent evt)
void Down (PointerDownEvent evt)
void Enter (PointerEnterEvent evt)
void KeyDown (KeyDownEvent evt)
void KeyUp (KeyUpEvent evt)
void Leave (PointerLeaveEvent evt)
void RestoreBackground ()
void RestoreText ()
void Up (PointerUpEvent evt)

Private Attributes

StyleColor _appliedBackground
StyleColor _appliedText
readonly Button _button
bool _disposed
readonly PlayerThemeSurfaceBinding _geometry
bool _hover
bool _keyPressed
readonly StyleColor _originalBackground
readonly StyleColor _originalText
bool _ownsBackground
bool _ownsText
bool _pointerPressed
readonly PlayerThemeValues _values

Detailed Description

Applies resolved player button tokens to one explicitly owned UI Toolkit button.

Uses public APIs only. Tracks pointer and Space/Return press states and restores captured inline colours on disposal/detach. Owners must call Refresh after SetEnabled or replacing the supplied values; this binding does not poll, scan the visual tree, or mutate stylesheets. Mutate the supplied value model and call Refresh after externally changing enabled state. The source reference is retained for this binding's lifetime; recreate the binding to use a different value object. This adapter styles one button and never installs application click actions, selects a theme, saves settings or owns borrowed images.

Constructor & Destructor Documentation

◆ PlayerThemeButtonBinding()

GWG.WindowFramework.Theming.PlayerThemeButtonBinding.PlayerThemeButtonBinding ( Button button,
PlayerThemeValues values )
inline

Binds a button to supplied semantic colours.

Parameters
buttonButton within the owner's intended theme scope.
valuesResolved values; no default palette is invented.
Exceptions
ArgumentNullExceptionEither argument is null.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ Blur()

void GWG.WindowFramework.Theming.PlayerThemeButtonBinding.Blur ( BlurEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cancel()

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

◆ CaptureOut()

void GWG.WindowFramework.Theming.PlayerThemeButtonBinding.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.PlayerThemeButtonBinding.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.PlayerThemeButtonBinding.Dispose ( )
inline

Unsubscribes callbacks and restores only overrides still owned by this binding.

Does not destroy the button or textures, or override newer caller-owned values.

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

◆ Down()

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

◆ Enter()

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

◆ KeyDown()

void GWG.WindowFramework.Theming.PlayerThemeButtonBinding.KeyDown ( KeyDownEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ KeyUp()

void GWG.WindowFramework.Theming.PlayerThemeButtonBinding.KeyUp ( KeyUpEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Leave()

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

◆ Refresh()

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

Reevaluates enabled and interaction states after owner-controlled changes.

Disabled values are optional. Missing values restore original inline styles.

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

◆ RestoreBackground()

void GWG.WindowFramework.Theming.PlayerThemeButtonBinding.RestoreBackground ( )
inlineprivate
Here is the caller graph for this function:

◆ RestoreText()

void GWG.WindowFramework.Theming.PlayerThemeButtonBinding.RestoreText ( )
inlineprivate
Here is the caller graph for this function:

◆ Up()

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

Field Documentation

◆ _appliedBackground

StyleColor GWG.WindowFramework.Theming.PlayerThemeButtonBinding._appliedBackground
private

◆ _appliedText

StyleColor GWG.WindowFramework.Theming.PlayerThemeButtonBinding._appliedText
private

◆ _button

readonly Button GWG.WindowFramework.Theming.PlayerThemeButtonBinding._button
private

◆ _disposed

bool GWG.WindowFramework.Theming.PlayerThemeButtonBinding._disposed
private

◆ _geometry

readonly PlayerThemeSurfaceBinding GWG.WindowFramework.Theming.PlayerThemeButtonBinding._geometry
private

◆ _hover

bool GWG.WindowFramework.Theming.PlayerThemeButtonBinding._hover
private

◆ _keyPressed

bool GWG.WindowFramework.Theming.PlayerThemeButtonBinding._keyPressed
private

◆ _originalBackground

readonly StyleColor GWG.WindowFramework.Theming.PlayerThemeButtonBinding._originalBackground
private

◆ _originalText

readonly StyleColor GWG.WindowFramework.Theming.PlayerThemeButtonBinding._originalText
private

◆ _ownsBackground

bool GWG.WindowFramework.Theming.PlayerThemeButtonBinding._ownsBackground
private

◆ _ownsText

bool GWG.WindowFramework.Theming.PlayerThemeButtonBinding._ownsText
private

◆ _pointerPressed

bool GWG.WindowFramework.Theming.PlayerThemeButtonBinding._pointerPressed
private

◆ _values

readonly PlayerThemeValues GWG.WindowFramework.Theming.PlayerThemeButtonBinding._values
private

Property Documentation

◆ IsDisposed

bool GWG.WindowFramework.Theming.PlayerThemeButtonBinding.IsDisposed
get

Gets whether callbacks and overrides have been released.