LibCXX Widget Toolkit


Installation, and requirements


LibCXXW is an optional add-on library to LibCXX that implements an X widget toolkit with a modern C++20 API. LibCXXW aims to make it possible to implement a basic, no-frills X user interface in modern C++. This short demo gives a brief overview of LibCXXW's X widget toolkit implementation:

LibCXXW's notable features:

  • An independent X widget toolkit stack, from the ground up. The only dependencies are low-level libraries that are not tied to any particular desktop environment. See the section called “Installation, and requirements” for more information.

  • Combines a clean modern look with classical, traditional UI widgets. Mild gradient shading provides a subtle, non-intrusive 3D effect. Traditional UI widgets include labels, checkboxes, radio buttons, input fields, lists, combo-boxes, menus, and dialogs — updated to modern UI standards: confirming the last character typed into a password field before masking it, predictive selection of combo-box entries, spin buttons for numerical input fields, etc...

  • Create widgets from an XML stylesheet that supports the majority of the C++ library API. Adjust the visual appearance of widgets simply by editing the stylesheet, without recompiling the code.

  • All widgets have full keyboard navigation, where possible. No explicit application support is needed. Even scroll-bars have keyboard controls.

  • Takes full advantage of modern C++20 language features. Lambdas handle UI events (button clicks, menu selections, and other activity). Variant types provide compact means for selecting alternative options. Concepts and constraints assist the compiler with issuing clear diagnostics. All widgets are reference-counted objects.

  • Fully scalable and themeable widgets use a library-specific scalable graphic format, to fractionally scale the widgets to a targeted size.

  • Unlike other widget toolkits, LibCXX Widget Toolkit does not force the application to use an event-driven design. LibCXXW uses an internal execution thread to handle X protocol events. The application's UI remains responsive to X events, while the main application runs a long-running task (with all pointer and button activity suspended).

  • LibCXXW's build scripts allow running, and developing with multiple versions of the library concurrently. It's possible to install different LibCXXW versions for applications that use different ABIs, solving this common problem with using large C++ libraries.

LibCXX Widget Toolkit is free software, distributed under the terms of the GPL, version 3.


LibCXX Widget Toolkit's core functionality is complete, and is available for downloading. The most recent build of LibCXX Widget Toolkit adds an initial implementation of the cxxwcreator tool, adds alpha channel support to the color picker widget, and optimizes window refreshes and redrawing.