pub trait ThemeDst<DS: DrawSharedImpl>: ThemeControl {
// Required methods
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.