LibCXX Widget Toolkit

Index

Introduction
Status
Installation, and requirements

Introduction

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:

  • This is 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.

  • LibCXXW shows a clean modern look with classical, traditional UI widgets drawn with a subtle, non-intrusive 3D effect from mild gradient shading. 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...

  • LibCXXW implements natural support for bi-directional text input (← and → keys don't switch direction in the middle of right-to-left text, for example).

  • It's possible to create widgets using an XML stylesheet that supports the majority of the C++ library API; then adjust the widgets' visual appearance 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.

  • LibCXXW does not force the application to use an event-driven design. unlike other widget toolkits. The library's internal execution thread handles 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 blocked).

  • LibCXXW's installation configuration solves common ABI issues with C++based libraries. It's possible to run, and build code that uses multiple versions of LibCXXW.

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

Status

LibCXX Widget Toolkit's core functionality is complete, and is available for downloading. Changes in the most recent version.