Skip to main content

CompositionVisualCollectionHooks

Trait CompositionVisualCollectionHooks 

Source
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§

Source

fn initialize_defaults_extra(&self)

Source

fn on_before_added(&self, _item: &Rc<TItem>)

Source

fn on_added(&self, _item: &Rc<TItem>)

Source

fn on_removed(&self, _item: &Rc<TItem>)

Source

fn on_before_clear(&self)

Source

fn on_before_replace(&self, _old_item: &Rc<TItem>, _new_item: &Rc<TItem>)

Source

fn on_replace(&self, _old_item: &Rc<TItem>, _new_item: &Rc<TItem>)

Source

fn on_clear(&self)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§