Log inGet started
Package

widgets.module

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

edui.widgets.controls

edui's own interactive controls, drawn on the ui.* canvas substrate (paint commands + pointer/key/scroll events) rather than the generic ui.* widgets, so an editor control looks and behaves like an editor control and enforces its type.

Controls.make(W) binds them to the widgets barrel and returns:

  • numberField(P, o) — a numeric field that only ever holds a number. Drag the value to scrub, scroll to nudge, double-click to type digits (letters can't enter); an optional ▲▼ stepper sits on the right. o = { value, onChange, key, readOnly, width?, stepper? }.
  • boolToggle(P, o) — a pill/knob toggle switch, distinct from a checkbox. o = { value, onChange, key, readOnly }.

Canvas paint points are POSITIONAL {x, y} arrays. Interaction payloads arrive as the value the edui app unwraps from the engine event envelope (d.dx/d.dy for drag/scroll).