FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
はじめに

Demo image

FTXUI は、ターミナルベースのユーザーインターフェースのためのシンプルでクロスプラットフォームなC++ライブラリです!

特徴

  • 関数型スタイル。以下から着想を得ています 1 およびReact
  • 依存関係なし
  • **クロスプラットフォーム**。
  • シンプルでエレガントな構文(私見では)
  • キーボード&マウスによるナビゲーション。
  • UTF8と全角文字のサポート (→ 测试)
  • アニメーションのサポート。デモ1、デモ2
  • 描画のサポート。デモ
  • インストールとはじめにガイドで学べます。
  • 複数のビルドシステムとパッケージ:
  • 良い実践: ドキュメント、テスト、ファザー、パフォーマンステスト、自動化されたCI、自動化されたパッケージング、など...

例

#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();
}
FTXUI ftxui::名前空間
Definition animation.hpp:11
std::shared_ptr< Node > Element
Definition elements.hpp:25

期待される出力:

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

サポートされているプラットフォーム

  • Linux
  • MacOS
  • Windows
  • WebAssembly
次へ
入門