Expand description
Renderer-agnostic spatial layout engine.
Describe panels in rows, columns, and presets. panes solves the geometry
via Taffy’s flexbox engine and hands back a map of PanelId → Rect.
Re-exports§
pub use resolver::PanelEntry;pub use resolver::ResolvedLayout;pub use runtime::Placement;
Modules§
- compiler
- Compiles a
LayoutTreeinto a Taffy tree for layout computation. - diff
- Frame-to-frame diffing of resolved layouts.
- resolver
- Resolves compiled Taffy output into
ResolvedLayout. - runtime
- Stateful runtime with viewport tracking, caching, and frame diffing.
Macros§
- layout
- Declarative macro for building layouts from a concise DSL.
Structs§
- Centered
Master - Builder for the centered-master preset layout.
- Columns
- Builder for the equal-columns preset layout.
- Constraints
- Spatial constraints for a panel within a layout.
- Container
Ctx - Closure context for building container children.
- Dashboard
- Builder for the grid-based dashboard preset layout.
- Deck
- Builder for the deck preset layout.
- Dwindle
- Builder for the dwindle preset layout.
- Grid
- Builder for the grid preset layout.
- Holy
Grail - Builder for the holy-grail preset layout.
- Layout
- An immutable, validated layout ready for resolution.
- Layout
Builder - Ergonomic builder for constructing layouts.
- Layout
Tree - Arena-based mutable layout tree.
- Master
Stack - Builder for the master-stack preset layout.
- Monocle
- Builder for the monocle preset layout.
- NodeId
- Opaque unique identifier for a node in the layout tree.
- PanelId
- Opaque unique identifier for a panel.
- Panel
IdGenerator - Generates sequential, unique
PanelIdvalues. - Panel
Sequence - Flat ordered list of panel IDs, separate from tree topology.
- Preset
Info - Metadata about a built-in preset layout.
- Rect
- Axis-aligned rectangle defined by origin (x, y) and size (w, h).
- Scrollable
- Builder for the scrollable preset layout.
- Sidebar
- Builder for the sidebar preset layout.
- SlotDef
- Definition of a named slot with fixed or grow constraints.
- Spiral
- Builder for the spiral preset layout.
- Split
- Builder for the split preset layout.
- Stacked
- Builder for the stacked preset layout.
- Tabbed
- Builder for the tabbed preset layout.
- Viewport
State - Viewport state for interactive layouts.
Enums§
- Active
Panel Variant - Sub-variant for single-visible-panel layouts.
- Direction
- Direction for linear layouts (split, columns).
- Focus
Direction - Spatial direction for focus navigation.
- Node
- A node in the layout tree.
- Pane
Error - Errors arising from layout operations on panels and nodes.
- Panel
Input Kind - Whether a preset accepts a dynamic list of panels or fixed named slots.
- Position
- Relative position for inserting or moving nodes within a container.
- Strategy
Kind - Behavioral strategy for a layout, determining how add/remove/move/focus mutations are applied to the tree.