pub struct ResizablePanel { /* private fields */ }Expand description
One panel’s initial size and constraints, as fractions of the usable space, with optional pixel limits that apply once the group has been laid out.
Implementations§
Source§impl ResizablePanel
impl ResizablePanel
Sourcepub fn new(default_size: f32) -> Self
pub fn new(default_size: f32) -> Self
A panel starting at default_size, free to resize between zero and one.
Sourcepub fn pixel_limits(self, limits: RangeInclusive<Pixels>) -> Self
pub fn pixel_limits(self, limits: RangeInclusive<Pixels>) -> Self
Bounds the panel’s expanded size in logical pixels of usable space, in addition to its fractional limits; the tighter bound wins. Pixel limits follow the measured group, so a narrower window raises a pixel minimum’s share. When the measured space cannot satisfy every panel’s pixel limits, the group falls back to the fractional limits alone.
§Panics
Bounds must be finite and satisfy 0 <= minimum <= maximum.
Sourcepub fn limits(self, limits: RangeInclusive<f32>) -> Self
pub fn limits(self, limits: RangeInclusive<f32>) -> Self
Bounds the panel’s expanded size.
§Panics
Bounds must be finite and satisfy 0 <= minimum <= maximum <= 1.
Sourcepub fn collapsible(self, collapsed_size: f32) -> Self
pub fn collapsible(self, collapsed_size: f32) -> Self
Lets the panel collapse to collapsed_size, below its minimum. Pointer
resizing snaps to the collapsed size once past halfway between the two.
§Panics
The collapsed size must be finite, non-negative, and below the minimum.
Trait Implementations§
Source§impl Clone for ResizablePanel
impl Clone for ResizablePanel
impl Copy for ResizablePanel
Source§impl Debug for ResizablePanel
impl Debug for ResizablePanel
Source§impl PartialEq for ResizablePanel
impl PartialEq for ResizablePanel
impl StructuralPartialEq for ResizablePanel
Auto Trait Implementations§
impl Forget for ResizablePanel
impl Freeze for ResizablePanel
impl Move for ResizablePanel
impl RefUnwindSafe for ResizablePanel
impl Send for ResizablePanel
impl Sync for ResizablePanel
impl Unpin for ResizablePanel
impl UnsafeUnpin for ResizablePanel
impl UnwindSafe for ResizablePanel
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> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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