pub trait IndicatorStyle: Clone + Copy {
type Shape: ContainsPoint + Transform + Clone;
type State: Default + Copy;
// Required methods
fn padding(&self, state: &Self::State, height: i32) -> Insets;
fn shape(
&self,
state: &Self::State,
bounds: Rectangle,
fill_width: u32
) -> Self::Shape;
fn draw<D>(
&self,
state: &Self::State,
input_state: InputState,
display: &mut D
) -> Result<Self::Shape, D::Error>
where D: DrawTarget<Color = BinaryColor>;
// Provided methods
fn on_target_changed(&self, _state: &mut Self::State) { ... }
fn update(&self, _state: &mut Self::State, _input_state: InputState) { ... }
}
Required Associated Types§
Required Methods§
fn padding(&self, state: &Self::State, height: i32) -> Insets
fn shape( &self, state: &Self::State, bounds: Rectangle, fill_width: u32 ) -> Self::Shape
fn draw<D>(
&self,
state: &Self::State,
input_state: InputState,
display: &mut D
) -> Result<Self::Shape, D::Error>where
D: DrawTarget<Color = BinaryColor>,
Provided Methods§
fn on_target_changed(&self, _state: &mut Self::State)
fn update(&self, _state: &mut Self::State, _input_state: InputState)
Object Safety§
This trait is not object safe.