summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
blob: d1e98c4ccd2518a504a8a910a8228e3f0f577594 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pub use iced_wgpu::Renderer;
pub use iced_winit::{
    button, slider, text, Align, Button, Checkbox, Color, Image, Justify,
    Length, Radio, Slider, Text,
};

pub type Element<'a, Message> = iced_winit::Element<'a, Message, Renderer>;
pub type Row<'a, Message> = iced_winit::Row<'a, Message, Renderer>;
pub type Column<'a, Message> = iced_winit::Column<'a, Message, Renderer>;

pub trait UserInterface {
    type Message;

    fn update(&mut self, message: Self::Message);

    fn view(&mut self) -> Element<Self::Message>;

    fn run(self)
    where
        Self: Sized,
    {
    }
}