pub trait StyleSheet {
    type Style: Default;

    // Required methods
    fn active(&self, style: &Self::Style, is_checked: bool) -> Appearance;
    fn hovered(&self, style: &Self::Style, is_checked: bool) -> Appearance;

    // Provided method
    fn disabled(&self, style: &Self::Style, is_checked: bool) -> Appearance { ... }
}
Expand description

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

Required Associated Types§

type Style: Default

The supported style of the StyleSheet.

Required Methods§

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

Produces the active Appearance of a checkbox.

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

Produces the hovered Appearance of a checkbox.

Provided Methods§

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

Produces the disabled Appearance of a checkbox.

Implementors§