Expand description
Layout engine
This is a two pass layout engine that uses constraints to calculate size and position.
§IntrinsicSize
Intrinsic size is the size a Layout wants to be. Say there’s three rects, and each
want to fill the screen, none of them can fulfill this without leaving no space
for the others. So the true final size will be for each layout will be 1/3 of the
actual window size, thus splitting it equally.
Structs§
- Block
Layout - A
Layoutthat only has one child. - BoxConstraints
- Describes the maximum and minimum size of a
Layout - Empty
Layout - An
Layoutwith no children. - Horizontal
Layout - A
HorizontalLayoutarranges it’s children horizontally. - Intrinsic
Size - This is the size that a
Layoutwill try to be, the actual final size is dependent on the space available. - Layout
Iter - An
Iteratorover&dyn Layout - Position
- The
xandyposition of any structure. - Size
- Anything with a width and a height.
- Vertical
Layout - A
Layoutthat arranges it’s children vertically.
Enums§
- Axis
Alignment - Describes how a
Layoutshould arrange its children - BoxSizing
- Describes the size a
Layoutwill try to be. - Layout
Error
Traits§
Functions§
- solve_
layout - Calculates the layout of all the layout nodes