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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
use crate::{
Alignments, Colors, FlexBasis, FlexDirection, GridAuto, GridFlow, GridTemplate,
MultiColumnLineStyle, Tree, Unit,
};
pub struct Container {
pub child: Tree,
pub style: ContainerStyle,
}
#[derive(Default)]
pub struct ContainerStyle {
pub align: Alignments,
pub height: Unit,
pub width: Unit,
pub padding: Unit,
pub margin: Unit,
pub background_color: Colors,
}
pub struct List {
pub children: Vec<Tree>,
}
pub struct SizedBox {
pub child: Tree,
pub style: SizedBoxStyle,
}
pub struct SizedBoxStyle {
pub height: Unit,
pub width: Unit,
}
pub struct Align {
pub child: Tree,
pub style: AlignStyle,
}
pub struct AlignStyle {
pub align: Alignments,
}
pub struct Center {
pub child: Tree,
}
pub struct Col {
pub children: Vec<Tree>,
}
pub struct Flex {
pub child: Tree,
pub style: FlexStyle,
}
pub struct FlexStyle {
pub align: Alignments,
pub basis: FlexBasis,
pub direction: FlexDirection,
pub grow: Unit,
pub order: Unit,
pub wrap: bool,
}
pub struct Row {
pub children: Vec<Tree>,
}
pub struct Grid {
pub children: Vec<Tree>,
pub style: GridStyle,
}
pub struct GridStyle {
pub col: GridAuto,
pub col_gap: Unit,
pub flow: GridFlow,
pub row: GridAuto,
pub row_gap: Unit,
pub template_col: GridTemplate,
pub template_row: GridTemplate,
}
pub struct MultiColumn {
pub children: Vec<Tree>,
pub style: MultiColumnStyle,
}
pub struct MultiColumnStyle {
pub color: Colors,
pub count: Unit,
pub gap: Unit,
pub style: MultiColumnLineStyle,
}