tek/layout
2025-01-03 22:50:58 +01:00
..
src start implementing edn loader; remove PhantomData from some tek_layout constructs 2025-01-03 22:50:58 +01:00
Cargo.lock the wild Layout trait appears 2024-12-31 00:39:12 +01:00
Cargo.toml wip: big flat pt.4: extract layout crate 2024-12-30 19:07:46 +01:00
README.md more esoteric with the docs; center all by default; genericity without subject doesnt compile lol 2025-01-01 01:53:17 +01:00

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...