Skip to main content

Module components

Module components 

Source
Expand description

A mod’s .yui components (src/**/*.yui with a <Component> root — Yog-IDLE’s docs/yui.md, “Components”), read straight from their markup: no build needed to list them in the toolbox, to edit one in the designer, or to draw an instance whose bindings only name its own properties (text="{x:Bind label}") — the instance is expanded in place, its values substituted. Components whose bindings call code ({x:Bind caption()}) are compiled: the designer host draws those with the mod’s library (custom).

Structs§

Def
One component of the mod.

Constants§

INNER
Joins an expanded instance’s uid and its inner element’s path: never in a document’s own uids, so the designer can tell the inside of an instance apart (and select the instance instead).

Functions§

bind_values
node and its subtree with every binding to a property replaced by its value in values, and design-time d:attr values applied. A binding that calls code shows as {expr} in a text, and is dropped elsewhere.
binding
The expression of a {x:Bind expr[, options]} value.
definition
The component a <Component> tree declares (None: not a component — a book’s kind of page or a recipe layout isn’t one to place on screens).
design_root
A <Component> document as the designer draws it: a screen of its design size holding the body, bound to the properties’ defaults.
expand
An instance of a markup-only component as the tree it stands for: the body with the instance’s property values, the instance’s own attributes (position, size, style — as yog build applies them to the built widget) over the body root’s, the instance’s uid on the root and uid/i/j inside.
parse_tree
A .yui document’s element tree, uids c0, c0/1, …
scan
The mod’s components, re-read when its .yui files change.
scan_with_revision
scan and a fingerprint of the .yui files it read.