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
72
73
74
75
76
77
pub mod types;

#[allow(unused_imports)]
pub mod stacker;

pub mod components {
    pub use super::stacker::*;
}

pub mod primitives {
    use pax_lang::Pax;
    use pax_runtime_api::Size;

    use crate::types::text::TextStyle;
    use crate::types::PathSegment;

    #[derive(Pax)]
    #[primitive("pax_std_primitives::frame::FrameInstance")]
    pub struct Frame {}

    #[derive(Pax)]
    #[custom(Imports)]
    #[primitive("pax_std_primitives::group::GroupInstance")]
    pub struct Group {}

    #[derive(Pax)]
    #[custom(Imports)]
    #[primitive("pax_std_primitives::scroller::ScrollerInstance")]
    pub struct Scroller {
        pub size_inner_pane_x: pax_lang::Property<Size>,
        pub size_inner_pane_y: pax_lang::Property<Size>,
        pub scroll_enabled_x: pax_lang::Property<bool>,
        pub scroll_enabled_y: pax_lang::Property<bool>,
    }

    #[derive(Pax)]
    #[custom(Imports)]
    #[primitive("pax_std_primitives::rectangle::RectangleInstance")]
    pub struct Rectangle {
        pub stroke: pax_lang::Property<crate::types::Stroke>,
        pub fill: pax_lang::Property<crate::types::Fill>,
        pub corner_radii: pax_lang::Property<crate::types::RectangleCornerRadii>,
    }

    #[derive(Pax)]
    #[custom(Imports)]
    #[primitive("pax_std_primitives::ellipse::EllipseInstance")]
    pub struct Ellipse {
        pub stroke: pax_lang::Property<crate::types::Stroke>,
        pub fill: pax_lang::Property<crate::types::Color>,
    }

    #[derive(Pax)]
    #[custom(Imports)]
    #[primitive("pax_std_primitives::path::PathInstance")]
    pub struct Path {
        pub segments: pax_lang::Property<Vec<PathSegment>>,
        pub stroke: pax_lang::Property<crate::types::Stroke>,
        pub fill: pax_lang::Property<crate::types::Color>,
    }

    #[derive(Pax)]
    #[custom(Imports)]
    #[primitive("pax_std_primitives::text::TextInstance")]
    pub struct Text {
        pub text: pax_lang::Property<String>,
        pub style: pax_lang::Property<TextStyle>,
        pub style_link: pax_lang::Property<TextStyle>,
    }

    #[derive(Pax)]
    #[custom(Imports)]
    #[primitive("pax_std_primitives::image::ImageInstance")]
    pub struct Image {
        pub path: pax_lang::Property<String>,
    }
}