pub struct SplitPane { /* private fields */ }Expand description
Computes two sub-areas from a parent area with a ratio and optional divider.
The ratio controls how much space the first pane gets (0.0..1.0). The divider is rendered between the two panes and takes 1 cell.
Implementations§
Source§impl SplitPane
impl SplitPane
Sourcepub fn horizontal() -> Self
pub fn horizontal() -> Self
Creates a horizontal split (top/bottom) with 50/50 ratio.
Sourcepub fn split(&self, area: Rect) -> (Rect, Rect, Rect)
pub fn split(&self, area: Rect) -> (Rect, Rect, Rect)
Splits the area and returns (pane_a, pane_b, divider_area). divider_area is zero-sized if no divider.
Sourcepub fn render_divider(
&self,
buf: &mut Buffer,
divider_area: Rect,
palette: AislingPalette,
)
pub fn render_divider( &self, buf: &mut Buffer, divider_area: Rect, palette: AislingPalette, )
Renders the divider character into the divider area.
Auto Trait Implementations§
impl Freeze for SplitPane
impl RefUnwindSafe for SplitPane
impl Send for SplitPane
impl Sync for SplitPane
impl Unpin for SplitPane
impl UnsafeUnpin for SplitPane
impl UnwindSafe for SplitPane
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more