Expand description
BSP tiling layout for ratatui.
Handles splits, focus, resize, and movement. It only computes rectangles, you render each pane and handle input.
See ratatui-hypertile-extras
for a ready-made runtime with plugins, keymaps, and a palette.
use ratatui::layout::Direction;
use ratatui_hypertile::{Hypertile, HypertileAction, EventOutcome};
let mut layout = Hypertile::new();
let pane = layout.split_focused(Direction::Horizontal).unwrap();
let outcome = layout.apply_action(HypertileAction::FocusNext);
assert_eq!(outcome, EventOutcome::Consumed);Modules§
- prelude
- Re-exports every public type for convenience.
- raw
- Low-level tree types and state. Use
Hypertilefor most work.
Structs§
- Hypertile
- Main layout state and action entry point.
- Hypertile
Builder - Builder for
Hypertile. - Hypertile
Widget StatefulWidgetthat calls a closure for each pane.- KeyChord
- Key code plus modifiers.
- Modifiers
- Modifier keys.
- PaneId
- Stable pane identifier.
- Pane
Snapshot - A pane’s id, rectangle, and focus state at one point in time.
Enums§
- Event
Outcome - Whether an event handler consumed an event.
- Hypertile
Action - Command understood by
crate::Hypertile. - Hypertile
Event - Event delivered to the layout engine or runtime.
- KeyCode
- Backend-agnostic key code.
- Move
Scope - How pane moves are resolved.
- Split
Policy - Split ratio policy.
- State
Error - Returned when a raw tree mutation or focus operation cannot be applied.
- Towards
Startmeans left or up.Endmeans right or down.