pub trait CompositionVisualCollectionHooks<TItem: ICompositionObject + ?Sized>: ICompositionObjectHost {
// Provided methods
fn initialize_defaults_extra(&self) { ... }
fn on_before_added(&self, _item: &Rc<TItem>) { ... }
fn on_added(&self, _item: &Rc<TItem>) { ... }
fn on_removed(&self, _item: &Rc<TItem>) { ... }
fn on_before_clear(&self) { ... }
fn on_before_replace(&self, _old_item: &Rc<TItem>, _new_item: &Rc<TItem>) { ... }
fn on_replace(&self, _old_item: &Rc<TItem>, _new_item: &Rc<TItem>) { ... }
fn on_clear(&self) { ... }
}Expand description
The partial methods of CompositionVisualCollection: implemented by the class that embeds
CompositionVisualCollectionProps. TItem is the UI-thread class of the items (CompositionVisual).
Every hook defaults to doing nothing.
Provided Methods§
fn initialize_defaults_extra(&self)
fn on_before_added(&self, _item: &Rc<TItem>)
fn on_added(&self, _item: &Rc<TItem>)
fn on_removed(&self, _item: &Rc<TItem>)
fn on_before_clear(&self)
fn on_before_replace(&self, _old_item: &Rc<TItem>, _new_item: &Rc<TItem>)
fn on_replace(&self, _old_item: &Rc<TItem>, _new_item: &Rc<TItem>)
fn on_clear(&self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".