mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
25 lines
1.1 KiB
Markdown
25 lines
1.1 KiB
Markdown
# `tek_layout`
|
|
|
|
this crate exposes several layout operators
|
|
which work entirely in unsigned coordinates
|
|
and are generic over `tek_engine::Engine`
|
|
and `tek_engine::Content`. chiefly, they
|
|
are not dependent on rendering framework.
|
|
|
|
* `Fill` is to make the content's dimension equal to the container's.
|
|
* `Fixed` is to assign a fixed dimension to its content.
|
|
* `Shrink`/`Expand` are to change the dimension of the content
|
|
* `Min`/`Max` are to constrain the dimension of the content
|
|
* `Push`/`Pull` are to move the content along the axis
|
|
* `Margin`/`Padding` are to change the dimension proportionally
|
|
* `Align` is to pin the content along the axis of the container
|
|
* `When` is to render content conditionally
|
|
* `Either` is to alternates between contents
|
|
* `Map` is to transform each content
|
|
* `Reduce` is to transform all contents into one
|
|
* and, finally, `Bsp` is to put 2 where there was 1.
|
|
|
|
**todo.** and then you're like,
|
|
"but why are they generic over E in the first place
|
|
and not, say, over E::Unit? that might even free up
|
|
some space to implement for non-uint cosmologies...
|