embedded-list 0.1.0

A list component for embedded-graphics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use embedded_graphics::prelude::{DrawTarget, PixelColor, Point};

pub trait ListItem {
    type C: PixelColor;

    fn draw<D: DrawTarget<Color = Self::C>>(
        &self,
        display: &mut D,
        origin: Point,
        is_active: bool,
    ) -> Result<Point, D::Error>;

    fn height(&self) -> i32;
}