pub struct RightToolbarState {
pub active_tab: Option<RightPanelTab>,
pub expanded: bool,
pub panel_width: f32,
}Expand description
Right toolbar state
Fields§
§active_tab: Option<RightPanelTab>Currently active tab
expanded: boolWhether the panel is expanded
panel_width: f32Panel width
Implementations§
Source§impl RightToolbarState
impl RightToolbarState
Sourcepub fn set_active_tab(&mut self, tab: Option<RightPanelTab>)
pub fn set_active_tab(&mut self, tab: Option<RightPanelTab>)
Set active tab
Sourcepub fn toggle_tab(&mut self, tab: RightPanelTab)
pub fn toggle_tab(&mut self, tab: RightPanelTab)
Toggle tab
Sourcepub fn is_tab_active(&self, tab: RightPanelTab) -> bool
pub fn is_tab_active(&self, tab: RightPanelTab) -> bool
Check if tab is active
Sourcepub fn sync_from(&mut self, panel_width: f32, active_tab: Option<RightPanelTab>)
pub fn sync_from(&mut self, panel_width: f32, active_tab: Option<RightPanelTab>)
Sync from external panel state values.
Trait Implementations§
Source§impl Clone for RightToolbarState
impl Clone for RightToolbarState
Source§fn clone(&self) -> RightToolbarState
fn clone(&self) -> RightToolbarState
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 moreSource§impl Debug for RightToolbarState
impl Debug for RightToolbarState
Auto Trait Implementations§
impl Freeze for RightToolbarState
impl RefUnwindSafe for RightToolbarState
impl Send for RightToolbarState
impl Sync for RightToolbarState
impl Unpin for RightToolbarState
impl UnsafeUnpin for RightToolbarState
impl UnwindSafe for RightToolbarState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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