Trait kas_theme::ThemeDst

source ·
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

As Theme, but without associated types

This trait is implemented automatically for all implementations of Theme. It is intended only for use where a less parameterised trait is required.

Required Methods§

Get current configuration

Apply/set the passed config

Theme initialisation

See also Theme::init.

Construct per-window storage

See also Theme::new_window.

Update a window created by Theme::new_window

See also Theme::update_window.

Background colour

See also Theme::clear_color.

Implementors§