pub struct FocusTraversal<'a>(pub &'a Focus);Expand description
Special focus-traversal.
There are some widgets that have special keys that interact with focus. This marks an event-handler for such a case and provides it with the valid Focus instance for the application.
eg:
- Leaving a textarea with some navigation key other than tab.
Tuple Fields§
§0: &'a FocusTrait Implementations§
Source§impl<'a> HandleEvent<Event, FocusTraversal<'a>, Outcome> for TextAreaState
Adds focus-handling for a text-area.
impl<'a> HandleEvent<Event, FocusTraversal<'a>, Outcome> for TextAreaState
Adds focus-handling for a text-area.
Regular focus traversal with Tab is not possible for a TextArea, but this adds Esc and SHIFT-Esc as special traversal keys.
This is a secondary event-handler and doesn’t forward to Regular event-handling.
Auto Trait Implementations§
impl<'a> Freeze for FocusTraversal<'a>
impl<'a> !RefUnwindSafe for FocusTraversal<'a>
impl<'a> !Send for FocusTraversal<'a>
impl<'a> !Sync for FocusTraversal<'a>
impl<'a> Unpin for FocusTraversal<'a>
impl<'a> !UnwindSafe for FocusTraversal<'a>
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