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§
Sourcetype Style: Default
type Style: Default
The supported style of the StyleSheet.
Required Methods§
Sourcefn active(&self, style: &Self::Style) -> Appearance
fn active(&self, style: &Self::Style) -> Appearance
Produces the active Appearance of a button.
Provided Methods§
Sourcefn hovered(&self, style: &Self::Style) -> Appearance
fn hovered(&self, style: &Self::Style) -> Appearance
Produces the hovered Appearance of a button.
Sourcefn pressed(&self, style: &Self::Style) -> Appearance
fn pressed(&self, style: &Self::Style) -> Appearance
Produces the pressed Appearance of a button.
Sourcefn disabled(&self, style: &Self::Style) -> Appearance
fn disabled(&self, style: &Self::Style) -> Appearance
Produces the disabled Appearance of a button.