Skip to content

インストール ​

FTXUI は C++17 対応コンパイラ(GCC ≥ 7、Clang ≥ 5、MSVC ≥ 2017)を必要とし、外部依存はゼロです。

セットアップ方法を選ぶ ​

カテゴリ選択肢ページ
ビルドシステムCMake (FetchContent, find_package, submodule), Bazel (Bzlmod), Meson, 手動ビルドビルドシステム
パッケージマネージャvcpkg, Conan, xmake, Nix Flakeパッケージマネージャ
Linux ディストロ & シングルヘッダDebian/Ubuntu, Arch Linux, openSUSE, 統合配布 (ftxui.hpp / ftxui_all.hpp)ディストロ & シングルヘッダ

最速セットアップ (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

ライブラリターゲット ​

FTXUI は3つの階層ターゲット(component → dom → screen)と、それらをまとめたアンブレラターゲット(ftxui::ftxui)で構成されています。

ターゲット役割
ftxui::screen2D の Screen/Surface バッファ、Cell、Color、Box、ターミナル I/O
ftxui::dom宣言的な Element レイアウトツリー(hbox, vbox, border, table, canvas, …)
ftxui::componentインタラクティブなウィジェット(Button, Input, Menu, Container, App, …)
ftxui::ftxui上記3つをすべて含むアンブレラターゲットおよび <ftxui/ftxui.hpp> ヘッダ

次のステップ ​