pub struct TabGroupConstraints { /* private fields */ }Expand description
Everything gpui_base::dock exports, so a consumer never has to depend
on the foundation crate directly to write a skin or read a container’s
state. Kept in step with base’s own list by
every_base_dock_export_is_reachable_from_here.
Two names are handled elsewhere and one is deliberately absent:
base’s Panel and PanelView arrive as BasePanel and BasePanelView
because this module’s Panel/PanelView are the presentation halves that
extend them, and base’s Dock — a plain state struct holding one dock’s
open, collapsible, size and resizing flags — is not re-exported at all,
because the name meant a panel container in every released version of this
crate and handing it back with a different meaning is worse than dropping
it. A skin reads a dock through DockContext.
Everything the container knows about a group’s place in the dock.
Pushed as one value rather than one setter per fact. These are read together, and a container that updates one while leaving another stale describes a dock that cannot exist — a group on a tiles canvas that still reports itself droppable, or a group beside siblings that still reports itself alone. Choosing a constructor forces the container kind to be stated; anything a constructor does not grant stays off, so a container that forgets something gets a group that does less rather than more.
Implementations§
Source§impl TabGroupConstraints
impl TabGroupConstraints
Sourcepub fn sealed() -> TabGroupConstraints
pub fn sealed() -> TabGroupConstraints
A group with nowhere to go: locked, alone, unclosable. What a group starts as, before any container has placed it.
Sourcepub fn in_split(alone: bool) -> TabGroupConstraints
pub fn in_split(alone: bool) -> TabGroupConstraints
A group in a split layout. alone when nothing sits beside it, which
is what stops its last visible panel being dragged out and leaving the
dock empty.
Sourcepub fn dock_locked(self, dock_locked: bool) -> TabGroupConstraints
pub fn dock_locked(self, dock_locked: bool) -> TabGroupConstraints
Whether the dock as a whole forbids rearranging.
Sourcepub fn collapsed(self, collapsed: bool) -> TabGroupConstraints
pub fn collapsed(self, collapsed: bool) -> TabGroupConstraints
Whether the group is folded away to a strip of tabs with no content.
Sourcepub fn closable(self, closable: bool) -> TabGroupConstraints
pub fn closable(self, closable: bool) -> TabGroupConstraints
Whether the container allows this group’s panels to be closed at all.
A dock’s last group sets this false so the dock cannot be emptied.
Sourcepub fn is_locked(&self) -> bool
pub fn is_locked(&self) -> bool
Whether the group’s place in the dock is fixed.
The dock-wide lock is the whole of it. A tab group only ever sits
inside a split — a tiles canvas holds panels directly and never a tab
group — so there is no second way for a container to pin one down, and
no separate is_dock_locked reader that would answer identically.
pub fn is_collapsed(&self) -> bool
pub fn is_closable(&self) -> bool
Trait Implementations§
Source§impl Clone for TabGroupConstraints
impl Clone for TabGroupConstraints
Source§fn clone(&self) -> TabGroupConstraints
fn clone(&self) -> TabGroupConstraints
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TabGroupConstraints
Source§impl Debug for TabGroupConstraints
impl Debug for TabGroupConstraints
impl Eq for TabGroupConstraints
Source§impl PartialEq for TabGroupConstraints
impl PartialEq for TabGroupConstraints
impl StructuralPartialEq for TabGroupConstraints
Auto Trait Implementations§
impl Freeze for TabGroupConstraints
impl RefUnwindSafe for TabGroupConstraints
impl Send for TabGroupConstraints
impl Sync for TabGroupConstraints
impl Unpin for TabGroupConstraints
impl UnsafeUnpin for TabGroupConstraints
impl UnwindSafe for TabGroupConstraints
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§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> 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