pub struct ReturnFocusChangedArgs {
pub timestamp: DInstant,
pub scope: Option<InteractionPath>,
pub prev_return: Option<InteractionPath>,
pub new_return: Option<InteractionPath>,
pub propagation: EventPropagationHandle,
}Expand description
RETURN_FOCUS_CHANGED_EVENT arguments.
Fields§
§timestamp: DInstantInstant the event happened.
scope: Option<InteractionPath>The scope that returns the focus when focused directly.
Is None if the previous focus was the return focus of a scope that was removed.
prev_return: Option<InteractionPath>Previous return focus of the widget.
new_return: Option<InteractionPath>New return focus of the widget.
propagation: EventPropagationHandlePropagation handle associated with this event instance.
Cloned arguments share the same handle, some arguments may also share the handle of another event if they share the same cause.
Implementations§
Source§impl ReturnFocusChangedArgs
impl ReturnFocusChangedArgs
Sourcepub fn new(
timestamp: impl Into<DInstant>,
propagation: EventPropagationHandle,
scope: impl Into<Option<InteractionPath>>,
prev_return: impl Into<Option<InteractionPath>>,
new_return: impl Into<Option<InteractionPath>>,
) -> ReturnFocusChangedArgs
pub fn new( timestamp: impl Into<DInstant>, propagation: EventPropagationHandle, scope: impl Into<Option<InteractionPath>>, prev_return: impl Into<Option<InteractionPath>>, new_return: impl Into<Option<InteractionPath>>, ) -> ReturnFocusChangedArgs
New args from values that convert into the argument types.
Sourcepub fn now(
scope: impl Into<Option<InteractionPath>>,
prev_return: impl Into<Option<InteractionPath>>,
new_return: impl Into<Option<InteractionPath>>,
) -> ReturnFocusChangedArgs
pub fn now( scope: impl Into<Option<InteractionPath>>, prev_return: impl Into<Option<InteractionPath>>, new_return: impl Into<Option<InteractionPath>>, ) -> ReturnFocusChangedArgs
Arguments for event that happened now (INSTANT.now).
Source§impl ReturnFocusChangedArgs
impl ReturnFocusChangedArgs
Sourcepub fn is_widget_move(&self) -> bool
pub fn is_widget_move(&self) -> bool
If the return focus is the same widget but the widget path changed and the widget is still in the same focus scope.
Sourcepub fn is_alt_return(&self) -> bool
pub fn is_alt_return(&self) -> bool
If scope is an ALT scope and prev_return or new_return if the
widget outside the scope that will be focused back when the user escapes the ALT scope.
Sourcepub fn lost_return_focus(&self, widget_id: WidgetId) -> bool
pub fn lost_return_focus(&self, widget_id: WidgetId) -> bool
if the widget was in the prev_return and is not in the new_return.
Sourcepub fn got_return_focus(&self, widget_id: WidgetId) -> bool
pub fn got_return_focus(&self, widget_id: WidgetId) -> bool
if the widget was not in the prev_return and is in the new_return.
Sourcepub fn was_return_focus(&self, widget_id: WidgetId) -> bool
pub fn was_return_focus(&self, widget_id: WidgetId) -> bool
if the widget was the prev_return and is the new_return.
Sourcepub fn is_return_focus(&self, widget_id: WidgetId) -> bool
pub fn is_return_focus(&self, widget_id: WidgetId) -> bool
if the widget was not the prev_return and is the new_return.
Sourcepub fn is_return_focus_enter(&self, widget_id: WidgetId) -> bool
pub fn is_return_focus_enter(&self, widget_id: WidgetId) -> bool
If widget_id is the new return focus or a parent of the new return and was not a parent of the previous return.
Sourcepub fn is_return_focus_leave(&self, widget_id: WidgetId) -> bool
pub fn is_return_focus_leave(&self, widget_id: WidgetId) -> bool
If widget_id is the previous return focus or a parent of the previous return and is not a parent of the new return.
Trait Implementations§
Source§impl AnyEventArgs for ReturnFocusChangedArgs
impl AnyEventArgs for ReturnFocusChangedArgs
Source§fn is_in_target(&self, id: WidgetId) -> bool
fn is_in_target(&self, id: WidgetId) -> bool
If is in prev_return, new_return
or scope.
Source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
Source§fn clone_boxed(&self) -> Box<dyn AnyEventArgs>
fn clone_boxed(&self) -> Box<dyn AnyEventArgs>
Source§impl Clone for ReturnFocusChangedArgs
impl Clone for ReturnFocusChangedArgs
Source§fn clone(&self) -> ReturnFocusChangedArgs
fn clone(&self) -> ReturnFocusChangedArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReturnFocusChangedArgs
impl Debug for ReturnFocusChangedArgs
Source§impl PartialEq for ReturnFocusChangedArgs
impl PartialEq for ReturnFocusChangedArgs
impl EventArgs for ReturnFocusChangedArgs
impl StructuralPartialEq for ReturnFocusChangedArgs
Auto Trait Implementations§
impl Freeze for ReturnFocusChangedArgs
impl RefUnwindSafe for ReturnFocusChangedArgs
impl Send for ReturnFocusChangedArgs
impl Sync for ReturnFocusChangedArgs
impl Unpin for ReturnFocusChangedArgs
impl UnwindSafe for ReturnFocusChangedArgs
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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