pub struct FlatTheme { /* private fields */ }
Expand description
A theme with flat (unshaded) rendering
Implementations§
source§impl FlatTheme
impl FlatTheme
sourcepub fn with_font_size(self, pt_size: f32) -> Self
pub fn with_font_size(self, pt_size: f32) -> Self
Set font size
Units: Points per Em (standard unit of font size)
sourcepub fn with_colours(self, scheme: &str) -> Self
pub fn with_colours(self, scheme: &str) -> Self
Set the colour scheme
If no scheme by this name is found the scheme is left unchanged.
Trait Implementations§
source§impl<DS: DrawSharedImpl> Theme<DS> for FlatThemewhere
DS::Draw: DrawRoundedImpl,
impl<DS: DrawSharedImpl> Theme<DS> for FlatThemewhere
DS::Draw: DrawRoundedImpl,
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, w: &mut Self::Window, dpi_factor: f32)
fn update_window(&self, w: &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,
w: &'a mut Self::Window
) -> Self::Draw<'a>
fn draw<'a>(
&'a self,
draw: DrawIface<'a, DS>,
ev: &'a mut EventState,
w: &'a mut Self::Window
) -> Self::Draw<'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 ThemeControl for FlatTheme
impl ThemeControl for FlatTheme
source§fn list_schemes(&self) -> Vec<&str>
fn list_schemes(&self) -> Vec<&str>
List available colour schemes
Auto Trait Implementations§
impl RefUnwindSafe for FlatTheme
impl !Send for FlatTheme
impl !Sync for FlatTheme
impl Unpin for FlatTheme
impl UnwindSafe for FlatTheme
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