Expand description
Binding helpers used by generated .yui code: a Slot remembers a
binding’s last value so widgets are only patched when it changes, and
the conversion functions turn view-model values into widget values with
readable compile errors.
Structs§
- Slot
- The last value of one binding.
Traits§
- Bind
Color - A value used as a
0xAARRGGBBcolour by a.yuibinding. - Bind
Text - A value shown as text by a
.yuibinding.
Functions§
- color
- Colour of a bound value.
- count
- A bound count (
count); out-of-range values become 0. - flag
- A bound flag (
enabled,visible,checked). - is_
selected - Whether the item with
keyis the selected one. - key
- Hash of a bound key (
key,scroll_key) — stable within a process. - number
- A bound number (
gap,font_scale, …). - set_
checked - Sets or clears the CHECKED state (inherited by non-interactive children).
- set_
count - Sets the stack count of an inventory slot;
falsefor other kinds. - set_
item - Sets the item of an item slot / inventory slot;
falsefor other kinds. - set_
placeholder - Sets the placeholder of a text box;
falsefor other kinds. - set_
source - Sets the image source of an image or the id of a surface;
falsefor other kinds. - text
- Text of a bound value.
- units
- A bound size (
w,h).