Skip to content

gbui 0.2

Choose a tag to compare

@gitgusilva gitgusilva released this 16 Aug 03:27
· 53 commits to main since this release

The first version with a published site, a CI pipeline, an installable library
and a set of application screens to look at. It is the version the documentation
described from the start; it had never been tagged, which is what this tag fixes
— an archived version with no tag is a dropdown entry that 404s.

The toolkit

  • Build → layout → paint, three stages in one direction: layout is
    arithmetic that can be asserted without a window, and painting is a display
    list that can be inspected without a GPU.
  • CSS flexbox with wrapping, percentages, min-content sizing and out-of-flow
    positioning, in logical pixels — a 200% display is a property of the output
    rather than something a component knows about.
  • Theming as data: 24 semantic tokens read from the gitbox-themes
    registry's JSON, with Material 3, Cupertino and Fluent palettes built in, and
    a Design beside them for shape, sizing and motion.
  • A software rasteriser with antialiasing, gradients and clipping, and an
    SVG writer for review and golden images.
  • The interaction layer in full: hover, press, click, focus,
    :focus-visible, focus-within, Tab traversal, wheel routing and per-node
    cursors.
  • An animation clock on CSS's transition model — a component says where a
    value should be, not how to get there.
  • Around fifty components, from a button to a table, a rich-text editor and
    eight kinds of chart, all stateless functions themed by token.
  • One allocation per frame: nodes live in an arena addressed by index, so
    building a tree is a push_back and releasing one is a reset.

The component set as data

  • gbui::meta describes every component — its group, its documentation, its
    signature, and each option with type, default and doc — generated from the
    headers
    by tools/generate_meta.py, so a table nobody maintains cannot fall
    behind the code it describes. CI regenerates it and fails on a difference.

Demos and documentation

  • Six application screens built from the public headers alone: a revenue
    dashboard, a weather desk, a plant supervisory HMI, a production line monitor,
    a grid control desk and a logistics control tower. They link gbui::gbui and
    nothing else, so a change that makes them awkward has made the library
    awkward.
  • The demos run in the browser through WebAssembly, rasterised on the CPU
    into a <canvas> — the same source, with no DOM inside the rectangle.
  • A documentation site on VitePress, published per version: the current
    release at the root and every archived one at its own address, built from its
    own tag.
  • The source is shown first and the screen runs when the reader asks, so nothing
    downloads until they press Run.

Build and packaging

  • Installable with CMake, as a static or shared library, and consumed from
    outside the tree in CI to prove the install actually works.
  • SDL2 is optional: without it everything still builds and every test still
    passes, and only Window::create changes.
  • CI builds, tests, sanitises and lints on Linux, macOS and Windows, with
    warnings as errors.

Fixed

  • Every std::optional in an options struct has a default member initialiser,
    so a designated-initialiser call site cannot leave one indeterminate.
  • Four things that only writing six screens against the library could find — see
    acf2897.
  • The runner works on a fresh machine and on MSVC; the gallery example the
    gitignore was hiding is committed.

Known at the time

  • No accessibility tree, and no bridge for a screen reader.
  • No text shaping, so Arabic, Devanagari and emoji are wrong.
  • No GPU painter — the Painter interface is six methods precisely so one can
    be written.
  • No image decoding.