These last two months in my spare time I was working on a new UI toolkit written on top of SDL2.

My design decisions about it were:

  • Coded in modern C++17.
  • Support for WebAssembly since the very beginning.
  • Built on top of SDL2 because of its portability to several platforms and because SDL2 is WebAssembly-ready thanks to Emscripten.
  • Template-based ==> Header files only.
  • Policy-design based, composition through multiple inheritance.
  • No runtime polymorphism.
  • Highly customizable.
  • All controls created using value semantics, i.e. no manual memory allocation.

It is in a very initial stage, the API is highly unstable yet, even my design decisions could change depending on how the implementation goes and whether the emerging requirements will fit in the current design; but it is starting to get shape.

So, please take a look at:

The demo code is in the “demo” folder. The only control available is a button.