Struct zng_ext_input::focus::ReturnFocusChangedArgs
source · pub struct ReturnFocusChangedArgs {
pub timestamp: DInstant,
pub scope: Option<InteractionPath>,
pub prev_return: Option<InteractionPath>,
pub new_return: Option<InteractionPath>,
/* private fields */
}
Expand description
RETURN_FOCUS_CHANGED_EVENT
arguments.
Fields§
§timestamp: DInstant
Instant 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.
Implementations§
source§impl ReturnFocusChangedArgs
impl ReturnFocusChangedArgs
sourcepub fn new(
timestamp: impl Into<DInstant>,
propagation_handle: EventPropagationHandle,
scope: impl Into<Option<InteractionPath>>,
prev_return: impl Into<Option<InteractionPath>>,
new_return: impl Into<Option<InteractionPath>>,
) -> Self
pub fn new( timestamp: impl Into<DInstant>, propagation_handle: EventPropagationHandle, scope: impl Into<Option<InteractionPath>>, prev_return: impl Into<Option<InteractionPath>>, new_return: impl Into<Option<InteractionPath>>, ) -> Self
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>>,
) -> Self
pub fn now( scope: impl Into<Option<InteractionPath>>, prev_return: impl Into<Option<InteractionPath>>, new_return: impl Into<Option<InteractionPath>>, ) -> Self
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 delivery_list(&self, list: &mut UpdateDeliveryList)
fn delivery_list(&self, list: &mut UpdateDeliveryList)
The prev_return
, new_return
and scope
.
source§fn clone_any(&self) -> Box<dyn AnyEventArgs>
fn clone_any(&self) -> Box<dyn AnyEventArgs>
source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
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
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§
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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