#[repr(C)]pub struct SplitPane {
pub split_pane_state: SplitPaneStateWrapper,
pub first: Dom,
pub second: Dom,
pub container_style: CssPropertyWithConditionsVec,
}Expand description
A two-pane resizable container with a draggable divider.
Fields§
§split_pane_state: SplitPaneStateWrapper§first: DomThe first pane’s content (left for horizontal, top for vertical).
second: DomThe second pane’s content (right for horizontal, bottom for vertical).
container_style: CssPropertyWithConditionsVecStyle for the outer container.
Implementations§
Source§impl SplitPane
impl SplitPane
Sourcepub fn create(direction: SplitDirection, first: Dom, second: Dom) -> Self
pub fn create(direction: SplitDirection, first: Dom, second: Dom) -> Self
Creates a split pane with the two child Doms, split 50/50.
Sourcepub const fn set_ratio(&mut self, ratio: f32)
pub const fn set_ratio(&mut self, ratio: f32)
Sets the first-pane fraction, clamped into [MIN_RATIO, MAX_RATIO].
Sourcepub const fn with_ratio(self, ratio: f32) -> Self
pub const fn with_ratio(self, ratio: f32) -> Self
Builder-style setter for the first-pane fraction.
Sourcepub fn set_direction(&mut self, direction: SplitDirection)
pub fn set_direction(&mut self, direction: SplitDirection)
Sets the orientation (also refreshes the default container style).
Sourcepub fn with_direction(self, direction: SplitDirection) -> Self
pub fn with_direction(self, direction: SplitDirection) -> Self
Builder-style setter for the orientation.
Sourcepub fn with_container_style(self, css: CssPropertyWithConditionsVec) -> Self
pub fn with_container_style(self, css: CssPropertyWithConditionsVec) -> Self
Replaces the default container style.
pub fn swap_with_default(&mut self) -> Self
pub fn set_on_resize<C: Into<SplitPaneOnResizeCallback>>( &mut self, data: RefAny, on_resize: C, )
pub fn with_on_resize<C: Into<SplitPaneOnResizeCallback>>( self, data: RefAny, on_resize: C, ) -> Self
pub fn dom(self) -> Dom
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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