klaptik/widgets/
mod.rs

1use crate::*;
2
3mod grid;
4mod icon;
5mod macros;
6mod tile;
7
8pub use grid::*;
9pub use icon::*;
10pub use layout::*;
11pub use macros::*;
12pub use tile::*;
13
14pub trait Widget<S> {
15    fn invalidate(&mut self);
16    fn update(&mut self, state: S);
17    fn render<D: Display>(&mut self, render: &mut D);
18}
19
20pub type GlyphIcon = Icon<Glyph>;
21pub type Label<const L: usize> = Grid<WrapLayout<DirRight, { usize::MAX }>, L>;
22pub type VerticalLabel<const L: usize> = Grid<WrapLayout<DirDown, { usize::MAX }>, L>;
23pub type WrapPanel<const L: usize, const W: usize> = Grid<WrapLayout<DirRight, W>, L>;