pub struct EventDelegate { /* private fields */ }
Expand description
Event delegate manages capturing, targeting, and bubbling of events
Implementations§
Source§impl EventDelegate
impl EventDelegate
Sourcepub fn set_parent(&mut self, parent: Arc<Mutex<EventDelegate>>)
pub fn set_parent(&mut self, parent: Arc<Mutex<EventDelegate>>)
Set the parent delegate for bubbling events
Sourcepub fn add_child(&mut self, child: Arc<Mutex<EventDelegate>>)
pub fn add_child(&mut self, child: Arc<Mutex<EventDelegate>>)
Add a child delegate for capturing events
Sourcepub fn capture<E: Event + 'static>(
&self,
handler: impl Fn(&E, &EventPropagation) + Send + Sync + 'static,
)
pub fn capture<E: Event + 'static>( &self, handler: impl Fn(&E, &EventPropagation) + Send + Sync + 'static, )
Register a handler for an event type in the capturing phase
Sourcepub fn bubble<E: Event + 'static>(
&self,
handler: impl Fn(&E, &EventPropagation) + Send + Sync + 'static,
)
pub fn bubble<E: Event + 'static>( &self, handler: impl Fn(&E, &EventPropagation) + Send + Sync + 'static, )
Register a handler for an event type in the bubbling phase
Trait Implementations§
Source§impl Debug for EventDelegate
impl Debug for EventDelegate
Source§impl Default for EventDelegate
impl Default for EventDelegate
Source§fn default() -> EventDelegate
fn default() -> EventDelegate
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventDelegate
impl RefUnwindSafe for EventDelegate
impl Send for EventDelegate
impl Sync for EventDelegate
impl Unpin for EventDelegate
impl UnwindSafe for EventDelegate
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