LibCXX Windows Library

Index

Introduction
Installation, and requirements
LibCXX overview
References
The connection thread

Introduction

LibCXXW is an optional add-on library to LibCXX that implements a basic X user interface toolkit with a modern C++17 API and without any dependencies on large Gnome (GTK) or QT libraries. The only dependencies are toolkit-independent libraries that are not tied to any particular desktop environment. See the section called “Installation, and requirements” for more information. LibCXXW aims to make it possible to quickly implement a simple, basic, no-frills X user interface in C++. Notable features:

  • Uses modern C++17 language features: lambdas handle events like mose button clicks and other user activity; overloaded, variadic-parameter methods offering alternative means of configuring various display elements; and other C++17 features.

  • Implements basic, traditional UI elements: labels, text input fields, lists, combo boxes, menus, and dialogs. The UI elements support basic theming, including scaling -- adjusting the scaled size of the UI.

    The default UI elements are scalable, using a library-specific scalable graphic format. Alternatively, an application may load its own GIF, PNG, or JPG fixed-size images.

  • All display elements have full keyboard navigation, where possible. Even scrollbars have keyboard-based navigation.

  • Unlike other high-level toolkits, LibCXX Windows Library does not require the application to use an event-driven design. LibCXX Windows Library run an internal execution thread that handles all X events. The main application thread can be working on a dedicated, long-running task that blocks all pointer and keyboard events, but the background thread continues to update the display elements, and process X events as needed, all by itself.

  • All display elements are LibCXX's reference-counted objects (based on smart pointers). There are no explicit methods to destroy input fields, buttons, and other display elements. Each display element is a reference-counted object, with containers holding references to the elements in the container. Removing an element from the container results in the last reference to the object going out of scope, which destroyes it. This results in the corresponding display element getting destroyed.

  • LibCXX Windows Library is a compositing toolkit. The underlying video hardware must implement the X RENDER extension. This should supported by all modern video hardware.

  • Anti-aliased fonts get rendered by the Freetype library.

LibCXX Windows Library is free software, distributed under the terms of the GPL, version 3.