Enum masonry::StatusChange
source · #[non_exhaustive]pub enum StatusChange {
HotChanged(bool),
FocusChanged(bool),
}
Expand description
Event indicating status changes within the widget hierarchy.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
HotChanged(bool)
Called when the “hot” status changes.
This will always be called before the event that triggered it; that is,
when the mouse moves over a widget, that widget will receive
StatusChange::HotChanged
before it receives Event::MouseMove
.
See is_hot
for
discussion about the hot status.
FocusChanged(bool)
Called when the focus status changes.
This will always be called immediately after a new widget gains focus.
The newly focused widget will receive this with true
and the widget
that lost focus will receive this with false
.
See EventCtx::is_focused
for more information about focus.
Trait Implementations§
source§impl Clone for StatusChange
impl Clone for StatusChange
source§fn clone(&self) -> StatusChange
fn clone(&self) -> StatusChange
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StatusChange
impl RefUnwindSafe for StatusChange
impl Send for StatusChange
impl Sync for StatusChange
impl Unpin for StatusChange
impl UnwindSafe for StatusChange
Blanket Implementations§
source§impl<T> AsAny for Twhere
T: Any,
impl<T> AsAny for Twhere
T: Any,
source§fn as_dyn_any(&self) -> &(dyn Any + 'static)
fn as_dyn_any(&self) -> &(dyn Any + 'static)
Return self.
source§fn as_mut_dyn_any(&mut self) -> &mut (dyn Any + 'static)
fn as_mut_dyn_any(&mut self) -> &mut (dyn Any + 'static)
Return self.
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