tek/layout
2024-12-31 23:42:35 +01:00
..
src shorten TuiIn, TuiOut 2024-12-31 23:42:35 +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 still dark; refactor and document layout crate 2024-12-31 19:57:03 +01:00

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