pub trait ThemeDst<DS: DrawSharedImpl>: ThemeControl {
fn config(&self) -> MaybeBoxed<'_, dyn Any>;
fn apply_config(&mut self, config: &dyn Any) -> TkAction;
fn init(&mut self, shared: &mut SharedState<DS>);
fn new_window(&self, dpi_factor: f32) -> Box<dyn Window>;
fn update_window(&self, window: &mut dyn Window, dpi_factor: f32);
fn draw<'a>(
&'a self,
draw: DrawIface<'a, DS>,
ev: &'a mut EventState,
window: &'a mut dyn Window
) -> Box<dyn ThemeDraw + 'a>;
fn clear_color(&self) -> Rgba;
}
Expand description
Required Methods§
sourcefn config(&self) -> MaybeBoxed<'_, dyn Any>
fn config(&self) -> MaybeBoxed<'_, dyn Any>
Get current configuration
sourcefn apply_config(&mut self, config: &dyn Any) -> TkAction
fn apply_config(&mut self, config: &dyn Any) -> TkAction
Apply/set the passed config
sourcefn init(&mut self, shared: &mut SharedState<DS>)
fn init(&mut self, shared: &mut SharedState<DS>)
Theme initialisation
See also Theme::init
.
sourcefn new_window(&self, dpi_factor: f32) -> Box<dyn Window>
fn new_window(&self, dpi_factor: f32) -> Box<dyn Window>
Construct per-window storage
See also Theme::new_window
.
sourcefn update_window(&self, window: &mut dyn Window, dpi_factor: f32)
fn update_window(&self, window: &mut dyn Window, dpi_factor: f32)
Update a window created by Theme::new_window
See also Theme::update_window
.
fn draw<'a>(
&'a self,
draw: DrawIface<'a, DS>,
ev: &'a mut EventState,
window: &'a mut dyn Window
) -> Box<dyn ThemeDraw + 'a>
sourcefn clear_color(&self) -> Rgba
fn clear_color(&self) -> Rgba
Background colour
See also Theme::clear_color
.