Skip to main content

TreeViewModifiers

Trait TreeViewModifiers 

Source
pub trait TreeViewModifiers<Id>: Sized
where Id: Eq + Hash + Clone + Send + Sync + 'static,
{ // Required methods fn selectable<U: Into<Selectable> + Clone + 'static>( self, selectable: impl Res<U> + 'static, ) -> Self; fn selection_follows_focus<U: Into<bool> + Clone + 'static>( self, flag: impl Res<U> + 'static, ) -> Self; fn selected_row_ids<R>( self, selected_row_ids: impl Res<R> + 'static, ) -> Self where R: Deref<Target = [Id]> + Clone + 'static; fn expanded_row_ids<R>( self, expanded_row_ids: impl Res<R> + 'static, ) -> Self where R: Deref<Target = [Id]> + Clone + 'static; fn on_row_select<F>(self, callback: F) -> Self where F: 'static + Fn(&mut EventContext<'_>, Id); fn on_row_focus<F>(self, callback: F) -> Self where F: 'static + Fn(&mut EventContext<'_>, Id); fn on_row_check_toggle<F>(self, callback: F) -> Self where F: 'static + Fn(&mut EventContext<'_>, Id); fn on_row_toggle<F>(self, callback: F) -> Self where F: 'static + Fn(&mut EventContext<'_>, Id, bool); }

Required Methods§

Source

fn selectable<U: Into<Selectable> + Clone + 'static>( self, selectable: impl Res<U> + 'static, ) -> Self

Source

fn selection_follows_focus<U: Into<bool> + Clone + 'static>( self, flag: impl Res<U> + 'static, ) -> Self

Source

fn selected_row_ids<R>(self, selected_row_ids: impl Res<R> + 'static) -> Self
where R: Deref<Target = [Id]> + Clone + 'static,

Source

fn expanded_row_ids<R>(self, expanded_row_ids: impl Res<R> + 'static) -> Self
where R: Deref<Target = [Id]> + Clone + 'static,

Source

fn on_row_select<F>(self, callback: F) -> Self
where F: 'static + Fn(&mut EventContext<'_>, Id),

Source

fn on_row_focus<F>(self, callback: F) -> Self
where F: 'static + Fn(&mut EventContext<'_>, Id),

Source

fn on_row_check_toggle<F>(self, callback: F) -> Self
where F: 'static + Fn(&mut EventContext<'_>, Id),

Source

fn on_row_toggle<F>(self, callback: F) -> Self
where F: 'static + Fn(&mut EventContext<'_>, Id, bool),

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T, V, Id> TreeViewModifiers<Id> for Handle<'_, TreeView<T, V, Id>>
where V: Deref<Target = [T]> + Clone + 'static, T: PartialEq + Clone + 'static, Id: Eq + Hash + Clone + Send + Sync + 'static,