pub struct PaneDescriptor {
pub initial_size: Option<f32>,
pub min_size: f32,
pub max_size: Option<f32>,
pub stretch: f32,
pub collapsible: bool,
pub collapsed: bool,
pub collapsed_size: f32,
pub visible: bool,
}Expand description
Per-pane configuration passed to SplitterModel::from_panes /
SplitterModel::insert_pane. Public fields + Default so it can
be built with struct-literal ..Default::default() syntax, or via the
fluent setters.
Fields§
§initial_size: Option<f32>Initial main-axis size in px. None ⇒ take an equal share (the
first layout equalizes via the stretch path).
min_size: f32Hard compression floor in px.
max_size: Option<f32>Optional growth ceiling in px.
stretch: f32Container-resize slack weight (Qt setStretchFactor). 0.0 ⇒
rigid (keeps its size on resize); >0 ⇒ absorbs slack ∝ weight.
collapsible: boolWhether the user may collapse this pane (drag-snap / double-click /
keyboard). Programmatic set_collapsed
ignores this flag (it governs interactive collapse only, like Qt’s
childrenCollapsible).
collapsed: boolInitial collapsed state.
collapsed_size: f32The main-axis size a collapsed pane folds down to (default 0 ⇒ fully
gone). Set this to keep a sliver visible while collapsed — e.g. an
accordion’s header height, so the pane shrinks to just its header and
can be re-expanded from there. The pane restores to its prior size on
expand regardless.
visible: boolWhether the pane is present at all. Unlike collapsed (which folds
the pane but keeps its grabbable gutter), a hidden pane removes both
the pane and an adjacent gutter from the layout — it reads as
absent. Toggled reactively via
set_pane_visible.
Implementations§
Source§impl PaneDescriptor
impl PaneDescriptor
pub fn new() -> Self
pub fn size(self, size: f32) -> Self
pub fn min_size(self, min: f32) -> Self
pub fn max_size(self, max: f32) -> Self
pub fn stretch(self, stretch: f32) -> Self
pub fn collapsible(self, collapsible: bool) -> Self
pub fn collapsed(self, collapsed: bool) -> Self
Sourcepub fn collapsed_size(self, px: f32) -> Self
pub fn collapsed_size(self, px: f32) -> Self
Size a collapsed pane folds down to (default 0). See
collapsed_size.
pub fn visible(self, visible: bool) -> Self
Trait Implementations§
Source§impl Clone for PaneDescriptor
impl Clone for PaneDescriptor
Source§fn clone(&self) -> PaneDescriptor
fn clone(&self) -> PaneDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PaneDescriptor
impl Debug for PaneDescriptor
Auto Trait Implementations§
impl Freeze for PaneDescriptor
impl RefUnwindSafe for PaneDescriptor
impl Send for PaneDescriptor
impl Sync for PaneDescriptor
impl Unpin for PaneDescriptor
impl UnsafeUnpin for PaneDescriptor
impl UnwindSafe for PaneDescriptor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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