Expand description
A tree table with resizable, reorderable, hideable, sortable columns.
Callers supply columns, rows, and layout; ColumnTreeOut reports edits and
actions for the caller to apply after drawing. Consumer-specific behavior stays
in the panel. The first visible column uses crate::panels::tree::node.
Layout is mutated directly; callers persist it when layout_changed is set.
ColumnLayout::frozen pins leading columns, so this widget owns horizontal
scrolling. Expansion remains caller-owned. Transient drag, menu, and text-edit
state lives in egui memory keyed by ColumnTreeSpec::id. Text edits commit on
focus loss or Enter because applying a cell edit may rebuild geometry.
Row actions share one menu for cell clicks and right-clicks. Disabled entries remain visible with tooltips explaining why they are unavailable.
Structs§
- Cell
Click - A
CellKind::Buttoncell was clicked. - Cell
Edit - One cell was edited.
- Column
Layout - The user’s column arrangement — the widget WRITES this (header drag, divider drag, hide/show, sort click) and the consumer owns and persists it.
- Column
Spec - One column: its cell key, its heading, its editor, its default width.
- Column
Tree Out - What the user did in one drawn frame.
- Column
Tree Spec - Everything the consumer supplies. Borrowed; the widget holds no state of its own beyond egui memory.
- RowAction
- One entry in a row’s action menu: what to call it, whether this ROW allows
it, and how to draw it. Everything here is the consumer’s vocabulary — the
widget only ever compares
RowAction::idfor equality when it reports the click back. - RowAction
Click - A row’s action menu fired.
- RowNode
- One row. Rows nest — this is a TREE, not a flat table — and each row’s cells are looked up by column key, so adding a column never touches the row builder’s shape.
Enums§
- Cell
Kind - What a column’s cells are, and therefore which editor the widget draws.
Constants§
- DEFAULT_
COLUMN_ WIDTH - The default width of a column whose
ColumnLayoutcarries none. - MIN_
COLUMN_ WIDTH - Minimum column width, in points — narrow enough to park a column out of the way, wide enough that its resize grip is still catchable.
Functions§
- column_
tree - Draw ONE complete column tree and return what the user did.
- value_
editor - Draw the editor for ONE value of a
CellKindand report the committed edit, if any.saltseeds the per-widget egui ids (an in-progress text buffer, a combo’s open state), so it must be stable for a given value and distinct between values;sizeis the space to fill.