pub struct PaneContainer { /* private fields */ }Available on crate feature
master-layout only.Expand description
Container for managing panes within a tab
Implementations§
Source§impl PaneContainer
impl PaneContainer
Sourcepub fn new(layout: PaneLayout) -> Self
pub fn new(layout: PaneLayout) -> Self
Create a new pane container with the given layout
Sourcepub fn pane_count(&self) -> usize
pub fn pane_count(&self) -> usize
Get number of panes
Sourcepub fn get_pane_mut(&mut self, id: PaneId) -> Option<&mut Pane>
pub fn get_pane_mut(&mut self, id: PaneId) -> Option<&mut Pane>
Get mutable pane by ID
Sourcepub fn get_pane_by_index(&self, index: usize) -> Option<&Pane>
pub fn get_pane_by_index(&self, index: usize) -> Option<&Pane>
Get pane by index
Sourcepub fn get_pane_by_index_mut(&mut self, index: usize) -> Option<&mut Pane>
pub fn get_pane_by_index_mut(&mut self, index: usize) -> Option<&mut Pane>
Get mutable pane by index
Sourcepub fn find_pane_at(&self, x: u16, y: u16) -> Option<PaneId>
pub fn find_pane_at(&self, x: u16, y: u16) -> Option<PaneId>
Find pane at the given coordinates
Sourcepub fn update_layout(&mut self, available_area: Rect)
pub fn update_layout(&mut self, available_area: Rect)
Calculate and update pane areas based on layout
Sourcepub fn select_next(&self, current: Option<PaneId>) -> Option<PaneId>
pub fn select_next(&self, current: Option<PaneId>) -> Option<PaneId>
Select next pane (cycle forward)
Sourcepub fn select_prev(&self, current: Option<PaneId>) -> Option<PaneId>
pub fn select_prev(&self, current: Option<PaneId>) -> Option<PaneId>
Select previous pane (cycle backward)
Sourcepub fn select_left(&self, current: PaneId) -> Option<PaneId>
pub fn select_left(&self, current: PaneId) -> Option<PaneId>
Select pane to the left (h key)
Sourcepub fn select_right(&self, current: PaneId) -> Option<PaneId>
pub fn select_right(&self, current: PaneId) -> Option<PaneId>
Select pane to the right (l key)
Sourcepub fn select_down(&self, current: PaneId) -> Option<PaneId>
pub fn select_down(&self, current: PaneId) -> Option<PaneId>
Select pane below (j key)
Sourcepub fn render(&mut self, frame: &mut Frame<'_>, mode: &InteractionMode)
pub fn render(&mut self, frame: &mut Frame<'_>, mode: &InteractionMode)
Render all panes
Sourcepub fn find_divider_at(&self, mouse_x: u16, mouse_y: u16) -> Option<usize>
pub fn find_divider_at(&self, mouse_x: u16, mouse_y: u16) -> Option<usize>
Check if mouse is on any divider and return the split index
Sourcepub fn start_drag(&mut self, divider_index: usize)
pub fn start_drag(&mut self, divider_index: usize)
Start dragging a divider
Sourcepub fn update_drag(&mut self, mouse_x: u16, mouse_y: u16)
pub fn update_drag(&mut self, mouse_x: u16, mouse_y: u16)
Update drag position
Sourcepub fn is_dragging(&self) -> bool
pub fn is_dragging(&self) -> bool
Check if any divider is currently being dragged
Sourcepub fn update_hover(&mut self, mouse_x: u16, mouse_y: u16)
pub fn update_hover(&mut self, mouse_x: u16, mouse_y: u16)
Update hover state for dividers
Sourcepub fn clear_hover(&mut self)
pub fn clear_hover(&mut self)
Clear hover state for all dividers
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PaneContainer
impl !RefUnwindSafe for PaneContainer
impl !Send for PaneContainer
impl !Sync for PaneContainer
impl Unpin for PaneContainer
impl !UnwindSafe for PaneContainer
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more