use super::style::{DefaultItemStyle, ItemStyle};
use super::theme::{DefaultItemTheme, ItemTheme};
pub struct ItemSettings {
pub theme: Box<dyn ItemTheme>,
pub style: Box<dyn ItemStyle>,
}
impl Default for ItemSettings {
fn default() -> Self {
Self {
theme: Box::new(DefaultItemTheme),
style: Box::new(DefaultItemStyle),
}
}
}
impl ItemSettings {
pub fn with_theme(mut self, theme: Box<dyn ItemTheme>) -> Self {
self.theme = theme;
self
}
pub fn with_style(mut self, style: Box<dyn ItemStyle>) -> Self {
self.style = style;
self
}
}