pub struct SplitPaneState {
pub ratio: f64,
pub dragging: bool,
pub min_ratio: f64,
}Expand description
State for a crate::Context::split_pane /
crate::Context::vsplit_pane container.
Tracks the split ratio and drag state. Pass a mutable reference each frame
— the widget updates ratio in place when the user drags the handle or
presses arrow keys with the handle focused.
Fields§
§ratio: f64Fraction of space given to the first pane. Clamped to
[min_ratio, 1.0 - min_ratio].
dragging: boolWhether the handle is currently being dragged.
min_ratio: f64Minimum fraction allocated to either pane. Default: 0.10.
Implementations§
Source§impl SplitPaneState
impl SplitPaneState
Trait Implementations§
Source§impl Clone for SplitPaneState
impl Clone for SplitPaneState
Source§fn clone(&self) -> SplitPaneState
fn clone(&self) -> SplitPaneState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SplitPaneState
impl Debug for SplitPaneState
Source§impl Default for SplitPaneState
impl Default for SplitPaneState
Source§impl PartialEq for SplitPaneState
impl PartialEq for SplitPaneState
impl StructuralPartialEq for SplitPaneState
Auto Trait Implementations§
impl Freeze for SplitPaneState
impl RefUnwindSafe for SplitPaneState
impl Send for SplitPaneState
impl Sync for SplitPaneState
impl Unpin for SplitPaneState
impl UnsafeUnpin for SplitPaneState
impl UnwindSafe for SplitPaneState
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