Skip to main content

fret_ui_kit/style/
layout_shorthands.rs

1use super::{LayoutRefinement, Space};
2
3impl LayoutRefinement {
4    pub fn w_0(self) -> Self {
5        self.w_space(Space::N0)
6    }
7
8    pub fn h_0(self) -> Self {
9        self.h_space(Space::N0)
10    }
11
12    pub fn min_h_0(self) -> Self {
13        self.min_h_space(Space::N0)
14    }
15
16    pub fn max_w_0(self) -> Self {
17        self.max_w_space(Space::N0)
18    }
19
20    pub fn max_h_0(self) -> Self {
21        self.max_h_space(Space::N0)
22    }
23
24    pub fn w_0p5(self) -> Self {
25        self.w_space(Space::N0p5)
26    }
27
28    pub fn h_0p5(self) -> Self {
29        self.h_space(Space::N0p5)
30    }
31
32    pub fn min_w_0p5(self) -> Self {
33        self.min_w_space(Space::N0p5)
34    }
35
36    pub fn min_h_0p5(self) -> Self {
37        self.min_h_space(Space::N0p5)
38    }
39
40    pub fn max_w_0p5(self) -> Self {
41        self.max_w_space(Space::N0p5)
42    }
43
44    pub fn max_h_0p5(self) -> Self {
45        self.max_h_space(Space::N0p5)
46    }
47
48    pub fn w_1(self) -> Self {
49        self.w_space(Space::N1)
50    }
51
52    pub fn h_1(self) -> Self {
53        self.h_space(Space::N1)
54    }
55
56    pub fn min_w_1(self) -> Self {
57        self.min_w_space(Space::N1)
58    }
59
60    pub fn min_h_1(self) -> Self {
61        self.min_h_space(Space::N1)
62    }
63
64    pub fn max_w_1(self) -> Self {
65        self.max_w_space(Space::N1)
66    }
67
68    pub fn max_h_1(self) -> Self {
69        self.max_h_space(Space::N1)
70    }
71
72    pub fn w_1p5(self) -> Self {
73        self.w_space(Space::N1p5)
74    }
75
76    pub fn h_1p5(self) -> Self {
77        self.h_space(Space::N1p5)
78    }
79
80    pub fn min_w_1p5(self) -> Self {
81        self.min_w_space(Space::N1p5)
82    }
83
84    pub fn min_h_1p5(self) -> Self {
85        self.min_h_space(Space::N1p5)
86    }
87
88    pub fn max_w_1p5(self) -> Self {
89        self.max_w_space(Space::N1p5)
90    }
91
92    pub fn max_h_1p5(self) -> Self {
93        self.max_h_space(Space::N1p5)
94    }
95
96    pub fn w_2(self) -> Self {
97        self.w_space(Space::N2)
98    }
99
100    pub fn h_2(self) -> Self {
101        self.h_space(Space::N2)
102    }
103
104    pub fn min_w_2(self) -> Self {
105        self.min_w_space(Space::N2)
106    }
107
108    pub fn min_h_2(self) -> Self {
109        self.min_h_space(Space::N2)
110    }
111
112    pub fn max_w_2(self) -> Self {
113        self.max_w_space(Space::N2)
114    }
115
116    pub fn max_h_2(self) -> Self {
117        self.max_h_space(Space::N2)
118    }
119
120    pub fn w_2p5(self) -> Self {
121        self.w_space(Space::N2p5)
122    }
123
124    pub fn h_2p5(self) -> Self {
125        self.h_space(Space::N2p5)
126    }
127
128    pub fn min_w_2p5(self) -> Self {
129        self.min_w_space(Space::N2p5)
130    }
131
132    pub fn min_h_2p5(self) -> Self {
133        self.min_h_space(Space::N2p5)
134    }
135
136    pub fn max_w_2p5(self) -> Self {
137        self.max_w_space(Space::N2p5)
138    }
139
140    pub fn max_h_2p5(self) -> Self {
141        self.max_h_space(Space::N2p5)
142    }
143
144    pub fn w_3(self) -> Self {
145        self.w_space(Space::N3)
146    }
147
148    pub fn h_3(self) -> Self {
149        self.h_space(Space::N3)
150    }
151
152    pub fn min_w_3(self) -> Self {
153        self.min_w_space(Space::N3)
154    }
155
156    pub fn min_h_3(self) -> Self {
157        self.min_h_space(Space::N3)
158    }
159
160    pub fn max_w_3(self) -> Self {
161        self.max_w_space(Space::N3)
162    }
163
164    pub fn max_h_3(self) -> Self {
165        self.max_h_space(Space::N3)
166    }
167
168    pub fn w_3p5(self) -> Self {
169        self.w_space(Space::N3p5)
170    }
171
172    pub fn h_3p5(self) -> Self {
173        self.h_space(Space::N3p5)
174    }
175
176    pub fn min_w_3p5(self) -> Self {
177        self.min_w_space(Space::N3p5)
178    }
179
180    pub fn min_h_3p5(self) -> Self {
181        self.min_h_space(Space::N3p5)
182    }
183
184    pub fn max_w_3p5(self) -> Self {
185        self.max_w_space(Space::N3p5)
186    }
187
188    pub fn max_h_3p5(self) -> Self {
189        self.max_h_space(Space::N3p5)
190    }
191
192    pub fn w_4(self) -> Self {
193        self.w_space(Space::N4)
194    }
195
196    pub fn h_4(self) -> Self {
197        self.h_space(Space::N4)
198    }
199
200    pub fn min_w_4(self) -> Self {
201        self.min_w_space(Space::N4)
202    }
203
204    pub fn min_h_4(self) -> Self {
205        self.min_h_space(Space::N4)
206    }
207
208    pub fn max_w_4(self) -> Self {
209        self.max_w_space(Space::N4)
210    }
211
212    pub fn max_h_4(self) -> Self {
213        self.max_h_space(Space::N4)
214    }
215
216    pub fn w_5(self) -> Self {
217        self.w_space(Space::N5)
218    }
219
220    pub fn h_5(self) -> Self {
221        self.h_space(Space::N5)
222    }
223
224    pub fn min_w_5(self) -> Self {
225        self.min_w_space(Space::N5)
226    }
227
228    pub fn min_h_5(self) -> Self {
229        self.min_h_space(Space::N5)
230    }
231
232    pub fn max_w_5(self) -> Self {
233        self.max_w_space(Space::N5)
234    }
235
236    pub fn max_h_5(self) -> Self {
237        self.max_h_space(Space::N5)
238    }
239
240    pub fn w_6(self) -> Self {
241        self.w_space(Space::N6)
242    }
243
244    pub fn h_6(self) -> Self {
245        self.h_space(Space::N6)
246    }
247
248    pub fn min_w_6(self) -> Self {
249        self.min_w_space(Space::N6)
250    }
251
252    pub fn min_h_6(self) -> Self {
253        self.min_h_space(Space::N6)
254    }
255
256    pub fn max_w_6(self) -> Self {
257        self.max_w_space(Space::N6)
258    }
259
260    pub fn max_h_6(self) -> Self {
261        self.max_h_space(Space::N6)
262    }
263
264    pub fn w_8(self) -> Self {
265        self.w_space(Space::N8)
266    }
267
268    pub fn h_8(self) -> Self {
269        self.h_space(Space::N8)
270    }
271
272    pub fn min_w_8(self) -> Self {
273        self.min_w_space(Space::N8)
274    }
275
276    pub fn min_h_8(self) -> Self {
277        self.min_h_space(Space::N8)
278    }
279
280    pub fn max_w_8(self) -> Self {
281        self.max_w_space(Space::N8)
282    }
283
284    pub fn max_h_8(self) -> Self {
285        self.max_h_space(Space::N8)
286    }
287
288    pub fn w_10(self) -> Self {
289        self.w_space(Space::N10)
290    }
291
292    pub fn h_10(self) -> Self {
293        self.h_space(Space::N10)
294    }
295
296    pub fn min_w_10(self) -> Self {
297        self.min_w_space(Space::N10)
298    }
299
300    pub fn min_h_10(self) -> Self {
301        self.min_h_space(Space::N10)
302    }
303
304    pub fn max_w_10(self) -> Self {
305        self.max_w_space(Space::N10)
306    }
307
308    pub fn max_h_10(self) -> Self {
309        self.max_h_space(Space::N10)
310    }
311
312    pub fn w_11(self) -> Self {
313        self.w_space(Space::N11)
314    }
315
316    pub fn h_11(self) -> Self {
317        self.h_space(Space::N11)
318    }
319
320    pub fn min_w_11(self) -> Self {
321        self.min_w_space(Space::N11)
322    }
323
324    pub fn min_h_11(self) -> Self {
325        self.min_h_space(Space::N11)
326    }
327
328    pub fn max_w_11(self) -> Self {
329        self.max_w_space(Space::N11)
330    }
331
332    pub fn max_h_11(self) -> Self {
333        self.max_h_space(Space::N11)
334    }
335}