pub struct DockState { /* private fields */ }Expand description
Host-owned visibility and focus lifecycle for one dockable panel.
This is intentionally not a panel manager: it does not own views, focus
identifiers, key bindings, or application state. A host can pair it with a
FocusRegistry and any panel content.
Implementations§
Source§impl DockState
impl DockState
Sourcepub const fn is_visible(self) -> bool
pub const fn is_visible(self) -> bool
Whether the panel is logically open. A passive panel may still resolve
to DockPlacement::Hidden below its breakpoint.
Sourcepub const fn is_focused(self) -> bool
pub const fn is_focused(self) -> bool
Whether the panel should own input focus.
Sourcepub fn show_passive(&mut self)
pub fn show_passive(&mut self)
Open the panel without taking focus from the main content.
Sourcepub fn toggle(&mut self)
pub fn toggle(&mut self)
Focus a hidden or passive panel; close a focused panel.
This supports the common single-shortcut lifecycle: background work can open passively, the first shortcut focuses it, and the next closes it.
Sourcepub fn resolve(self, area: Rect, spec: DockSpec) -> DockLayout
pub fn resolve(self, area: Rect, spec: DockSpec) -> DockLayout
Resolve the panel for area under spec.
Wide visible panels dock regardless of focus. Below the breakpoint, a passive panel stays logically open but is not painted; focusing it turns it into an overlay drawer, so input can never be captured by an invisible panel.
Trait Implementations§
impl Copy for DockState
impl Eq for DockState
impl StructuralPartialEq for DockState
Auto Trait Implementations§
impl Freeze for DockState
impl RefUnwindSafe for DockState
impl Send for DockState
impl Sync for DockState
impl Unpin for DockState
impl UnsafeUnpin for DockState
impl UnwindSafe for DockState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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