|
Window Framework for UI Toolkit v2.0.x
|
Maps resolved semantic tokens onto one explicitly scoped framework surface. More...


Public Member Functions | |
| PlayerThemeSurfaceBinding (VisualElement element, PlayerThemeValues values) | |
| Creates a binding for an explicit surface and resolved token source. | |
| void | Dispose () |
| Removes callbacks and restores only overrides still owned by this binding. | |
| PlayerThemeSurfaceBinding | MapAppearance (string background=null, string text=null, string border=null, string image=null) |
| Maps optional colour and image roles to this element. | |
| PlayerThemeSurfaceBinding | MapBottomBorder (string token) |
| Maps only the bottom border colour, leaving other border roles untouched. | |
| PlayerThemeSurfaceBinding | MapCursor (string token) |
| Maps a validated cursor image while retaining the element's original cursor on release. | |
| PlayerThemeSurfaceBinding | MapFont () |
| Applies the configured shipped font without loading player font content. | |
| PlayerThemeSurfaceBinding | MapGeometry (string borderWidth=null, string cornerRadius=null, string minHeight=null, string fontSize=null, Func< bool > suppressFrameGeometry=null) |
| Maps dimensions without changing position, padding, margins or visibility. | |
| PlayerThemeSurfaceBinding | MapIconTint (string normal, string hover=null) |
| Maps icon tint with event-driven hover, restoring caller-owned styles on release. | |
| PlayerThemeSurfaceBinding | MapModalQueue () |
| Maps supported modal queue presentation values without changing dismissal policy. | |
| PlayerThemeSurfaceBinding | MapPadding (string token) |
| Maps uniform padding from a validated spacing token, restoring owned values on release. | |
| PlayerThemeSurfaceBinding | MapScrollbarGeometry (Scroller scroller) |
| Maps only a native Scroller's cross-axis thickness and arrow/end-space dimensions. | |
| PlayerThemeSurfaceBinding | MapSize (string width=null, string height=null, string minWidth=null) |
| Maps explicit dimensions without changing position, parenting or visibility. | |
| PlayerThemeSurfaceBinding | MapTint (string token) |
| Maps uniform image tint without installing interaction callbacks. | |
| void | Refresh () |
| Applies supplied values and current suppression state; no per-frame polling. | |
Properties | |
| bool | IsDisposed [get] |
| Gets whether this binding has released its callbacks and overrides. | |
Private Member Functions | |
| void | BindColor (string token, Func< StyleColor > get, Action< StyleColor > set) |
| void | BindLength (Func< string > token, Func< StyleLength > get, Action< StyleLength > set) |
| void | BindLength (string token, Func< StyleLength > get, Action< StyleLength > set, Func< bool > suppress) |
| void | BindNumber (string token, Func< StyleFloat > get, Action< StyleFloat > set, Func< bool > suppress) |
| void | Detach (DetachFromPanelEvent evt) |
| void | EnsureActive () |
| PlayerThemeSurfaceBinding | MapCursor (Func< string > token) |
Private Attributes | |
| bool | _disposed |
| readonly VisualElement | _element |
| readonly List< Action > | _refresh = new List<Action>() |
| readonly List< Action > | _restore = new List<Action>() |
| readonly PlayerThemeValues | _values |
Maps resolved semantic tokens onto one explicitly scoped framework surface.
Uses only public inline-style APIs. Owners supply mappings from the framework catalog; this class does not guess selectors, scan hierarchies or override layout positions. Refresh after values or fullscreen state changes. Detachment disposes the binding; create a fresh binding on reattachment. Texture lifetime belongs to the theme owner.
|
inline |
Creates a binding for an explicit surface and resolved token source.
| element | Element inside the intended theme scope. |
| values | Resolved tokens without an invented default palette. |
| ArgumentNullException | Either argument is null. |


|
inlineprivate |

|
inlineprivate |
|
inlineprivate |

|
inlineprivate |

|
inlineprivate |


|
inline |
Removes callbacks and restores only overrides still owned by this binding.


|
inlineprivate |


|
inline |
Maps optional colour and image roles to this element.
| background | Background token or null. |
| text | Text token or null. |
| border | Border colour token for all four sides or null. |
| image | Background image token or null. |


|
inline |
Maps only the bottom border colour, leaving other border roles untouched.
| token | Resolved bottom-border colour token. |


|
inlineprivate |

|
inline |
Maps a validated cursor image while retaining the element's original cursor on release.
| token | Canonical directional cursor image token. |
Images are borrowed from the theme owner. The hotspot is the image center, preserving the existing 16,16 hotspot for 32-pixel cursors. Omission restores the configured cursor; explicit null clears it. Detach restores before texture release.


|
inline |
Applies the configured shipped font without loading player font content.
Omitted font data leaves source styles untouched. panel-default clears the element's font override to inherit its panel font. Both legacy Font and FontDefinition properties are restored only while still owned by this binding.

|
inline |
Maps dimensions without changing position, padding, margins or visibility.
| borderWidth | All-side border width token or null. |
| cornerRadius | All-corner radius token or null. |
| minHeight | Minimum-height token or null. |
| fontSize | Font-size token or null. |
| suppressFrameGeometry | Optional current-state predicate, e.g. fullscreen frame. |
Suppression restores original border geometry so fullscreen USS rules remain effective.

|
inline |
Maps icon tint with event-driven hover, restoring caller-owned styles on release.
| normal | Normal tint token. |
| hover | Optional hover tint token. |

|
inline |
Maps supported modal queue presentation values without changing dismissal policy.

|
inline |
Maps uniform padding from a validated spacing token, restoring owned values on release.
| token | Canonical spacing role from the portable catalog. |

|
inline |
Maps only a native Scroller's cross-axis thickness and arrow/end-space dimensions.
| scroller | Owning native scroller; its direction determines the dimension axis. |

|
inline |
Maps explicit dimensions without changing position, parenting or visibility.
| width | Optional resolved width token. |
| height | Optional resolved height token. |
| minWidth | Optional resolved minimum-width token. |
Writes inline dimensions immediately when values exist, so this does affect layout sizing. It does not decide which application container owns the element. Missing tokens restore owned overrides; disposal preserves differing newer caller values. Do not map the same style property through multiple competing bindings.

|
inline |
Maps uniform image tint without installing interaction callbacks.
| token | Resolved tint role, selected by the existing state binding. |


|
inline |
Applies supplied values and current suppression state; no per-frame polling.

|
private |
|
private |
|
private |
|
private |
|
private |
|
get |
Gets whether this binding has released its callbacks and overrides.