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
//! Layout containers for composing components.
//!
//! tellur's layout splits into two worlds that share one component protocol
//! ([`VectorComponent`](crate::vector::VectorComponent) /
//! [`RasterComponent`](crate::raster::RasterComponent): `layout(Constraints)
//! -> Vec2`, then `render` at the chosen size):
//!
//! - The **canvas world**: a fixed-size [`Layer`](crate::layer::Layer) whose
//! children carry their own absolute offsets via
//! [`Positioned`](crate::placement::Positioned), plus the auto-fit
//! [`Fragment`](crate::fragment::Fragment) for transparent grouping.
//! - The **flow world** in this module, where parents hand
//! [`Constraints`](crate::geometry::Constraints) down and children report
//! sizes up:
//! - [`Padding`] adds an outer border of empty space around a child.
//! - [`Frame`] picks the outer width / height per axis with [`SizeMode`]
//! (Fill / Hug / Fixed) and keeps its child at top-left. Wrap the child in
//! [`Positioned`](crate::placement::Positioned) for anchor placement.
//! - [`Flex`] arranges children along an axis with spacing, main/cross
//! alignment, and flexbox-style grow weights: a [`Flexible`] child (made
//! with `.grow(w)` or [`Flexible::spacer`]) takes a weighted share of the
//! leftover main-axis space. `CrossAlign::Stretch` propagates a tight
//! cross-axis constraint so children fill the flex's cross extent.
//! - [`DecoratedBox`] paints a background fill (and optionally a border
//! on the vector variant) behind the child.
//! - [`Stack`] lets one `base` child decide the size, then paints arbitrary
//! `under` and `over` children against that resolved box.
//! - [`SizedBox`] is an empty placeholder of a given size.
//!
//! Vector containers live at the module root and operate on
//! `Box<dyn VectorComponent>`. Their raster counterparts share the same
//! names under [`raster`] and operate on `Box<dyn RasterComponent>`. Each
//! container's source file holds both variants side by side.
pub use crateAxis;
pub use DecoratedBox;
pub use ;
pub use ;
pub use Padding;
pub use SizedBox;
pub use Stack;
// Re-export the raster flex trait at the module root, mirroring how
// `placement` re-exports `RasterPlacement`.
pub use RasterFlex;