Skip to content
Ooidget

Ooidget Component Format 0.1Editor's Draft

Terminology

Component : A named, reusable unit of user interface, defined by a component file.

Widget : The widget member of a component file: the component’s drawing, state, children and behaviour. A component without a widget is a shared behaviour.

Instance : A component in use: its definition together with its current state. A runtime creates one instance for each component it is asked to show and one for each child of it.

State : A JSON object holding an instance’s values. The state member of a widget gives the initial state; behaviours change it by returning a state patch.

State patch : A JSON object whose members replace the members of the same names in a state, as by a shallow merge.

View : The state an instance’s expressions see. For the root instance it is its state. For a child it is computed from the parent’s view as set out in Children.

Layer : One drawing instruction of a widget: a shape, text, image, SVG fragment, nested component or host-drawn box.

Box : A rectangle [x, y, width, height] in an instance’s design units, origin at its top-left corner, y downward.

Design unit : The unit of every length in a document. One design unit is one CSS pixel at a scale of 1 (see CSS Values); a runtime maps design units to device pixels by its scale factor.

Expression : An ECMAScript expression in a string, evaluated against a view. See Expressions.

Behaviour : ECMAScript source that evaluates to an object of event handlers. See Behaviours.

Host : The application embedding a runtime. The host supplies what a document names but does not contain: assets, the contents of slots, primitives, painters and the handling of commands. See Host interface.

Runtime : Software that loads documents and renders instances, conforming to a profile.

Pointer state : The object ui an expression sees: whether the pointer is over the instance, whether it is pressed, the region under it, and the instance’s size. See Expressions.