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
//! Commonly used types

use crate::compute::LayoutAlgorithm;
use crate::layout::{SizeAndBaselines, SizingMode};

/// Apply the flexbox algorithm and recursively layout the specified node
#[inline(always)]
pub fn layout_flexbox(
    tree: &mut impl LayoutTree,
    node: Node,
    known_dimensions: Size<Option<f32>>,
    parent_size: Size<Option<f32>>,
    available_space: Size<AvailableSpace>,
    sizing_mode: SizingMode,
) -> SizeAndBaselines {
    crate::compute::flexbox::FlexboxAlgorithm::perform_layout(
        tree,
        node,
        known_dimensions,
        parent_size,
        available_space,
        sizing_mode,
    )
}

pub use crate::{
    geometry::{Line, Rect, Size},
    layout::Layout,
    node::{Node, Taffy},
    style::{
        AlignContent, AlignItems, AlignSelf, AvailableSpace, Dimension, Display, FlexDirection, FlexWrap,
        JustifyContent, JustifyItems, JustifySelf, LengthPercentage, LengthPercentageAuto, Position, Style,
    },
    style_helpers::{
        auto, fit_content, max_content, min_content, percent, points, zero, FromFlex, FromPercent, FromPoints,
        TaffyAuto, TaffyFitContent, TaffyMaxContent, TaffyMinContent, TaffyZero,
    },
    tree::LayoutTree,
};

#[cfg(feature = "grid")]
pub use crate::style::{
    GridAutoFlow, GridPlacement, GridTrackRepetition, MaxTrackSizingFunction, MinTrackSizingFunction,
    NonRepeatedTrackSizingFunction, TrackSizingFunction,
};
#[cfg(feature = "grid")]
pub use crate::style_helpers::{
    evenly_sized_tracks, flex, fr, line, minmax, repeat, span, TaffyGridLine, TaffyGridSpan,
};