Module layout

Source
Expand description

Contains useful types and functions for layout interaction.

Structs§

Dimension
A unit of linear measurement
Layout
The final result of a layout algorithm for a single node.
LayoutNode
The computed layout with children nodes.
LayoutStyle
Defines different aspects and properties of a widget layout.
LengthPercentage
A unit of linear measurement
LengthPercentageAuto
A unit of linear measurement
Line
An abstract “line”. Represents any type that has a start and an end
NodeId
A type representing the id of a single node in a tree of nodes
Rect
An axis-aligned UI rectangle
StyleNode
The raw layout styles with children nodes.
TaffyTree
An entire tree of UI nodes. The entry point to Taffy’s high-level API.

Enums§

AlignContent
Sets the distribution of space between and around content items For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
AlignItems
Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
Display
Sets the layout used for the children of this node
FlexDirection
The direction of the flexbox layout main axis.
FlexWrap
Controls whether flex items are forced onto one line or can wrap onto multiple lines.
GridAutoFlow
Controls whether grid items are placed row-wise or column-wise. And whether the sparse or dense packing algorithm is used.
Overflow
How children overflowing their container should affect layout
Position
The positioning strategy for this item.
TaffyError
An error that occurs while trying to access or modify a node’s children by index.

Type Aliases§

AlignSelf
Controls alignment of an individual node
GridPlacement
A grid line placement specification. Used for grid-[row/column]-[start/end]. Named tracks are not implemented.
JustifyContent
Sets the distribution of space between and around content items For Flexbox it controls alignment in the main axis For Grid it controls alignment in the inline axis
JustifyItems
Used to control how child nodes are aligned. Does not apply to Flexbox, and will be ignored if specified on a flex container For Grid it controls alignment in the inline axis
JustifySelf
Controls alignment of an individual node
TaffyResult
The error Taffy generates on invalid operations