Logo FS-Skia-UI

Widget Module

The typed-tree lowering bridge: `ofControl`/`toControl` convert to and from the legacy IR, and `render` paints a `Widget<'msg>`.

Functions and values

Function or value Description

map f widget

Full Usage: map f widget

Parameters:
    f : 'a -> 'b
    widget : Widget<'a>

Returns: Widget<'b>
Type parameters: 'a, 'b

Feature 108 (US5, FR-014): `Widget.map f = ofControl ∘ Control.map f ∘ toControl` — change only the message type of the lowered control, preserving structure / key / focus identity.

f : 'a -> 'b
widget : Widget<'a>
Returns: Widget<'b>

ofControl control

Full Usage: ofControl control

Parameters:
Returns: Widget<'msg>
Type parameters: 'msg

Migration bridge: lift a legacy `Control<'msg>` into the typed tree (e.g. to drop it into a typed `Stack.Children`). FR-002.

control : Control<'msg>
Returns: Widget<'msg>

render theme widget

Full Usage: render theme widget

Parameters:
Returns: ControlRenderResult<'msg>
Type parameters: 'msg

Convenience = `Control.render theme (toControl widget)`. FR-009.

theme : Theme
widget : Widget<'msg>
Returns: ControlRenderResult<'msg>

toControl widget

Full Usage: toControl widget

Parameters:
Returns: Control<'msg>
Type parameters: 'msg

Lowering accessor — the single, explicit seam to the existing IR. Used by render and the Elmish adapter. FR-002. Invariant: toControl (ofControl c) = c.

widget : Widget<'msg>
Returns: Control<'msg>

Type something to start searching.