Module splitter

Module splitter 

Source
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§

Split
Splits the area in multiple parts and renders a UI that allows changing the sizes.
SplitState
State & event handling.
SplitStyle
Combined styles for the Split.
SplitWidget
Primary widget for rendering the Split.

Enums§

SplitResize
Strategy for resizing the split-areas.
SplitType
Render variants for the splitter.