pub struct ResizablePanel { /* private fields */ }Expand description
One panel of a ResizablePanelGroup. Sizes are percentages of the space
the group’s panels share.
Implementations§
Source§impl ResizablePanel
impl ResizablePanel
Sourcepub fn new() -> Self
pub fn new() -> Self
A panel with no size of its own: panels without a
default_size share what the others leave.
Sourcepub fn default_size(self, percent: f32) -> Self
pub fn default_size(self, percent: f32) -> Self
The initial size in percent, used while the group is uncontrolled. Defaults are scaled together when they do not add up to 100.
Sourcepub fn min_size(self, percent: f32) -> Self
pub fn min_size(self, percent: f32) -> Self
The smallest size in percent a resize may leave this panel at (default 0).
Sourcepub fn max_size(self, percent: f32) -> Self
pub fn max_size(self, percent: f32) -> Self
The largest size in percent a resize may give this panel (default 100).
Sourcepub fn min_size_px(self, min: impl Into<Pixels>) -> Self
pub fn min_size_px(self, min: impl Into<Pixels>) -> Self
The smallest length in pixels a resize may leave this panel at,
combined with min_size (the larger wins).
Sourcepub fn max_size_px(self, max: impl Into<Pixels>) -> Self
pub fn max_size_px(self, max: impl Into<Pixels>) -> Self
The largest length in pixels a resize may give this panel, combined
with max_size (the smaller wins, but never below
the minimum).
Sourcepub fn collapsible(self, collapsible: bool) -> Self
pub fn collapsible(self, collapsible: bool) -> Self
Lets the panel collapse to its collapsed_size
below its minimum: by a drag past halfway, an arrow key past the
minimum, Home/End, or Enter on the handle beside it.
Sourcepub fn collapsed_size(self, percent: f32) -> Self
pub fn collapsed_size(self, percent: f32) -> Self
The size in percent a collapsible panel
collapses to (default 0). A collapsed size at or above the minimum
leaves nothing to collapse.
Trait Implementations§
Source§impl Default for ResizablePanel
impl Default for ResizablePanel
Source§impl ParentElement for ResizablePanel
impl ParentElement for ResizablePanel
Source§fn extend(&mut self, elements: impl IntoIterator<Item = AnyElement>)
fn extend(&mut self, elements: impl IntoIterator<Item = AnyElement>)
Source§fn child(self, child: impl IntoElement) -> Selfwhere
Self: Sized,
fn child(self, child: impl IntoElement) -> Selfwhere
Self: Sized,
Source§fn children(self, children: impl IntoIterator<Item = impl IntoElement>) -> Selfwhere
Self: Sized,
fn children(self, children: impl IntoIterator<Item = impl IntoElement>) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
impl !RefUnwindSafe for ResizablePanel
impl !Send for ResizablePanel
impl !Sync for ResizablePanel
impl !UnwindSafe for ResizablePanel
impl Freeze for ResizablePanel
impl Unpin for ResizablePanel
impl UnsafeUnpin 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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().