pub struct FocusFlag {
pub focus: Cell<bool>,
pub gained: Cell<bool>,
pub lost: Cell<bool>,
}Expand description
Contains flags for the focus. This struct is embedded in the widget state.
See HasFocusFlag, on_gained! and on_lost!.
Fields§
§focus: Cell<bool>Focus.
gained: Cell<bool>This widget just gained the focus. This flag is set by Focus::handle if there is a focus transfer, and will be reset by the next call to Focus::handle.
See on_gained!
lost: Cell<bool>This widget just lost the focus. This flag is set by Focus::handle if there is a focus transfer, and will be reset by the next call to Focus::handle.
See on_lost!
Implementations§
Trait Implementations§
source§impl PartialEq for FocusFlag
impl PartialEq for FocusFlag
impl Eq for FocusFlag
impl StructuralPartialEq for FocusFlag
Auto Trait Implementations§
impl !Freeze for FocusFlag
impl !RefUnwindSafe for FocusFlag
impl Send for FocusFlag
impl !Sync for FocusFlag
impl Unpin for FocusFlag
impl UnwindSafe for FocusFlag
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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