mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 18:48:11 +08:00 
			
		
		
		
	 a8eda59d98
			
		
	
	a8eda59d98
	
	
		
			
	
		
	
	
		
			Some checks are pending
		
		
	
	Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (cl, cl, windows-latest) (push) Waiting to run
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (clang, clang++, macos-latest) (push) Waiting to run
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (clang, clang++, ubuntu-latest) (push) Waiting to run
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (gcc, g++, macos-latest) (push) Waiting to run
				
			Build / Bazel, ${{ matrix.cxx }}, ${{ matrix.os }} (gcc, g++, ubuntu-latest) (push) Waiting to run
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (cl, Windows MSVC, windows-latest) (push) Waiting to run
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (gcc, Linux GCC, ubuntu-latest) (push) Waiting to run
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, Linux Clang, ubuntu-latest) (push) Waiting to run
				
			Build / CMake, ${{ matrix.compiler }}, ${{ matrix.os }} (llvm, llvm-cov gcov, MacOS clang, macos-latest) (push) Waiting to run
				
			Documentation / documentation (push) Waiting to run
				
			
		
			
				
	
	
	
		
			2.8 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.8 KiB
		
	
	
	
	
	
	
	
@mainpage Introduction @tableofcontents
FTXUI is simple cross-platform C++ library for terminal based user interfaces!
Feature
- Functional style. Inspired by 1 and React
- No dependencies
- Cross platform.
- Simple and elegant syntax (in my opinion)
- Keyboard & mouse navigation.
- Support for UTF8 and fullwidth 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 <ftxui/dom/elements.hpp>
#include <ftxui/screen/screen.hpp>
#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();
}
Expected output:
┌────┐┌────────────────────────────────────┐┌─────┐
│left││middle                              ││right│
└────┘└────────────────────────────────────┘└─────┘
Supported Platforms
- Linux
- MacOS
- Windows
- WebAssembly
| Next | 
|---|
| Getting Started | 
@defgroup screen ftxui/screen
Please check the tutorial of the ftxui/screen module.
@defgroup dom ftxui/dom
Please check the tutorial of the ftxui/dom module.
@defgroup component ftxui/component
Please check the tutorial of the ftxui/component
module.