Movatterモバイル変換


[0]ホーム

URL:


FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
Introduction

Table of Contents

Demo image

FTXUI is simple cross-platform C++ library for terminal based user interfaces!

Feature

  • Functional style. Inspired by1 andReact
  • No dependencies
  • Cross platform.
  • Simple and elegant syntax (in my opinion)
  • Keyboard & mouse navigation.
  • Support forUTF8 andfullwidth chars (→ 测试)
  • Support for animations.Demo 1,Demo 2
  • Support for drawing.Demo
  • Learn by examples, and tutorials
  • Multiple build system and packages:
  • Good practices: documentation, tests, fuzzers, performance tests, automated CI, automated packaging, etc...

Example

#include <iostream>
intmain() {
using namespaceftxui;
// 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();
}
The FTXUI ftxui:: namespace.
std::shared_ptr< Node > Element
Definitionelements.hpp:22

Expected output:

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

Supported Platforms

  • Linux
  • MacOS
  • Windows
  • WebAssembly
Next
Getting Started

[8]ページ先頭

©2009-2025 Movatter.jp