pub struct InteractivityChangedArgs {
pub timestamp: DInstant,
pub prev_tree: WidgetInfoTree,
pub tree: WidgetInfoTree,
pub changed: IdSet<WidgetId>,
/* private fields */
}
Expand description
Fields§
§timestamp: DInstant
Instant the event happened.
prev_tree: WidgetInfoTree
Previous tree with old interactivity values.
tree: WidgetInfoTree
New tree with new interactivity values.
changed: IdSet<WidgetId>
All event subscribers that changed interactivity in this info update.
Implementations§
source§impl InteractivityChangedArgs
impl InteractivityChangedArgs
sourcepub fn new(
timestamp: impl Into<DInstant>,
propagation_handle: EventPropagationHandle,
prev_tree: impl Into<WidgetInfoTree>,
tree: impl Into<WidgetInfoTree>,
changed: impl Into<IdSet<WidgetId>>,
) -> Self
pub fn new( timestamp: impl Into<DInstant>, propagation_handle: EventPropagationHandle, prev_tree: impl Into<WidgetInfoTree>, tree: impl Into<WidgetInfoTree>, changed: impl Into<IdSet<WidgetId>>, ) -> Self
New args from values that convert into the argument types.
sourcepub fn now(
prev_tree: impl Into<WidgetInfoTree>,
tree: impl Into<WidgetInfoTree>,
changed: impl Into<IdSet<WidgetId>>,
) -> Self
pub fn now( prev_tree: impl Into<WidgetInfoTree>, tree: impl Into<WidgetInfoTree>, changed: impl Into<IdSet<WidgetId>>, ) -> Self
Arguments for event that happened now (INSTANT.now
).
source§impl InteractivityChangedArgs
impl InteractivityChangedArgs
sourcepub fn prev_interactivity(&self, widget_id: WidgetId) -> Option<Interactivity>
pub fn prev_interactivity(&self, widget_id: WidgetId) -> Option<Interactivity>
Previous interactivity of this widget.
Returns None
if the widget was not in the previous info tree.
sourcepub fn new_interactivity(&self, widget_id: WidgetId) -> Interactivity
pub fn new_interactivity(&self, widget_id: WidgetId) -> Interactivity
sourcepub fn is_enable(&self, widget_id: WidgetId) -> bool
pub fn is_enable(&self, widget_id: WidgetId) -> bool
Widget was disabled or did not exist, now is enabled.
sourcepub fn is_disable(&self, widget_id: WidgetId) -> bool
pub fn is_disable(&self, widget_id: WidgetId) -> bool
Widget was enabled or did not exist, now is disabled.
sourcepub fn is_unblock(&self, widget_id: WidgetId) -> bool
pub fn is_unblock(&self, widget_id: WidgetId) -> bool
Widget was blocked or did not exist, now is unblocked.
sourcepub fn is_block(&self, widget_id: WidgetId) -> bool
pub fn is_block(&self, widget_id: WidgetId) -> bool
Widget was unblocked or did not exist, now is blocked.
sourcepub fn is_vis_enable(&self, widget_id: WidgetId) -> bool
pub fn is_vis_enable(&self, widget_id: WidgetId) -> bool
Widget was visually disabled or did not exist, now is visually enabled.
sourcepub fn is_vis_disable(&self, widget_id: WidgetId) -> bool
pub fn is_vis_disable(&self, widget_id: WidgetId) -> bool
Widget was visually enabled or did not exist, now is visually disabled.
sourcepub fn enabled_change(
&self,
widget_id: WidgetId,
) -> Option<(Option<Interactivity>, Interactivity)>
pub fn enabled_change( &self, widget_id: WidgetId, ) -> Option<(Option<Interactivity>, Interactivity)>
Returns the previous and new interactivity if the widget was enabled, disabled or is new.
sourcepub fn vis_enabled_change(
&self,
widget_id: WidgetId,
) -> Option<(Option<Interactivity>, Interactivity)>
pub fn vis_enabled_change( &self, widget_id: WidgetId, ) -> Option<(Option<Interactivity>, Interactivity)>
Returns the previous and new interactivity if the widget was visually enabled, visually disabled or is new.
sourcepub fn blocked_change(
&self,
widget_id: WidgetId,
) -> Option<(Option<Interactivity>, Interactivity)>
pub fn blocked_change( &self, widget_id: WidgetId, ) -> Option<(Option<Interactivity>, Interactivity)>
Returns the previous and new interactivity if the widget was blocked, unblocked or is new.
Trait Implementations§
source§impl AnyEventArgs for InteractivityChangedArgs
impl AnyEventArgs for InteractivityChangedArgs
source§fn delivery_list(&self, list: &mut UpdateDeliveryList)
fn delivery_list(&self, list: &mut UpdateDeliveryList)
Target the changed
widgets.
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 InteractivityChangedArgs
impl Clone for InteractivityChangedArgs
source§fn clone(&self) -> InteractivityChangedArgs
fn clone(&self) -> InteractivityChangedArgs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InteractivityChangedArgs
impl Debug for InteractivityChangedArgs
Auto Trait Implementations§
impl Freeze for InteractivityChangedArgs
impl !RefUnwindSafe for InteractivityChangedArgs
impl Send for InteractivityChangedArgs
impl Sync for InteractivityChangedArgs
impl Unpin for InteractivityChangedArgs
impl !UnwindSafe for InteractivityChangedArgs
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