1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// #![feature(type_alias_impl_trait)]

use vger::color::*;
use vger::{LineMetrics, PaintIndex, Vger};

#[cfg(feature = "winit")]
#[macro_use]
extern crate lazy_static;

mod view;
pub use view::*;

mod viewid;
pub use viewid::*;

mod viewtuple;
pub use viewtuple::*;

mod event;
pub use event::*;

mod lens;
pub use lens::*;

mod binding;
pub use binding::*;

mod context;
pub use context::*;

mod views;
pub use views::*;

mod paint;
pub use paint::*;

mod modifiers;
pub use modifiers::*;

mod colors;
pub use colors::*;

mod align;
pub use align::*;

mod region;
pub use region::*;

#[cfg(feature = "winit")]
mod winit_event_loop;

#[cfg(feature = "winit")]
pub use winit_event_loop::*;

// See https://rust-lang.github.io/api-guidelines/future-proofing.html
pub(crate) mod private {
    pub trait Sealed {}
}

#[cfg(test)]
mod tests {

    use super::*;

    #[test]
    fn test_button() {
        let _ = button(text("click me"), |_cx| {
            println!("clicked!");
        });
    }
}