pub trait StyleSheet {
    type Style: Default;

    fn active(&self, style: &Self::Style) -> Appearance;

    fn hovered(&self, style: &Self::Style) -> Appearance { ... }
    fn pressed(&self, style: &Self::Style) -> Appearance { ... }
    fn disabled(&self, style: &Self::Style) -> Appearance { ... }
}
Expand description

A set of rules that dictate the style of a button.

Required Associated Types§

type Style: Default

The supported style of the StyleSheet.

Required Methods§

fn active(&self, style: &Self::Style) -> Appearance

Produces the active Appearance of a button.

Provided Methods§

fn hovered(&self, style: &Self::Style) -> Appearance

Produces the hovered Appearance of a button.

fn pressed(&self, style: &Self::Style) -> Appearance

Produces the pressed Appearance of a button.

fn disabled(&self, style: &Self::Style) -> Appearance

Produces the disabled Appearance of a button.

Implementors§