ThemeDst

Trait ThemeDst 

Source
pub trait ThemeDst<DS: DrawSharedImpl> {
    // Required methods
    fn init(&mut self, config: &RefCell<Config>);
    fn new_window(&mut self, config: &WindowConfig) -> Box<dyn Window>;
    fn update_window(&mut self, window: &mut dyn Window, config: &WindowConfig);
    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§

Source

fn init(&mut self, config: &RefCell<Config>)

Theme initialisation

See also Theme::init.

Source

fn new_window(&mut self, config: &WindowConfig) -> Box<dyn Window>

Construct per-window storage

See also Theme::new_window.

Source

fn update_window(&mut self, window: &mut dyn Window, config: &WindowConfig)

Update a window created by Theme::new_window

See also Theme::update_window.

Source

fn draw<'a>( &'a self, draw: DrawIface<'a, DS>, ev: &'a mut EventState, window: &'a mut dyn Window, ) -> Box<dyn ThemeDraw + 'a>

Source

fn clear_color(&self) -> Rgba

Background colour

See also Theme::clear_color.

Implementors§

Source§

impl<DS: DrawSharedImpl, T: Theme<DS>> ThemeDst<DS> for T