Struct kas_theme::MultiTheme
source · pub struct MultiTheme<DS> { /* private fields */ }
Expand description
Wrapper around mutliple themes, supporting run-time switching
Implementations§
source§impl<DS> MultiTheme<DS>
impl<DS> MultiTheme<DS>
sourcepub fn builder() -> MultiThemeBuilder<DS>
pub fn builder() -> MultiThemeBuilder<DS>
Construct with builder pattern
Trait Implementations§
source§impl<DS: DrawSharedImpl> Theme<DS> for MultiTheme<DS>
impl<DS: DrawSharedImpl> Theme<DS> for MultiTheme<DS>
source§fn apply_config(&mut self, config: &Self::Config) -> TkAction
fn apply_config(&mut self, config: &Self::Config) -> TkAction
Apply/set the passed config
source§fn init(&mut self, shared: &mut SharedState<DS>)
fn init(&mut self, shared: &mut SharedState<DS>)
Theme initialisation Read more
source§fn update_window(&self, window: &mut Self::Window, dpi_factor: f32)
fn update_window(&self, window: &mut Self::Window, dpi_factor: f32)
Update a window created by
Theme::new_window
Read moresource§fn draw<'a>(
&'a self,
draw: DrawIface<'a, DS>,
ev: &'a mut EventState,
window: &'a mut Self::Window
) -> Box<dyn ThemeDraw + 'a>
fn draw<'a>(
&'a self,
draw: DrawIface<'a, DS>,
ev: &'a mut EventState,
window: &'a mut Self::Window
) -> Box<dyn ThemeDraw + 'a>
Prepare to draw and construct a [
ThemeDraw
] object Read moresource§fn clear_color(&self) -> Rgba
fn clear_color(&self) -> Rgba
Background colour
source§impl<DS> ThemeControl for MultiTheme<DS>
impl<DS> ThemeControl for MultiTheme<DS>
source§fn list_schemes(&self) -> Vec<&str>
fn list_schemes(&self) -> Vec<&str>
List available colour schemes
Auto Trait Implementations§
impl<DS> !RefUnwindSafe for MultiTheme<DS>
impl<DS> !Send for MultiTheme<DS>
impl<DS> !Sync for MultiTheme<DS>
impl<DS> Unpin for MultiTheme<DS>
impl<DS> !UnwindSafe for MultiTheme<DS>
Blanket Implementations§
§impl<S, T> Cast<T> for Swhere
T: Conv<S>,
impl<S, T> Cast<T> for Swhere
T: Conv<S>,
§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
§fn cast_approx(self) -> T
fn cast_approx(self) -> T
§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
§fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
§fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
§fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
§fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more