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

Set font size

Units: Points per Em (standard unit of font size)

Change the colour scheme

If no scheme by this name is found the scheme is left unchanged.

List available colour schemes

Provided methods

Switch the theme

Most themes do not react to this method; kas_theme::MultiTheme uses it to switch themes.

Implementations on Foreign Types

Implementors