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

ActivePanelPreset
Shared builder for active-panel preset layouts (tabbed, stacked).
ActivePanelStrategy
Builder for StrategyKind::ActivePanel (monocle, tabbed, stacked).
AdapterFrame
Shared adapter-frame shell for renderer backends.
AdaptiveBuilder
Builder for adaptive layouts that switch strategies at width breakpoints.
BinarySplitStrategy
Builder for StrategyKind::BinarySplit (dwindle, spiral).
BoundStrategy
A strategy with panels bound, ready to produce a layout or runtime.
BreakpointEntry
A breakpoint entry mapping a minimum viewport width to a strategy.
CenteredMaster
Builder for the centered-master preset layout.
CenteredMasterStrategy
Builder for StrategyKind::CenteredMaster.
Constraints
Sizing constraints for a panel or container within its parent.
ContainerCtx
Closure context passed into row() / col() closures for accumulating children.
Dashboard
Builder for the grid-based dashboard preset layout.
DashboardStrategy
Builder for dashboard strategies.
Deck
Builder for the deck preset layout.
DeckStrategy
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.
HolyGrail
Builder for the holy-grail preset layout.
HolyGrailStrategy
Builder for holy-grail strategy: header, footer, left sidebar, main, right sidebar.
Layout
An immutable, validated layout ready for resolution.
LayoutBuilder
Ergonomic builder for constructing layouts.
LayoutSnapshot
Serializable snapshot of a LayoutRuntime for session persistence.
LayoutTree
Arena-based mutable layout tree.
MasterStack
Builder for the master-stack preset layout.
MasterStackStrategy
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.
PanelIdGenerator
Generates sequential, unique PanelId values.
PanelKey
Stable panel identity that survives tree rebuilds.
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.
SidebarStrategy
Builder for sidebar strategy: fixed-width sidebar + grow content.
SlotDef
Definition of a named slot with fixed or grow constraints.
SnapshotBreakpoint
Serializable breakpoint entry for adaptive layouts.
SnapshotGridItem
A grid item inside a SnapshotNode::Grid container.
SnapshotSlotDef
Serializable slot definition for the Slotted strategy.
Spiral
Builder for the spiral preset layout.
Split
Builder for the split preset layout.
SplitStrategy
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.
ViewportState
Viewport state for interactive layouts.
WindowStrategy
Builder for StrategyKind::Window (scrollable).

Enums§

ActivePanelVariant
Sub-variant for single-visible-panel layouts.
Align
Cross-axis alignment for a panel within its container.
Axis
Primary axis of a container node.
CardSpan
Column span for a dashboard card.
ConstraintError
Invalid Constraints parameter.
DecorationRole
The role a decoration panel plays in the layout.
FocusDirection
Spatial direction for focus navigation.
FocusOutcome
Result of a focus operation on LayoutRuntime.
FocusRejection
Reason a focus request was rejected.
GridColumnMode
Column mode for CSS Grid-based presets.
MutationError
A runtime mutation that cannot be applied in the current state.
Node
Node type in the layout tree arena.
PaneError
Top-level error for all panes operations.
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.
SizeMode
Content-based sizing mode for a panel.
SnapshotNode
Recursive tree topology node for non-strategy snapshots.
SnapshotSource
What a snapshot restores from: a strategy recipe, a tree topology, or an adaptive breakpoint set.
StrategyConfig
Serializable strategy recipe for snapshot restore.
StrategyKind
Behavioral strategy for a layout, determining how add/remove/move/focus mutations are applied to the tree.
TreeError
Broken tree structural invariant.
ViewportError
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.

Type Aliases§

Stacked
Stacked active-panel preset: per-panel title bars above content.
Tabbed
Tabbed active-panel preset: tab bar above content panels.