[][src]Struct kas_theme::ThemeColours

pub struct ThemeColours {
    pub background: Colour,
    pub frame: Colour,
    pub bg: Colour,
    pub bg_disabled: Colour,
    pub bg_error: Colour,
    pub text: Colour,
    pub text_sel: Colour,
    pub text_sel_bg: Colour,
    pub label_text: Colour,
    pub button_text: Colour,
    pub nav_focus: Colour,
    pub button: Colour,
    pub button_disabled: Colour,
    pub button_highlighted: Colour,
    pub button_depressed: Colour,
    pub checkbox: Colour,
}

Provides standard theme colours

Fields

background: Colour

Background colour

frame: Colour

Colour for frames (not always used)

bg: Colour

Background colour of EditBox

bg_disabled: Colour

Background colour of EditBox (disabled state)

bg_error: Colour

Background colour of EditBox (error state)

text: Colour

Text colour in an EditBox

text_sel: Colour

Selected tect colour

text_sel_bg: Colour

Selected text background colour

label_text: Colour

Text colour in a Label

button_text: Colour

Text colour on a TextButton

nav_focus: Colour

Highlight colour for keyboard navigation

button: Colour

Colour of a TextButton

button_disabled: Colour

Colour of a TextButton (disabled state)

button_highlighted: Colour

Colour of a TextButton when hovered by the mouse

button_depressed: Colour

Colour of a TextButton when depressed

checkbox: Colour

Colour of mark within a CheckBox or RadioBox

Implementations

impl ThemeColours[src]

pub fn open(scheme: &str) -> Option<Self>[src]

Open the given scheme, if found

TODO: the intention is that this method can read and cache data from external resources. For now, we simply hard-code a few instances.

pub fn new() -> Self[src]

Default theme: white with blue activable items

pub fn grey() -> Self[src]

Grey with blue activable items

pub fn light() -> Self[src]

Light scheme

pub fn dark() -> Self[src]

Dark scheme

pub fn bg_col(&self, state: InputState) -> Colour[src]

Get colour of a text area, depending on state

pub fn nav_region(&self, state: InputState) -> Option<Colour>[src]

Get colour for navigation highlight region, if any

pub fn button_state(&self, state: InputState) -> Colour[src]

Get colour for a button, depending on state

pub fn check_mark_state(
    &self,
    state: InputState,
    checked: bool
) -> Option<Colour>
[src]

Get colour for a checkbox mark, depending on state

pub fn menu_entry(&self, state: InputState) -> Option<Colour>[src]

Get background highlight colour of a menu entry, if any

pub fn scrollbar_state(&self, state: InputState) -> Colour[src]

Get colour of a scrollbar, depending on state

pub fn text_class(&self, class: TextClass) -> Colour[src]

Get text colour from class

Trait Implementations

impl Clone for ThemeColours[src]

impl Debug for ThemeColours[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.