use super::style::{DefaultDragHandleStyle, DragHandleStyle};
use super::theme::DragHandleTheme;
use crate::tokens::{BuiltinSet, Tokens, TokenTheme};
pub struct DragHandleSettings {
pub theme: Box<dyn DragHandleTheme>,
pub style: Box<dyn DragHandleStyle>,
}
impl Default for DragHandleSettings {
fn default() -> Self {
Self {
theme: Box::new(TokenTheme::new(Tokens::builtin(BuiltinSet::Dark))),
style: Box::new(DefaultDragHandleStyle),
}
}
}
impl DragHandleSettings {
pub fn with_theme(mut self, theme: Box<dyn DragHandleTheme>) -> Self {
self.theme = theme;
self
}
pub fn with_style(mut self, style: Box<dyn DragHandleStyle>) -> Self {
self.style = style;
self
}
}