pub trait StyleSheet {
    type Style: Default;

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

    // Provided methods
    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§

source

type Style: Default

The supported style of the StyleSheet.

Required Methods§

source

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

Produces the active Appearance of a button.

Provided Methods§

source

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

Produces the hovered Appearance of a button.

source

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

Produces the pressed Appearance of a button.

source

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

Produces the disabled Appearance of a button.

Implementors§