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
Required Methods§
Sourcefn init(&mut self, config: &RefCell<Config>)
fn init(&mut self, config: &RefCell<Config>)
Theme initialisation
See also Theme::init
.
Sourcefn new_window(&mut self, config: &WindowConfig) -> Box<dyn Window>
fn new_window(&mut self, config: &WindowConfig) -> Box<dyn Window>
Construct per-window storage
See also Theme::new_window
.
Sourcefn update_window(&mut self, window: &mut dyn Window, config: &WindowConfig)
fn update_window(&mut self, window: &mut dyn Window, config: &WindowConfig)
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
.