tawasuyu

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 660Markdown 302TOML 157RON 312382 Definiciones

⎇ main widgets/panes/README.md Markdown · 35 líneas · 1.5 KB Historia crudo

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1# llimphi-widget-panes
2
3A tmux-style BSP pane tree.
4
5The missing piece for "mount any tawasuyu component in an interchangeable layout
6with resizable splits". The widget knows nothing about the domains: it hosts
7opaque leaves (`View<Msg>`) in a binary tree the user splits
8(horizontal/vertical), closes, focuses (click) and resizes (dragging the
9dividers). tmux, but in-process and on Llimphi's Elm loop.
10
11Not to be confused with `llimphi-widget-panel` (the chrome of ONE titled panel):
12this is the tree of N panes.
13
14## Model
15
16- `Layout` is the tree's **structure** (which leaf lives where, with which ratio
17  per split). It lives in the host's `Model` and is manipulated with
18  `Layout::split`, `Layout::without` and `Layout::resize`.
19- The **content** of each leaf is provided by the host through a
20  `FnMut(PaneId) -> View<Msg>` closure invoked while building the view — which is
21  why it can borrow the `Model` (it need not be `'static`).
22- The resize handler *is* stored in the view tree (the draggable divider takes
23  it), so that one must be `'static + Send + Sync`. The focus one is evaluated at
24  build time (because `on_click` takes the `Msg` by value), so it carries no such
25  restriction.
26
27## Why not `Box<dyn Any>`
28
29Same as the rest of the repo: the host keeps an `enum` of its panel types and
30dispatches statically. The widget is generic over `Msg`; the host decides how to
31materialize each leaf. Zero downcasting.
32
33---
34
35Part of **llimphi** — see [llimphi](../../README.md).

README.md

llimphi-widget-panes

A tmux-style BSP pane tree.

The missing piece for "mount any tawasuyu component in an interchangeable layout with resizable splits". The widget knows nothing about the domains: it hosts opaque leaves (View<Msg>) in a binary tree the user splits (horizontal/vertical), closes, focuses (click) and resizes (dragging the dividers). tmux, but in-process and on Llimphi's Elm loop.

Not to be confused with llimphi-widget-panel (the chrome of ONE titled panel): this is the tree of N panes.

Model

Why not Box<dyn Any>

Same as the rest of the repo: the host keeps an enum of its panel types and dispatches statically. The widget is generic over Msg; the host decides how to materialize each leaf. Zero downcasting.


Part of llimphi — see llimphi.