pub struct TabbedState {
pub area: Rect,
pub block_area: Rect,
pub widget_area: Rect,
pub tab_title_area: Rect,
pub tab_title_areas: Vec<Rect>,
pub tab_title_close_areas: Vec<Rect>,
pub selected: Option<usize>,
pub focus: FocusFlag,
pub mouse: MouseFlagsN,
}Expand description
State & event-handling.
Fields§
§area: RectTotal area. readonly. renewed for each render.
block_area: RectArea for drawing the Block inside the tabs. readonly. renewed for each render.
widget_area: RectArea used to render the content of the tab. Use this area to render the current tab content. readonly. renewed for each render.
tab_title_area: RectTotal area reserved for tabs. readonly. renewed for each render.
tab_title_areas: Vec<Rect>Area of each tab. readonly. renewed for each render.
tab_title_close_areas: Vec<Rect>Area for ‘Close Tab’ interaction. readonly. renewed for each render.
selected: Option<usize>Selected Tab, only ever is None if there are no tabs. Otherwise, set to 0 on render. read+write_
focus: FocusFlagFocus read+write
mouse: MouseFlagsNMouse flags read+write
Implementations§
Trait Implementations§
Source§impl Clone for TabbedState
impl Clone for TabbedState
Source§impl Debug for TabbedState
impl Debug for TabbedState
Source§impl Default for TabbedState
impl Default for TabbedState
Source§fn default() -> TabbedState
fn default() -> TabbedState
Returns the “default value” for a type. Read more
Source§impl HandleEvent<Event, MouseOnly, TabbedOutcome> for TabbedState
impl HandleEvent<Event, MouseOnly, TabbedOutcome> for TabbedState
Source§impl HandleEvent<Event, Regular, TabbedOutcome> for TabbedState
Handle the regular events for Tabbed.
impl HandleEvent<Event, Regular, TabbedOutcome> for TabbedState
Handle the regular events for Tabbed.
Source§impl HasFocus for TabbedState
impl HasFocus for TabbedState
Source§fn build(&self, builder: &mut FocusBuilder)
fn build(&self, builder: &mut FocusBuilder)
Build the focus-structure for the container.
Declares how the widget interacts with focus. Read more
Source§fn is_focused(&self) -> bool
fn is_focused(&self) -> bool
Focused?
Source§fn lost_focus(&self) -> bool
fn lost_focus(&self) -> bool
Just lost focus.
Source§fn gained_focus(&self) -> bool
fn gained_focus(&self) -> bool
Just gained focus.
Auto Trait Implementations§
impl !Freeze for TabbedState
impl !RefUnwindSafe for TabbedState
impl !Send for TabbedState
impl !Sync for TabbedState
impl Unpin for TabbedState
impl !UnwindSafe for TabbedState
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> 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