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 Freeze for FlatTheme
impl RefUnwindSafe for FlatTheme
impl !Send for FlatTheme
impl !Sync for FlatTheme
impl Unpin for FlatTheme
impl UnwindSafe for FlatTheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<DS, T> ThemeDst<DS> for Twhere
DS: DrawSharedImpl,
T: Theme<DS>,
impl<DS, T> ThemeDst<DS> for Twhere
DS: DrawSharedImpl,
T: Theme<DS>,
Source§fn config(&self) -> MaybeBoxed<'_, dyn Any + 'static>
fn config(&self) -> MaybeBoxed<'_, dyn Any + 'static>
Get current configuration
Source§fn apply_config(&mut self, config: &(dyn Any + 'static)) -> TkAction
fn apply_config(&mut self, config: &(dyn Any + 'static)) -> 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 new_window(&self, dpi_factor: f32) -> Box<dyn Window>
fn new_window(&self, dpi_factor: f32) -> Box<dyn Window>
Construct per-window storage Read more
Source§fn update_window(&self, window: &mut (dyn Window + 'static), dpi_factor: f32)
fn update_window(&self, window: &mut (dyn Window + 'static), dpi_factor: f32)
Update a window created by
Theme::new_window Read morefn draw<'b>( &'b self, draw: DrawIface<'b, DS>, ev: &'b mut EventState, window: &'b mut (dyn Window + 'static), ) -> Box<dyn ThemeDraw + 'b>
Source§fn clear_color(&self) -> Rgba
fn clear_color(&self) -> Rgba
Background colour Read more