WeakEvents
struct · ferroui-base · v0.5.0
struct WeakEvents
The weak events of the framework's notification contracts.
Each event is a per-thread static, as everything the event refers to belongs to one thread; an accessor returns the event of the calling thread.
Members
collection_changedthread_safe_property_changedferro_property_changedcommand_can_execute_changedsubscribe_command_can_execute_changed
collection_changed
fn collection_changed() -> Rc<WeakEvent<Rc<dyn INotifyCollectionChanged>, CollectionChange>>
Represents CollectionChanged event from INotifyCollectionChanged
thread_safe_property_changed
fn thread_safe_property_changed() -> Rc<WeakEvent<Rc<dyn INotifyPropertyChanged>, str>>
Represents PropertyChanged event from INotifyPropertyChanged with
auto-dispatching to the UI thread.
A model object is bound to the thread it was created on (it is held
through Rc), so its notifications are raised on that thread and are
forwarded there directly.
ferro_property_changed
fn ferro_property_changed() -> Rc<WeakEvent<Ref<FerroObject>, FerroPropertyChangedEventArgs<'static>>>
Represents PropertyChanged event from FerroObject
command_can_execute_changed
fn command_can_execute_changed() -> Rc<WeakEvent<Rc<dyn ICommand>, EventArgs>>
Represents CanExecuteChanged event from ICommand
subscribe_command_can_execute_changed
fn subscribe_command_can_execute_changed<T: ObjectType>(command: &Rc<dyn ICommand>, subscriber: &Ref<T>, handler: fn(&T) -> ()) -> Rc<dyn IDisposable>
Subscribes subscriber to the "can execute changed" event of
command. handler is called with the subscriber each time the
event is raised.
Not in the original: the command sources (button, menu item, split button, native menu item) subscribe through this handle-based form.
The subscriber keeps the returned handle (normally in a field). The subscription ends when the handle is disposed, when the handle is dropped (so with the subscriber), or, if the handle is kept alive elsewhere, the first time the event is raised after the subscriber is gone. The command never holds a strong reference to the subscriber.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.