# randrew/layout

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/randrew-layout).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

992 stars · 79 forks · C · NOASSERTION

## Links

- GitHub: https://github.com/randrew/layout
- awesome-repositories: https://awesome-repositories.com/repository/randrew-layout.md

## Topics

`flexbox` `gui` `imgui` `single-file` `ui`

## Description

This library is a portable, header-only engine designed for calculating the geometric positions and dimensions of nested rectangular elements. It provides a recursive stacking-box model to determine interface coordinates, serving as a lightweight solution for two-dimensional layout calculations in C99 or C++ environments.

The engine distinguishes itself through its focus on portability and resource efficiency. It utilizes a dependency-free memory abstraction that allows developers to override default allocation and assertion routines, making it suitable for specialized or restricted computing environments where standard library access is limited.

The library supports compile-time configuration to toggle between integer and floating-point coordinate systems. This flexibility allows for precise alignment and rendering adjustments tailored to specific hardware or display requirements. The project is distributed as a single-file header library, facilitating direct integration into existing codebases without external dependencies.

## Tags

### User Interface & Experience

- [Layout Engines](https://awesome-repositories.com/f/user-interface-experience/element-positioning/layout-engines.md) — Provides a single-file library for calculating the geometric positions and dimensions of nested rectangular elements using stacking rules.
- [C99 UI Layout Libraries](https://awesome-repositories.com/f/user-interface-experience/c-terminal-ui-libraries/c-desktop-ui-libraries/c99-ui-layout-libraries.md) — Provides a portable header-only library for computing interface element coordinates that compiles with standard C99 or C++ compilers.
- [Cross-Platform Layout Engines](https://awesome-repositories.com/f/user-interface-experience/cross-platform-layout-engines.md) — Calculates consistent two-dimensional interface geometry across different operating systems and rendering backends using a single portable C codebase.
- [Stacking Calculators](https://awesome-repositories.com/f/user-interface-experience/layout-positioning/stacking-calculators.md) — Calculates element positions by recursively applying spatial constraints and relative stacking rules to a hierarchy of rectangular containers.
- [Embedded UI Toolkits](https://awesome-repositories.com/f/user-interface-experience/embedded-ui-toolkits.md) — Builds lightweight graphical interfaces for resource-constrained hardware by calculating element positions without heavy external frameworks.
- [UI Geometry Calculation Tools](https://awesome-repositories.com/f/user-interface-experience/ui-geometry-calculation-tools.md) — Calculates UI geometry with memory-efficient routines suitable for integration into restricted or specialized computing environments.

### Software Engineering & Architecture

- [Layout Calculations](https://awesome-repositories.com/f/software-engineering-architecture/context-aware-validation/layout-calculations.md) — Calculates the geometric positions and dimensions of nested rectangular interface elements by applying stacking rules and spatial constraints. ([source](https://github.com/randrew/layout/blob/master/license.md))
- [Dependency-Free Architectures](https://awesome-repositories.com/f/software-engineering-architecture/dependency-free-architectures.md) — Implements a dependency-free architecture by delegating memory management and assertions to the host environment via function pointers.

### Operating Systems & Systems Programming

- [Custom Memory Allocators](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/custom-memory-allocators.md) — Allows overriding default memory allocation and assertion routines to ensure compatibility with restricted computing environments. ([source](https://github.com/randrew/layout/blob/master/readme.md))

### Programming Languages & Runtimes

- [Header-Only C Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/c-source-translators/small-c-compilers/header-only-c-libraries.md) — Ships as a single-file header library for direct integration into C99 or C++ codebases without external dependencies.

### Scientific & Mathematical Computing

- [Precision-Switched Float Builds](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/floating-point-handlers/floating-point-precision-utilities/precision-switched-float-builds.md) — Provides compile-time toggling between integer and floating-point coordinate systems to optimize performance or accuracy for specific hardware.
