Skip to main content

Crate agape_layout

Crate agape_layout 

Source
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§

BlockLayout
A Layout that only has one child.
BoxConstraints
Describes the maximum and minimum size of a Layout
EmptyLayout
An Layout with no children.
HorizontalLayout
A HorizontalLayout arranges it’s children horizontally.
IntrinsicSize
This is the size that a Layout will try to be, the actual final size is dependent on the space available.
LayoutIter
An Iterator over &dyn Layout
Position
The x and y position of any structure.
Size
Anything with a width and a height.
VerticalLayout
A Layout that arranges it’s children vertically.

Enums§

AxisAlignment
Describes how a Layout should arrange its children
BoxSizing
Describes the size a Layout will try to be.
LayoutError

Traits§

Layout

Functions§

solve_layout
Calculates the layout of all the layout nodes