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 diff::DiffResult;pub use diff::LayoutDiff;pub use diff::OverlayDiff;pub use diff::OverlayDiffScratch;pub use diff::OverlayRectChange;pub use diff::PanelDiffScratch;pub use diff::PanelRectChange;pub use diff::PanelScratch;pub use diff::RectChange;pub use overlay::AnchorFailure;pub use overlay::ExtentValue;pub use overlay::HAlign;pub use overlay::Overlay;pub use overlay::OverlayAnchor;pub use overlay::OverlayDef;pub use overlay::OverlayEntry;pub use overlay::OverlayExtent;pub use overlay::OverlayId;pub use overlay::SnapshotOverlay;pub use overlay::VAlign;pub use resolver::BoundaryAxis;pub use resolver::BoundaryHit;pub use resolver::DecorationPanelInfo;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.
- overlay
- Overlay types for floating UI elements rendered above the base layout.
- resolver
- Resolves compiled Taffy output into
ResolvedLayout. - runtime
- Stateful runtime with viewport tracking, caching, and frame diffing.
Macros§
- impl_
adapter - Generates the 5 standard adapter functions for a renderer backend.
- layout
- Declarative macro for building layouts from a concise DSL.
Structs§
- Active
Panel Preset - Shared builder for active-panel preset layouts (tabbed, stacked).
- Active
Panel Strategy - Builder for
StrategyKind::ActivePanel(monocle, tabbed, stacked). - Adapter
Frame - Shared adapter-frame shell for renderer backends.
- Adaptive
Builder - Builder for adaptive layouts that switch strategies at width breakpoints.
- Binary
Split Strategy - Builder for
StrategyKind::BinarySplit(dwindle, spiral). - Bound
Strategy - A strategy with panels bound, ready to produce a layout or runtime.
- Breakpoint
Entry - A breakpoint entry mapping a minimum viewport width to a strategy.
- Centered
Master - Builder for the centered-master preset layout.
- Centered
Master Strategy - Builder for
StrategyKind::CenteredMaster. - Constraints
- Sizing constraints for a panel or container within its parent.
- Container
Ctx - Closure context passed into
row()/col()closures for accumulating children. - Dashboard
- Builder for the grid-based dashboard preset layout.
- Dashboard
Strategy - Builder for dashboard strategies.
- Deck
- Builder for the deck preset layout.
- Deck
Strategy - Builder for
StrategyKind::Deck. - Dwindle
- Builder for the dwindle preset layout.
- Grid
- Configuration for a CSS Grid container node.
- GridCtx
- Closure context passed into
grid()closures for accumulating grid children. - Holy
Grail - Builder for the holy-grail preset layout.
- Holy
Grail Strategy - Builder for holy-grail strategy: header, footer, left sidebar, main, right sidebar.
- Layout
- An immutable, validated layout ready for resolution.
- Layout
Builder - Ergonomic builder for constructing layouts.
- Layout
Snapshot - Serializable snapshot of a
LayoutRuntimefor session persistence. - Layout
Tree - Arena-based mutable layout tree.
- Master
Stack - Builder for the master-stack preset layout.
- Master
Stack Strategy - Builder for
StrategyKind::MasterStack. - 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
Key - Stable panel identity that survives tree rebuilds.
- 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.
- Sidebar
Strategy - Builder for sidebar strategy: fixed-width sidebar + grow content.
- SlotDef
- Definition of a named slot with fixed or grow constraints.
- Snapshot
Breakpoint - Serializable breakpoint entry for adaptive layouts.
- Snapshot
Grid Item - A grid item inside a
SnapshotNode::Gridcontainer. - Snapshot
Slot Def - Serializable slot definition for the Slotted strategy.
- Spiral
- Builder for the spiral preset layout.
- Split
- Builder for the split preset layout.
- Split
Strategy - Builder for split (two panels with configurable ratio and direction).
- Strategy
- A configured layout strategy, decoupled from panel content. Clone and reuse across different panel sets.
- Viewport
State - Viewport state for interactive layouts.
- Window
Strategy - Builder for
StrategyKind::Window(scrollable).
Enums§
- Active
Panel Variant - Sub-variant for single-visible-panel layouts.
- Align
- Cross-axis alignment for a panel within its container.
- Axis
- Primary axis of a container node.
- Card
Span - Column span for a dashboard card.
- Constraint
Error - Invalid
Constraintsparameter. - Decoration
Role - The role a decoration panel plays in the layout.
- Focus
Direction - Spatial direction for focus navigation.
- Focus
Outcome - Result of a focus operation on
LayoutRuntime. - Focus
Rejection - Reason a focus request was rejected.
- Grid
Column Mode - Column mode for CSS Grid-based presets.
- Mutation
Error - A runtime mutation that cannot be applied in the current state.
- Node
- Node type in the layout tree arena.
- Pane
Error - Top-level error for all panes operations.
- 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.
- Size
Mode - Content-based sizing mode for a panel.
- Snapshot
Node - Recursive tree topology node for non-strategy snapshots.
- Snapshot
Source - What a snapshot restores from: a strategy recipe, a tree topology, or an adaptive breakpoint set.
- Strategy
Config - Serializable strategy recipe for snapshot restore.
- Strategy
Kind - Behavioral strategy for a layout, determining how add/remove/move/focus mutations are applied to the tree.
- Tree
Error - Broken tree structural invariant.
- Viewport
Error - Invalid viewport dimension or scroll offset.
Functions§
- fixed
- Create fixed-size constraints with the given pixel value.
- grow
- Create grow constraints with the given flex-grow weight.