use crate::style::Color;
use super::core::SortableList;
impl SortableList {
pub fn on_reorder<F>(mut self, callback: F) -> Self
where
F: FnMut(usize, usize) + 'static,
{
self.on_reorder = Some(Box::new(callback));
self
}
pub fn handles(mut self, show: bool) -> Self {
self.show_handles = show;
self
}
pub fn item_color(mut self, color: Color) -> Self {
self.item_color = color;
self
}
pub fn selected_color(mut self, color: Color) -> Self {
self.selected_color = color;
self
}
}