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
use crate::*;
pub struct Spacer {}
impl View for Spacer {
fn print(&self, _id: ViewId, _cx: &mut Context) {
println!("Spacer");
}
fn draw(&self, _id: ViewId, _cx: &mut Context, _vger: &mut Vger) {}
fn layout(
&self,
_id: ViewId,
_sz: LocalSize,
_cx: &mut Context,
_vger: &mut Vger,
) -> LocalSize {
[0.0, 0.0].into()
}
fn is_flexible(&self) -> bool {
true
}
}
impl private::Sealed for Spacer {}
pub fn spacer() -> Spacer {
Spacer {}
}