pub struct ToolbarState {
pub area: Rect,
pub inner: Rect,
pub collapsed: ChoiceState<Option<usize>>,
pub collapsed_active: bool,
pub tools: Vec<Option<ToolState>>,
pub focus_before: Option<FocusFlag>,
pub container: FocusFlag,
pub non_exhaustive: NonExhaustive,
}Expand description
State
Fields§
§area: RectFull area. read only
inner: RectArea inside the block. read only
collapsed: ChoiceState<Option<usize>>State for the collapsed buttons.
collapsed_active: boolCollapsed buttons are active?
tools: Vec<Option<ToolState>>Other tool-state.
focus_before: Option<FocusFlag>Choices can get the focus. This is to flip back to the focus before.
container: FocusFlagContainer focus flag.
non_exhaustive: NonExhaustiveImplementations§
Source§impl ToolbarState
impl ToolbarState
Trait Implementations§
Source§impl Debug for ToolbarState
impl Debug for ToolbarState
Source§impl Default for ToolbarState
impl Default for ToolbarState
Source§impl<const N: usize> HandleEvent<Event, ToolbarKeys<'_, N>, ToolbarOutcome> for ToolbarState
impl<const N: usize> HandleEvent<Event, ToolbarKeys<'_, N>, ToolbarOutcome> for ToolbarState
Source§fn handle(
&mut self,
event: &Event,
qualifier: ToolbarKeys<'_, N>,
) -> ToolbarOutcome
fn handle( &mut self, event: &Event, qualifier: ToolbarKeys<'_, N>, ) -> ToolbarOutcome
Handle an event. Read more
Source§impl HasFocus for ToolbarState
impl HasFocus for ToolbarState
Source§fn build(&self, builder: &mut FocusBuilder)
fn build(&self, builder: &mut FocusBuilder)
Build the focus-structure for the container/widget.
Build the focus-structure for the container/widget.
This is called when the default navigation will be
overridden by the builder. Read more
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.
Source§impl RelocatableState for ToolbarState
impl RelocatableState for ToolbarState
Source§fn relocate(&mut self, _shift: (i16, i16), _clip: Rect)
fn relocate(&mut self, _shift: (i16, i16), _clip: Rect)
Relocate the areas in this widgets state. Read more
Source§fn relocate_popup(&mut self, shift: (i16, i16), clip: Rect)
fn relocate_popup(&mut self, shift: (i16, i16), clip: Rect)
Relocate only popup areas.
As rendering the popups is a separate render,
this has to be separate too.
Relocate all popup areas to a clip-rect (0,0+0x0).
Relocate all areas to a clip-rect (0,0+0x0).
Auto Trait Implementations§
impl !Freeze for ToolbarState
impl !RefUnwindSafe for ToolbarState
impl !Send for ToolbarState
impl !Sync for ToolbarState
impl Unpin for ToolbarState
impl !UnwindSafe for ToolbarState
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> 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