Trait nannou::ui::prelude::widget::list_select::Mode
[−]
[src]
pub trait Mode { type Selection; fn click_selection<F, D, S>(
&self,
Click,
i: usize,
num_items: usize,
&State,
is_selected: F,
&mut VecDeque<Event<Self::Selection, D, S>>
)
where
F: Fn(usize) -> bool; fn key_selection<F, D, S>(
&self,
KeyPress,
i: usize,
num_items: usize,
&State,
is_selected: F,
&mut VecDeque<Event<Self::Selection, D, S>>
)
where
D: Direction,
F: Fn(usize) -> bool; }
Allows the ListSelect
to be generic over Single
and Multiple
selection modes.
Also allows for defining other custom selection modes.
Associated Types
type Selection
The data associated with the Mode
s Event::Selection
.
Required Methods
fn click_selection<F, D, S>(
&self,
Click,
i: usize,
num_items: usize,
&State,
is_selected: F,
&mut VecDeque<Event<Self::Selection, D, S>>
) where
F: Fn(usize) -> bool,
&self,
Click,
i: usize,
num_items: usize,
&State,
is_selected: F,
&mut VecDeque<Event<Self::Selection, D, S>>
) where
F: Fn(usize) -> bool,
Update the PendingEvents
in accordance with the given Click
event.
fn key_selection<F, D, S>(
&self,
KeyPress,
i: usize,
num_items: usize,
&State,
is_selected: F,
&mut VecDeque<Event<Self::Selection, D, S>>
) where
D: Direction,
F: Fn(usize) -> bool,
&self,
KeyPress,
i: usize,
num_items: usize,
&State,
is_selected: F,
&mut VecDeque<Event<Self::Selection, D, S>>
) where
D: Direction,
F: Fn(usize) -> bool,
Update the PendingEvents
in accordance with the given KeyPress
event.