FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
ftxui::Terminal Namespace Reference

Enumerations

enum  Color {
  Palette1 ,
  Palette16 ,
  Palette256 ,
  TrueColor
}
 Color is an enumeration that represents the color support of the terminal. More...
 

Functions

 FTXUI_EXPORT (SCREEN) Quirks
 Quirks is a structure that represents various terminal-specific behaviors that may require fallbacks.
 
 FTXUI_EXPORT (SCREEN) void SetFallbackSize(const Dimensions &fallbackSize)
 
Color ComputeColorSupport (std::string_view term, std::string_view colorterm, std::string_view term_program, std::string_view terminal_name, std::string_view terminal_emulator_name, const std::vector< int > &capabilities)
 Compute the color support based on environment variables and terminal identification.
 
Dimensions Size ()
 Get the terminal size.
 
void SetFallbackSize (const Dimensions &fallbackSize)
 Override terminal size in case auto-detection fails.
 
Color ColorSupport ()
 Get the color support of the terminal.
 
void SetColorSupport (Color color)
 Override terminal color support in case auto-detection fails.
 
Quirks GetQuirks ()
 Get the terminal quirks.
 
void SetQuirks (const Quirks &quirks)
 Override terminal quirks.
 

Function Documentation

◆ FTXUI_EXPORT()

FTXUI_EXPORT ( SCREEN ) const &

◆ ComputeColorSupport()

Color ComputeColorSupport ( std::string_view term,
std::string_view colorterm,
std::string_view term_program,
std::string_view terminal_name,
std::string_view terminal_emulator_name,
const std::vector< int > & capabilities )

Compute the color support based on environment variables and terminal identification.

Parameters
termThe TERM environment variable.
colortermThe COLORTERM environment variable.
term_programThe TERM_PROGRAM environment variable.
terminal_nameThe terminal name (from DA2).
terminal_emulator_nameThe terminal emulator name (from XTVERSION).
capabilitiesThe terminal capabilities (from DA1).

Definition at line 191 of file terminal.cpp.

◆ SetFallbackSize()

void SetFallbackSize ( const Dimensions & fallbackSize)

Override terminal size in case auto-detection fails.

Parameters
fallbackSizeTerminal dimensions to fallback to

Definition at line 294 of file terminal.cpp.