pub struct TabPanel { /* private fields */ }
Implementations§
Source§impl TabPanel
impl TabPanel
pub fn new( stack_panel: Option<WeakEntity<StackPanel>>, dock_area: WeakEntity<DockArea>, _: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
Sourcepub fn active_panel(&self, cx: &App) -> Option<Arc<dyn PanelView>>
pub fn active_panel(&self, cx: &App) -> Option<Arc<dyn PanelView>>
Return current active_panel View
Sourcepub fn add_panel(
&mut self,
panel: Arc<dyn PanelView>,
window: &mut Window,
cx: &mut Context<'_, Self>,
)
pub fn add_panel( &mut self, panel: Arc<dyn PanelView>, window: &mut Window, cx: &mut Context<'_, Self>, )
Add a panel to the end of the tabs
Trait Implementations§
Source§impl Focusable for TabPanel
impl Focusable for TabPanel
Source§fn focus_handle(&self, cx: &App) -> FocusHandle
fn focus_handle(&self, cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Source§impl Panel for TabPanel
impl Panel for TabPanel
Source§fn panel_name(&self) -> &'static str
fn panel_name(&self) -> &'static str
The name of the panel used to serialize, deserialize and identify the panel. Read more
Source§fn closable(&self, cx: &App) -> bool
fn closable(&self, cx: &App) -> bool
Whether the panel can be closed, default is
true
. Read moreSource§fn visible(&self, cx: &App) -> bool
fn visible(&self, cx: &App) -> bool
Return false to hide panel, true to show panel, default is
true
. Read moreThe addition popup menu of the panel, default is
None
.The addition toolbar buttons of the panel used to show in the right of the title bar, default is
None
.Source§fn dump(&self, cx: &App) -> PanelState
fn dump(&self, cx: &App) -> PanelState
Dump the panel, used to serialize the panel.
Source§fn inner_padding(&self, cx: &App) -> bool
fn inner_padding(&self, cx: &App) -> bool
Whether the panel has inner padding when the panel is in the tabs layout, default is
true
.Source§fn tab_name(&self, cx: &App) -> Option<SharedString>
fn tab_name(&self, cx: &App) -> Option<SharedString>
The name of the tab of the panel, default is
None
. Read moreSource§fn title_style(&self, cx: &App) -> Option<TitleStyle>
fn title_style(&self, cx: &App) -> Option<TitleStyle>
The theme of the panel title, default is
None
.Source§fn title_suffix(&self, window: &mut Window, cx: &mut App) -> Option<AnyElement>
fn title_suffix(&self, window: &mut Window, cx: &mut App) -> Option<AnyElement>
The suffix of the panel title, default is
None
. Read moreimpl EventEmitter<DismissEvent> for TabPanel
impl EventEmitter<PanelEvent> for TabPanel
Auto Trait Implementations§
impl Freeze for TabPanel
impl !RefUnwindSafe for TabPanel
impl !Send for TabPanel
impl !Sync for TabPanel
impl Unpin for TabPanel
impl !UnwindSafe for TabPanel
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.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