pub struct TabGroupContext { /* private fields */ }Expand description
What a skin needs to draw a tab group, and the callbacks it invokes rather than reimplementing behavior.
Implementations§
Source§impl TabGroupContext
impl TabGroupContext
Sourcepub fn node(&self) -> NodeId
pub fn node(&self) -> NodeId
The Tabs node this group mirrors, for a skin that needs to name the
group in a drag payload or a drop target.
Sourcepub fn panels(&self) -> &[Arc<dyn PanelView>]
pub fn panels(&self) -> &[Arc<dyn PanelView>]
Every panel in the group, in tab order — visible or not. A skin filters
with PanelView::visible when it draws.
pub fn active_ix(&self) -> usize
Sourcepub fn active_panel(&self) -> Option<&Arc<dyn PanelView>>
pub fn active_panel(&self) -> Option<&Arc<dyn PanelView>>
The panel on screen, which is the displayed tab unless that panel has gone invisible.
pub fn drop_indicator(&self) -> Option<DropIndicator>
pub fn is_zoomed(&self) -> bool
pub fn is_collapsed(&self) -> bool
Sourcepub fn is_closable(&self) -> bool
pub fn is_closable(&self) -> bool
Whether closing the displayed panel is allowed at all, so a skin knows whether to offer a Close control.
pub fn is_locked(&self) -> bool
pub fn is_draggable(&self) -> bool
pub fn is_droppable(&self) -> bool
pub fn select_tab(&self, ix: usize, window: &mut Window, cx: &mut App)
pub fn close(&self, panel: PanelId, window: &mut Window, cx: &mut App)
pub fn toggle_zoom(&self, window: &mut Window, cx: &mut App)
Sourcepub fn drag_panel(&self, ix: usize, cx: &App) -> Option<DragPanel>
pub fn drag_panel(&self, ix: usize, cx: &App) -> Option<DragPanel>
The drag payload for the tab at ix, for a skin wiring on_drag onto
its tabs. None when ix names no panel.
Trait Implementations§
Source§impl Clone for TabGroupContext
impl Clone for TabGroupContext
Source§fn clone(&self) -> TabGroupContext
fn clone(&self) -> TabGroupContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for TabGroupContext
impl !Send for TabGroupContext
impl !Sync for TabGroupContext
impl !UnwindSafe for TabGroupContext
impl Freeze for TabGroupContext
impl Unpin for TabGroupContext
impl UnsafeUnpin for TabGroupContext
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