Function layout_engine::flexbox::layout_flexbox
source · pub fn layout_flexbox(
rect: Rect,
should_wrap: bool,
minimum: bool,
expand: bool,
row_gap: usize,
column_gap: usize,
orientation: Orientation,
items: &[impl FlexLayout]
) -> Vec<Rect>
Expand description
Positions items in a flexbox layout.
Parameters
rect
: the space the flexbox has availableshould_wrap
: should the flexbox wrap if not enough spaceminimum
: don’t bother with naturual sizingexpand
: should the flexbox take up the max space?row_gap
: what is the gap between rows?column_gap
: what is the gap between columns?orientation
: is this horizontal or verticalitems
: theFlexLayout
to align.expand_in_row
: should items within a row be expanded?