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

Demo image

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

機能

  • 関数型スタイル。1React に触発されています。
  • 依存関係なし
  • **クロスプラットフォーム**。
  • シンプルでエレガントな構文(私の意見では)
  • キーボードとマウスのナビゲーション。
  • 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();
}
Element border(Element child)
要素の周囲にボーダーを描画します。
FTXUI ftxui:: 名前空間
Definition animation.hpp:9
std::shared_ptr< Node > Element
Definition elements.hpp:21

期待される出力:

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

対応プラットフォーム

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