|
FTXUI 6.1.9
C++ functional terminal UI.
|
FTXUI experimentally supports C++20 modules to reduce compilation times and improve code organization. Each part of the library has a corresponding module, split into partitions per each header.
Use the FTXUI_BUILD_MODULES option to build the FTXUI project itself to provide C++20 modules, for example with CMake and Ninja:
Then, in your own code you can consume the modules and code as normal:
Writing import ftxui; is equivalent to including all <ftxui/**/*.hpp> headers, and provides the entire library through the singular module.
To properly find and link the modules with CMake, use target_link_libraries to get the right compiler, linker, etc. flags.
While import ftxui; provides the entire library, FTXUI is designed in layers. If you only need specific functionalities, you can import the independent modules directly:
ftxui (Convenience module that re-exports all of the below)ftxui.component (Interactive components, events, and event loops)ftxui.dom (Layout and styling via Elements)ftxui.screen (Terminal rendering, pixels, and colors)ftxui.util (Internal utilities)For example: