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
extern crate alloc;
/// Definitions of the rendering commands that will be used to draw the UI elements.
/// Internal representation of the layout elements.
/// # Kaolin Layout
///
/// This module contains the logic for the layout computation.
///
/// ## Layout calculations order:
/// 1. ***Fit the width*** --> when creating the node (right after the children have already been added)
/// 2. ***Grow & shrink the width*** --> before the children, top down when all the tree is already built
/// 3. ***Wrap the text*** --> as we grow, when dealing with text (same time as step 2)
/// 4. ***Fit the height*** --> when all children have grown in width, fit the height before returning
/// 5. ***Grow & shrink the height*** --> last step after all width has grown and height has been fit, top-down
/// 6. ***Position and align all elements***
///
/// > -- Call the drawing function \
/// > | -- Create children \
/// > | -- Fit to width \
/// > -- Grow width \
/// > | -- Grow children width \
/// > | -- Fit to height \
/// > -- Grow height \
/// > -- Position and align all elements
/// Renderers, the things that get the commands and draw stuff on the screen.
/// Contains types and traits for styling UI elements.
///
/// This module provides definitions for both Flex Boxes with [`FlexStyle`] and text configuration with [`TextStyle`].
pub use Kaolin;