Skip to main content

Crate panes

Crate panes 

Source
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 LayoutTree into 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§

CenteredMaster
Builder for the centered-master preset layout.
Columns
Builder for the equal-columns preset layout.
Constraints
Spatial constraints for a panel within a layout.
ContainerCtx
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.
HolyGrail
Builder for the holy-grail preset layout.
Layout
An immutable, validated layout ready for resolution.
LayoutBuilder
Ergonomic builder for constructing layouts.
LayoutTree
Arena-based mutable layout tree.
MasterStack
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.
PanelIdGenerator
Generates sequential, unique PanelId values.
PanelSequence
Flat ordered list of panel IDs, separate from tree topology.
PresetInfo
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.
ViewportState
Viewport state for interactive layouts.

Enums§

ActivePanelVariant
Sub-variant for single-visible-panel layouts.
ConstraintError
Invalid constraint parameter.
Direction
Direction for linear layouts (split, columns).
FocusDirection
Spatial direction for focus navigation.
MutationError
A mutation is not supported or invalid for the current state.
Node
A node in the layout tree.
PaneError
Errors arising from layout operations on panels and nodes.
PanelInputKind
Whether a preset accepts a dynamic list of panels or fixed named slots.
Position
Relative position for inserting or moving nodes within a container.
StrategyKind
Behavioral strategy for a layout, determining how add/remove/move/focus mutations are applied to the tree.
TreeError
Tree structure validation failure.
ViewportError
Invalid viewport dimensions.

Functions§

fixed
Create constraints with a fixed size.
grow
Create constraints with a grow factor.