2025-01-18

GUI (Graphical User Interface)

Table of Contents

1. Immediate Mode GUI

  • Good for games or applications that run in FPS
  • Good libraries (all of them allow any backend to be used)
    • raygui (uses raylib as backend) (C)
    • imgui (C++)
    • clay (C) (any backend. raylib, sdl2, cairo backends provided)
    • nuklear (C)

2. Non Immediate-Mode

2.1. Non Native

  • NAppGUI (C) (A cross platform C SDK)
  • GTK (C)
  • QT (C++)

2.2. Native Widgets library

  • wxWidgets (C++)
  • tk (tcl)

3. Layouting

How Clay's UI Layout Algorithm Works: https://youtu.be/by9lQvpvMIc?si=R_6aSFosDxGM01LR&t=2181

Compute the following turn by turn:

  • Fit sizing widths in Reverse Breadth First traversal of the tree
  • Grow & Shrink Sizing widths in Breadth First traversal
  • Wrap Text
  • Fix sizing heights
  • Grow & Shrink Sizing heights
  • Positions
  • Draw Commands

4. Reactive UI


You can send your feedback, queries here