tawasuyu

tawasuyu/llimphi

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

Rust 484Markdown 258TOML 131RON 38118 Sutichaykuna

⎇ main widgets/detail-table/README.md Markdown · 38 siq'ikuna · 1.5 KB Ñawpa willay ch'uya

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-detail-table
2
3The **details** view of a file manager.
4
5A read-only grid of columns (name · size · date · type…) with **clickable
6headers that sort**: clicking a column emits `on_sort(col)`; the active column
7shows a `▲`/`▼` arrow. Every row is clickable (selection) and can optionally
8carry an accent tint (for labels and colours).
9
10Like the rest of the Llimphi widgets it is **render-only and stateless**: sort,
11filter and selection live in the caller's `Model` (typically a
12`nahual_source_core::Navigator`); the widget receives the rows **already sorted
13and already filtered** (just as `widget-list` receives only the visible window)
14and merely paints and notifies.
15
16Columns declare their width as `ColWidth::Flex` (distributes the leftover
17proportionally — for the name column) or `ColWidth::Fixed` (constant px — for
18size/date/type). Header and rows use the SAME distribution, so the columns stay
19aligned.
20
21```ignore
22detail_table_view(
23    DetailSpec {
24        columns: &[Column::flex("Name", 1.0), Column::fixed("Size", 90.0).right(),
25                   Column::fixed("Modified", 150.0), Column::fixed("Type", 80.0)],
26        rows,                       // already sorted/filtered by the caller
27        sort: Some((1, SortDir::Desc)),
28        row_height: 22.0,
29        caption: Some("42 entries".into()),
30        palette: DetailPalette::from_theme(&theme),
31    },
32    Msg::SortBy,                    // Fn(usize) -> Msg
33)
34```
35
36---
37
38Part of **llimphi** — see [llimphi](../../README.md).

README.md

llimphi-widget-detail-table

The details view of a file manager.

A read-only grid of columns (name · size · date · type…) with clickable headers that sort: clicking a column emits on_sort(col); the active column shows a ▲/▼ arrow. Every row is clickable (selection) and can optionally carry an accent tint (for labels and colours).

Like the rest of the Llimphi widgets it is render-only and stateless: sort, filter and selection live in the caller's Model (typically a nahual_source_core::Navigator); the widget receives the rows already sorted and already filtered (just as widget-list receives only the visible window) and merely paints and notifies.

Columns declare their width as ColWidth::Flex (distributes the leftover proportionally — for the name column) or ColWidth::Fixed (constant px — for size/date/type). Header and rows use the SAME distribution, so the columns stay aligned.

detail_table_view(
    DetailSpec {
        columns: &[Column::flex("Name", 1.0), Column::fixed("Size", 90.0).right(),
                   Column::fixed("Modified", 150.0), Column::fixed("Type", 80.0)],
        rows,                       // already sorted/filtered by the caller
        sort: Some((1, SortDir::Desc)),
        row_height: 22.0,
        caption: Some("42 entries".into()),
        palette: DetailPalette::from_theme(&theme),
    },
    Msg::SortBy,                    // Fn(usize) -> Msg
)

Part of llimphi — see llimphi.