Skip to content

Instalación ​

FTXUI requiere un compilador C++17 (GCC ≥ 7, Clang ≥ 5, MSVC ≥ 2017) y tiene cero dependencias externas.

Elige tu configuración ​

CategoríaOpcionesPágina
Sistemas de compilaciónCMake (FetchContent, find_package, submódulo), Bazel (Bzlmod), Meson, compilación manualSistemas de compilación
Gestores de paquetesvcpkg, Conan, xmake, Nix FlakeGestores de paquetes
Distribuciones Linux y cabecera únicaDebian/Ubuntu, Arch Linux, openSUSE, amalgamado (ftxui.hpp / ftxui_all.hpp)Distribuciones y cabecera única

Inicio más rápido (CMake FetchContent) ​

cmake
include(FetchContent)
FetchContent_Declare(ftxui
  GIT_REPOSITORY https://github.com/ArthurSonzogni/FTXUI
  GIT_TAG v7.0.3
)
FetchContent_MakeAvailable(ftxui)

add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE ftxui::component) # transitively links dom & screen

Objetivos de la biblioteca ​

FTXUI se divide en tres objetivos en capas (component → dom → screen), además de un objetivo paraguas (ftxui::ftxui):

ObjetivoPropósito
ftxui::screenBúfer 2D Screen/Surface, Cell, Color, Box, E/S de terminal
ftxui::domÁrbol declarativo de diseño Element (hbox, vbox, border, table, canvas, …)
ftxui::componentWidgets interactivos (Button, Input, Menu, Container, App, …)
ftxui::ftxuiObjetivo paraguas y cabecera <ftxui/ftxui.hpp> que incluye los tres

Próximos pasos ​

  • Primeros pasos: construye una pequeña aplicación interactiva
  • Modelo mental: cómo encajan Elements, Components y el bucle de eventos
  • Ejemplos: demos interactivas en WebAssembly directamente en el navegador