tek/layout/README.md

20 lines
844 B
Markdown

# `tek_layout`
this crate exposes several layout operators
which are generic over `tek_engine::Engine`.
* `Fill` makes the content's dimension equal to the container's.
* `Fixed` assigns a fixed dimension to its content.
* `Shrink` reduces the dimension of the content
* `Expand` increases the dimension of the content
* `Min` enforces minimum dimension for the content
* `Max` enforces maximum dimension for the content
* `Push` moves the content in the positive direction
* `Pull` moves the content in the negative direction
* `Margin` grows each dimension from both ends
* `Padding` shrinks each dimension from both ends
* `Align` pins the content along an axis of the container
* `When` renders a content conditionally
* `Either` alternates between two contents
* `Map` transforms each content
* `Reduce` transforms all contents into one