pub struct AddEventHandlerRegistry;Expand description
A registry for adding event handlers to various controls: the events an event trigger subscribes by name before it looks for the event in the metadata of the source.
The registry belongs to the thread (handlers hold objects of the thread).
Implementations§
Source§impl AddEventHandlerRegistry
impl AddEventHandlerRegistry
Sourcepub fn register(add_event_handler: Rc<dyn IAddEventHandler>)
pub fn register(add_event_handler: Rc<dyn IAddEventHandler>)
Registers an event handler.
Sourcepub fn unregister(add_event_handler: &Rc<dyn IAddEventHandler>)
pub fn unregister(add_event_handler: &Rc<dyn IAddEventHandler>)
Unregisters an event handler.
Sourcepub fn try_register_event_handler(
source: &BoxedValue,
event_name: &str,
handler: AddEventHandlerCallback,
) -> Option<Rc<dyn IDisposable>>
pub fn try_register_event_handler( source: &BoxedValue, event_name: &str, handler: AddEventHandlerCallback, ) -> Option<Rc<dyn IDisposable>>
Subscribes handler to the event event_name of source through the first registered
handler that matches them; None when none does.
Auto Trait Implementations§
impl Freeze for AddEventHandlerRegistry
impl RefUnwindSafe for AddEventHandlerRegistry
impl Send for AddEventHandlerRegistry
impl Sync for AddEventHandlerRegistry
impl Unpin for AddEventHandlerRegistry
impl UnsafeUnpin for AddEventHandlerRegistry
impl UnwindSafe for AddEventHandlerRegistry
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more