mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
1.1 KiB
1.1 KiB
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.
Fillis to make the content's dimension equal to the container's.Fixedis to assign a fixed dimension to its content.Shrink/Expandare to change the dimension of the contentMin/Maxare to constrain the dimension of the contentPush/Pullare to move the content along the axisMargin/Paddingare to change the dimension proportionallyAlignis to pin the content along the axis of the containerWhenis to render content conditionallyEitheris to alternates between contentsMapis to transform each contentReduceis to transform all contents into one- and, finally,
Bspis 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...