Expand description
Layout engine for Presentar UI framework.
Implements Flexbox-inspired and CSS Grid layout with SIMD acceleration.
§ComputeBlock Grid Compositor
The compute_block module provides a compositor for managing TUI panel layouts:
- Intrinsic Sizing: Widgets report min/preferred/max sizes via
SizeHint - Cell Ownership: Prevents rendering conflicts via
GridCompositor - Clipping: Enforces bounds at render time to prevent artifacts
See ComputeBlock and GridCompositor for details.
Structs§
- Compute
Block - A named region in the grid with ownership semantics.
- Flex
Item - Flex item properties.
- Grid
Area - A named grid area spanning rows and columns.
- Grid
Compositor - Grid compositor managing block ownership.
- Grid
Item - Grid item placement properties.
- Grid
Layout - Computed grid layout result.
- Grid
Template - Grid template definition.
- Layout
Cache - Layout cache for memoizing measure results.
- Layout
Engine - Layout engine with memoization.
- Rect
- Rectangle in terminal coordinates.
- Size
- Size in terminal cells (u16 for compatibility with ratatui).
- Size
Hint - Size hints for content-aware layout.
Enums§
- Clip
Mode - Clipping behavior for blocks.
- Compositor
Error - Errors from compositor operations.
- Flex
Align - Cross axis alignment for flex layout.
- Flex
Constraint - Extended constraint with Fill support.
- Flex
Direction - Direction for flex layout.
- Flex
Justify - Main axis alignment for flex layout.
- Grid
Align - Alignment within a grid cell.
- Grid
Auto Flow - Auto-placement flow direction.
- Track
Size - A track size specification.
Traits§
- Intrinsic
Size - Trait for widgets with intrinsic sizing.
Functions§
- auto_
place_ items - Auto-place items in a grid.
- compute_
grid_ layout - Compute grid track sizes.
- compute_
intrinsic_ layout - Compute layout respecting intrinsic sizes.