pub struct SplitPanel<L: Component, R: Component> { /* private fields */ }Implementations§
Source§impl<L: Component, R: Component> SplitPanel<L, R>
impl<L: Component, R: Component> SplitPanel<L, R>
pub fn new(left: L, right: R, layout: SplitLayout) -> Self
pub fn with_separator(self, text: impl Into<String>, style: Style) -> Self
pub fn with_resize_keys(self) -> Self
pub fn left(&self) -> &L
pub fn left_mut(&mut self) -> &mut L
pub fn right(&self) -> &R
pub fn right_mut(&mut self) -> &mut R
pub fn focus_left(&mut self)
pub fn focus_right(&mut self)
pub fn is_left_focused(&self) -> bool
pub fn widths(&self, total_width: u16) -> SplitWidths
pub fn set_separator_style(&mut self, style: Style)
Trait Implementations§
Source§impl<L: Component, R: Component> Component for SplitPanel<L, R>
impl<L: Component, R: Component> Component for SplitPanel<L, R>
Source§type Message = Either<<L as Component>::Message, <R as Component>::Message>
type Message = Either<<L as Component>::Message, <R as Component>::Message>
The message type emitted by this widget.
Source§async fn on_event(&mut self, event: &Event) -> Option<Vec<Self::Message>>
async fn on_event(&mut self, event: &Event) -> Option<Vec<Self::Message>>
Process an event and return the outcome. Read more
Source§fn render(&mut self, ctx: &ViewContext) -> Frame
fn render(&mut self, ctx: &ViewContext) -> Frame
Render the current state to a frame.
Auto Trait Implementations§
impl<L, R> Freeze for SplitPanel<L, R>
impl<L, R> RefUnwindSafe for SplitPanel<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for SplitPanel<L, R>
impl<L, R> Sync for SplitPanel<L, R>
impl<L, R> Unpin for SplitPanel<L, R>
impl<L, R> UnsafeUnpin for SplitPanel<L, R>where
L: UnsafeUnpin,
R: UnsafeUnpin,
impl<L, R> UnwindSafe for SplitPanel<L, R>where
L: UnwindSafe,
R: UnwindSafe,
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> 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