pub struct DockPanel<TabId, PanelId> {
pub panel_id: PanelId,
pub tabs: Vec<TabId>,
pub active_tab_id: Option<TabId>,
}Expand description
A tabbed panel containing one or more tabs.
Fields§
§panel_id: PanelId§tabs: Vec<TabId>§active_tab_id: Option<TabId>Implementations§
Source§impl<TabId, PanelId> DockPanel<TabId, PanelId>
impl<TabId, PanelId> DockPanel<TabId, PanelId>
Sourcepub fn new(panel_id: PanelId, tabs: Vec<TabId>) -> Selfwhere
TabId: Clone,
pub fn new(panel_id: PanelId, tabs: Vec<TabId>) -> Selfwhere
TabId: Clone,
Create a new panel with the given id and tabs.
Sourcepub fn insert_tab(&mut self, tab_id: TabId, position: usize)
pub fn insert_tab(&mut self, tab_id: TabId, position: usize)
Insert tab_id at position.
Sourcepub fn append_tab(&mut self, tab_id: TabId)
pub fn append_tab(&mut self, tab_id: TabId)
Add tab_id at the end.
Trait Implementations§
impl<TabId, PanelId> StructuralPartialEq for DockPanel<TabId, PanelId>
Auto Trait Implementations§
impl<TabId, PanelId> Freeze for DockPanel<TabId, PanelId>
impl<TabId, PanelId> RefUnwindSafe for DockPanel<TabId, PanelId>where
PanelId: RefUnwindSafe,
TabId: RefUnwindSafe,
impl<TabId, PanelId> Send for DockPanel<TabId, PanelId>
impl<TabId, PanelId> Sync for DockPanel<TabId, PanelId>
impl<TabId, PanelId> Unpin for DockPanel<TabId, PanelId>
impl<TabId, PanelId> UnsafeUnpin for DockPanel<TabId, PanelId>where
PanelId: UnsafeUnpin,
TabId: UnsafeUnpin,
impl<TabId, PanelId> UnwindSafe for DockPanel<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