Skip to main content

Crate ratatui_hypertile

Crate ratatui_hypertile 

Source
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 Hypertile for most work.

Structs§

Hypertile
Main layout state and action entry point.
HypertileBuilder
Builder for Hypertile.
HypertileWidget
StatefulWidget that calls a closure for each pane.
KeyChord
Key code plus modifiers.
Modifiers
Modifier keys.
PaneId
Stable pane identifier.
PaneSnapshot
A pane’s id, rectangle, and focus state at one point in time.

Enums§

EventOutcome
Whether an event handler consumed an event.
HypertileAction
Command understood by crate::Hypertile.
HypertileEvent
Event delivered to the layout engine or runtime.
KeyCode
Backend-agnostic key code.
MoveScope
How pane moves are resolved.
SplitPolicy
Split ratio policy.
StateError
Returned when a raw tree mutation or focus operation cannot be applied.
Towards
Start means left or up. End means right or down.