FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
Introducción

Imagen de demostración

FTXUI es una sencilla biblioteca C++ multiplataforma para interfaces de usuario basadas en terminal.

Características

  • Estilo funcional. Inspirado en 1 y React
  • Sin dependencias
  • Multiplataforma.
  • Sintaxis simple y elegante (en mi opinión)
  • Navegación con teclado y mouse.
  • Compatible con UTF8 y caracteres de ancho completo (→ 测试)
  • Compatible con animaciones. Demo 1, Demo 2
  • Compatible con dibujo. Demo
  • Aprenda con la guía de instalación y de primeros pasos.
  • Múltiples sistemas de compilación y paquetes:
  • Buenas prácticas: documentación, pruebas, fuzzers, pruebas de rendimiento, CI automatizado, empaquetado automatizado, etc...

Ejemplo

#include <iostream>
int main() {
using namespace ftxui;
// Create a simple document with three text elements.
Element document = hbox({
text("left") | border,
text("middle") | border | flex,
text("right") | border,
});
// Create a screen with full width and height fitting the document.
auto screen = Screen::Create(
Dimension::Full(), // Width
Dimension::Fit(document) // Height
);
// Render the document onto the screen.
Render(screen, document);
// Print the screen to the console.
screen.Print();
}
El espacio de nombres ftxui:: de FTXUI.
Definition animation.hpp:11
std::shared_ptr< Node > Element
Definition elements.hpp:25

Salida esperada:

┌────┐┌────────────────────────────────────┐┌─────┐
│left││middle ││right│
└────┘└────────────────────────────────────┘└─────┘

Plataformas soportadas

  • Linux
  • MacOS
  • Windows
  • WebAssembly
Siguiente
Primeros pasos