Trait kas::draw::ThemeApi [−][src]
pub trait ThemeApi {
fn set_font_size(&mut self, pt_size: f32) -> TkAction;
fn set_scheme(&mut self, scheme: &str) -> TkAction;
fn list_schemes(&self) -> Vec<&str, Global>;
fn set_theme(&mut self, _theme: &str) -> TkAction { ... }
}
Expand description
Interface through which a theme can be adjusted at run-time
All methods return a TkAction
to enable correct action when a theme
is updated via Manager::adjust_theme
. When adjusting a theme before
the UI is started, this return value can be safely ignored.
Required methods
fn set_font_size(&mut self, pt_size: f32) -> TkAction
fn set_font_size(&mut self, pt_size: f32) -> TkAction
Set font size
Units: Points per Em (standard unit of font size)
fn set_scheme(&mut self, scheme: &str) -> TkAction
fn set_scheme(&mut self, scheme: &str) -> TkAction
Change the colour scheme
If no scheme by this name is found the scheme is left unchanged.
fn list_schemes(&self) -> Vec<&str, Global>
fn list_schemes(&self) -> Vec<&str, Global>
List available colour schemes