pub enum DockNode<TabId, PanelId> {
Split {
direction: Direction,
children: Vec<DockNode<TabId, PanelId>>,
},
Panel(DockPanel<TabId, PanelId>),
}Expand description
A node in the docking tree, either a split or a tabbed panel.
Variants§
Implementations§
Source§impl<TabId, PanelId> DockNode<TabId, PanelId>
impl<TabId, PanelId> DockNode<TabId, PanelId>
Sourcepub fn panel(&self, panel_id: &PanelId) -> Option<&DockPanel<TabId, PanelId>>
pub fn panel(&self, panel_id: &PanelId) -> Option<&DockPanel<TabId, PanelId>>
Find the panel with the given id.
Sourcepub fn panel_mut(
&mut self,
panel_id: &PanelId,
) -> Option<&mut DockPanel<TabId, PanelId>>
pub fn panel_mut( &mut self, panel_id: &PanelId, ) -> Option<&mut DockPanel<TabId, PanelId>>
Mutable version of DockNode::panel.
Sourcepub fn find_tab(&self, tab_id: &TabId) -> Option<(PanelId, usize)>
pub fn find_tab(&self, tab_id: &TabId) -> Option<(PanelId, usize)>
Find tab_id under this node.
Sourcepub fn remove_tab_except(
&mut self,
tab_id: &TabId,
except_panel_id: Option<&PanelId>,
) -> bool
pub fn remove_tab_except( &mut self, tab_id: &TabId, except_panel_id: Option<&PanelId>, ) -> bool
Remove tab_id from every panel except except_panel_id.
Sourcepub fn split_panel(
&mut self,
panel_id: &PanelId,
side: Side,
new_panel: &DockPanel<TabId, PanelId>,
) -> bool
pub fn split_panel( &mut self, panel_id: &PanelId, side: Side, new_panel: &DockPanel<TabId, PanelId>, ) -> bool
Turn the matching panel into a split that holds the old panel and a new one.
Sourcepub fn close_empty_panels(&mut self)
pub fn close_empty_panels(&mut self)
Remove empty panels.
Trait Implementations§
impl<TabId, PanelId> StructuralPartialEq for DockNode<TabId, PanelId>
Auto Trait Implementations§
impl<TabId, PanelId> Freeze for DockNode<TabId, PanelId>
impl<TabId, PanelId> RefUnwindSafe for DockNode<TabId, PanelId>where
PanelId: RefUnwindSafe,
TabId: RefUnwindSafe,
impl<TabId, PanelId> Send for DockNode<TabId, PanelId>
impl<TabId, PanelId> Sync for DockNode<TabId, PanelId>
impl<TabId, PanelId> Unpin for DockNode<TabId, PanelId>
impl<TabId, PanelId> UnsafeUnpin for DockNode<TabId, PanelId>where
PanelId: UnsafeUnpin,
TabId: UnsafeUnpin,
impl<TabId, PanelId> UnwindSafe for DockNode<TabId, PanelId>where
PanelId: UnwindSafe,
TabId: UnwindSafe,
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,
§impl<T> ComponentProps for T
impl<T> ComponentProps for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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