pub struct Dock { /* private fields */ }Expand description
Runtime state for one dock: whether it is open, collapsible, its current size, and whether it is mid-resize.
This does not include the dock’s placement or its panel content. DockArea
owns one of these per dock, paired with that dock’s PaneTree and keyed
by its DockPlacement; the placement is the key, and the content is the
tree.
Implementations§
Source§impl Dock
impl Dock
pub fn new(size: Pixels) -> Self
pub fn is_open(&self) -> bool
pub fn set_open(&mut self, open: bool)
pub fn is_collapsible(&self) -> bool
pub fn set_collapsible(&mut self, collapsible: bool)
pub fn size(&self) -> Pixels
Sourcepub fn set_size(&mut self, size: Pixels)
pub fn set_size(&mut self, size: Pixels)
Set the dock’s size, never below [PANEL_MIN_SIZE].
The floor is here rather than at the call sites because
DockArea::set_dock_size is public and unclamped: a smaller value
would collapse the dock to nothing, the skin clips the resize handle
that would drag it back out, and the collapsed size persists.
pub fn is_resizing(&self) -> bool
pub fn set_resizing(&mut self, resizing: bool)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dock
impl RefUnwindSafe for Dock
impl Send for Dock
impl Sync for Dock
impl Unpin for Dock
impl UnsafeUnpin for Dock
impl UnwindSafe for Dock
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> 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> ⓘ
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