maycoon_theme::theme

Trait Theme

source
pub trait Theme {
    // Required methods
    fn of(&self, id: WidgetId) -> Option<Style>;
    fn defaults(&self) -> DefaultStyles;
    fn window_background(&self) -> Color;
    fn globals(&self) -> &Globals;
    fn globals_mut(&mut self) -> &mut Globals;
}
Expand description

Base trait for all themes.

Required Methods§

source

fn of(&self, id: WidgetId) -> Option<Style>

Return the Style of the given widget using its ID. Returns None if the theme does not have styles for the given widget. In that case, you should use Theme::defaults to get widget style defaults.

source

fn defaults(&self) -> DefaultStyles

Get the default widget styles.

source

fn window_background(&self) -> Color

Get the background color of the window.

source

fn globals(&self) -> &Globals

Get global style values.

source

fn globals_mut(&mut self) -> &mut Globals

Get mutable global style values.

Implementors§