Skip to main content

Crate urushi_adapter_ratatui

Crate urushi_adapter_ratatui 

Source
Expand description

Optional Ratatui integration for Urushi.

The adapter converts Urushi styles and resolved views into Ratatui representations. Stateless widgets write into a buffer the caller owns.

Two entry points share one cell-writing path. ViewWidget and RatatuiWidget serve a plain Ratatui application drawing into a Rect it already owns; they resolve the view and discard everything but the cells. A caller-owned Ratatui renderer that also needs the resolution resolves under available and writes the result with draw_resolved. A caller filling a sized anchor can use anchor_placement to translate its complete logical rectangle and accumulated visible intersection into a destination and source offset.

Structs§

RatatuiAnchor
A resolved anchor translated into a caller-owned Ratatui area.
RatatuiStyle
One logical TextStyle as a Ratatui style.
RatatuiWidget
A stateless Ratatui widget backed by an Urushi BlockStyle.
ViewWidget
A stateless Ratatui widget that draws an Urushi View.

Enums§

CellWriteMode
How an Urushi cell combines with content already present in a Ratatui buffer.

Traits§

RatatuiStyleExt
Extension methods for adapting an Urushi style to Ratatui.

Functions§

anchor_placement
Translates an anchor and its accumulated visible intersection into area.
available
Translates a target rectangle into the area the layout pass resolves under.
draw_resolved
Writes an already resolved view into buffer, anchored at area’s origin.
draw_resolved_with_mode
Writes an already resolved view with the selected cell composition behavior.