pub struct SplitViewWidget {
pub left_content: String,
pub right_content: String,
pub split_ratio: u8,
pub direction: SplitDirection,
pub active_panel: usize,
pub left_scroll: usize,
pub right_scroll: usize,
}Expand description
Split view widget
Fields§
§left_content: StringLeft/top panel content
right_content: StringRight/bottom panel content
split_ratio: u8Split ratio (0-100)
direction: SplitDirectionSplit direction
active_panel: usizeActive panel (0 = left/top, 1 = right/bottom)
left_scroll: usizeLeft/top panel scroll
right_scroll: usizeRight/bottom panel scroll
Implementations§
Source§impl SplitViewWidget
impl SplitViewWidget
Sourcepub fn horizontal() -> Self
pub fn horizontal() -> Self
Create a horizontal split view
Sourcepub fn adjust_split(&mut self, delta: i8)
pub fn adjust_split(&mut self, delta: i8)
Adjust split ratio
Sourcepub fn switch_panel(&mut self)
pub fn switch_panel(&mut self)
Switch active panel
Sourcepub fn active_content(&self) -> &str
pub fn active_content(&self) -> &str
Get active panel content
Sourcepub fn active_scroll(&self) -> usize
pub fn active_scroll(&self) -> usize
Get active panel scroll
Sourcepub fn scroll_down(&mut self)
pub fn scroll_down(&mut self)
Scroll active panel down
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SplitViewWidget
impl RefUnwindSafe for SplitViewWidget
impl Send for SplitViewWidget
impl Sync for SplitViewWidget
impl Unpin for SplitViewWidget
impl UnwindSafe for SplitViewWidget
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