pub struct RightPanelTabs {
pub active_tab: RightPanelTab,
pub config: RightPanelTabsConfig,
pub available_tabs: Vec<RightPanelTab>,
/* private fields */
}Expand description
Right Panel with Tab Navigation
Fields§
§active_tab: RightPanelTabCurrently selected tab.
config: RightPanelTabsConfigDisplay and layout options for this component.
available_tabs: Vec<RightPanelTab>Tabs offered in the panel, in display order.
Implementations§
Source§impl RightPanelTabs
impl RightPanelTabs
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a RightPanelTabs with default settings.
Sourcepub fn with_config(self, config: RightPanelTabsConfig) -> Self
pub fn with_config(self, config: RightPanelTabsConfig) -> Self
Use the supplied display and layout options.
Sourcepub fn with_active_tab(self, tab: RightPanelTab) -> Self
pub fn with_active_tab(self, tab: RightPanelTab) -> Self
Select the tab initially shown.
Sourcepub fn select_tab(&mut self, tab: RightPanelTab)
pub fn select_tab(&mut self, tab: RightPanelTab)
Select and activate a tab programmatically
Sourcepub fn show_tab_bar(&mut self, ui: &mut Ui) -> RightPanelAction
pub fn show_tab_bar(&mut self, ui: &mut Ui) -> RightPanelAction
Show the tab bar on the right edge Returns the action and consumed width for the tab bar
Sourcepub fn show_content_header(&self, ui: &mut Ui) -> Response
pub fn show_content_header(&self, ui: &mut Ui) -> Response
Show the header for the active tab content area
Sourcepub fn set_active_tab(&mut self, tab: RightPanelTab)
pub fn set_active_tab(&mut self, tab: RightPanelTab)
Select the tab to display.
Sourcepub fn active_tab(&self) -> RightPanelTab
pub fn active_tab(&self) -> RightPanelTab
Currently selected panel tab.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RightPanelTabs
impl RefUnwindSafe for RightPanelTabs
impl Send for RightPanelTabs
impl Sync for RightPanelTabs
impl Unpin for RightPanelTabs
impl UnsafeUnpin for RightPanelTabs
impl UnwindSafe for RightPanelTabs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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