Expand description
Vertical or horizontal multiple split.
use rat_widget::splitter::{Split, SplitState, SplitType};
let split = Split::horizontal()
.constraints([
Constraint::Length(25),
Constraint::Length(25),
Constraint::Fill(1),
])
.split_type(SplitType::Scroll)
.into_widget(area, &mut state.split);
Line::from("first")
.render(state.split.widget_areas[0], buf);
Line::from("second")
.render(state.split.widget_areas[1], buf);
Line::from("third")
.render(state.split.widget_areas[2], buf);
// render split decorations
split.render(area, buf, &mut state.split);
Structs§
- Layout
Widget - Widget for the Layout of the split.
- Split
- Splits the area in multiple parts and renders a UI that allows changing the sizes.
- Split
State - State & event handling.
- Split
Style - Combined styles for the Split.
- Split
Widget - Primary widget for rendering the Split.
Enums§
- Resize
Constraint - How will one split area be resized when resizing the whole split-widget.
- Split
Resize - Strategy for resizing the split-areas.
- Split
Type - Render variants for the splitter.
Functions§
- handle_
events - Handle all events. Text events are only processed if focus is true. Mouse events are processed if they are in range.
- handle_
mouse_ events - Handle only mouse-events.