Skip to content

SkUI wiki

Ruben Van Boxem edited this page Nov 20, 2016 · 3 revisions

The project

SkUI is a C++ programming framework based on C++17 (and the Filesystem TS). It leverages the Skia library (known from other large projects such as Android, Chromium, and Firefox) to draw its UI. Think Qt on steroids without the precompilation steps or legacy baggage.

SkUI is currently in an incubation phase. Nothing is finished, and most of the work is going into the fundamental building blocks that enable a simple yet elegant programming framework. Focus lies on mimicking Qt's good ideas while ensuring nothing in the Standard Library is left behind.

Components

Core

skui::core contains basic functionality that one can use even without a UI. It contains lifetime-tracking signals, change-signalling properties, application abstraction, shared library abstraction, etc.

Heavily WIP, but has finished features.

Finished*

  • Signals: skui::core::signal
  • Properties: skui::core::property is a simple value wrapper that uses a changed signal to broadcast any value changes it undergoes (through assignment only, tracking member function call changes is virtually impossible and out of scope for this class).
  • Shared library abstraction: skia::core::library abstracts dlopen/dlsym/dlclose and LoadLibrary/GetProcAddress/FreeLibrary` in simple, convenience wrapper that also takes care of some platform naming conventions.
  • Application abstraction: skui::core::application provides cross-platform commandline argument handling, an exit function, event loop starting, etc.

Missing features

  • A good Unicode-aware string: efficient, flexible, correct, perhaps platform-native.
  • Threading concepts, including multi-threaded signal connections (e.g. for application UI updates, which should be run in the "main thread" on most OSes).
  • ...

Graphics

skui::graphics is the lowest level of drawing abstraction in SkUI. Currently, it is a thin wrapper around Skia, so that SkUI doesn't lock itself into working only with Skia and other backends are possible.

Work hans't started on this component.

UI

skui::ui contains everything from the "window" (if such a thing exists on the platform) to the flashing buttons on your form.

Heavily WIP.

Networking

skui::network will contain networking abstraction. Currently, it seems like the Boost-less ASIO library is the proper way to handle this.

Work hasn't started on this component.

Design notes

To Boost or not to Boost

If SkUI is to leverage the full power of C++17, why not include Boost and gain access to a plethora of features? Boost is a good candidate to fill up many gaps in the SkUI Core, save for one requirement: simplicity. The assumed complexity of the Boost library isn't the main reason the choice to not use Boost, but due to the sheer size and the resulting compilation speed, Boost will not be used in SkUI unless there is a very good reason to do so. In the event Boost will be used in SkUI, it will be as a build-time dependency only, i.e. nothing of Boost can leak out of the interface.

The choice of Skia vs other graphics library

Skia, at the time of project conception, was the only library that fullfilled the cross-platform graphics promise, along with the guarantee that it will be developed for the coming years, due to the solid backing and integration by Google/Mozilla. nanovg was another library that might provide the necessary groundwork, and might be easier to handle, though it's lacking in features with respect to Skia. Suggestions welcome. The closer to the bare metal, the better, I suppose.


* Finished means works as developed against the unit test accompanying the feature. Any other behaviour may or may not work out of the box. Finished does not mean "API-stable" or "feature-complete".