FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
terminal.hpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4#ifndef FTXUI_SCREEN_TERMINAL_HPP
5#define FTXUI_SCREEN_TERMINAL_HPP
6
7namespace ftxui {
8
9/// @brief Dimensions is a structure that represents the size of the terminal
10/// @ingroup screen
11struct Dimensions {
12 int dimx;
13 int dimy;
14};
15
16namespace Terminal {
18void SetFallbackSize(const Dimensions& fallbackSize);
19
20/// @brief Color is an enumeration that represents the color support of the
21/// terminal.
22/// @ingroup screen
30void SetColorSupport(Color color);
31
32/// @brief Quirks is a structure that represents various terminal-specific
33/// behaviors that may require fallbacks.
34/// @ingroup screen
35struct Quirks {
36 /// @brief Whether the terminal font supports the 8 Unicode block characters.
37 bool block_characters = true;
38 /// @brief Whether the terminal correctly handles hiding the cursor.
39 bool cursor_hiding = true;
40 /// @brief Whether the terminal should use ASCII characters for components.
41 bool component_ascii = false;
42 /// @brief The level of color support of the terminal.
44};
46void SetQuirks(const Quirks& quirks);
47
48} // namespace Terminal
49
50} // namespace ftxui
51
52#endif // FTXUI_SCREEN_TERMINAL_HPP
void SetColorSupport(Color color)
Override terminal color support in case auto-detection fails.
Definition terminal.cpp:176
bool cursor_hiding
Whether the terminal correctly handles hiding the cursor.
Definition terminal.hpp:39
bool component_ascii
Whether the terminal should use ASCII characters for components.
Definition terminal.hpp:41
Color color_support
The level of color support of the terminal.
Definition terminal.hpp:43
bool block_characters
Whether the terminal font supports the 8 Unicode block characters.
Definition terminal.hpp:37
Color is a class that represents a color in the terminal user interface.
Definition color.hpp:22
Color
Color is an enumeration that represents the color support of the terminal.
Definition terminal.hpp:23
Quirks GetQuirks()
Get the terminal quirks.
Definition terminal.cpp:183
Dimensions Size()
Get the terminal size.
Definition terminal.cpp:130
Color ColorSupport()
Get the color support of the terminal.
Definition terminal.cpp:166
void SetQuirks(const Quirks &quirks)
Override terminal quirks.
Definition terminal.cpp:193
Dimensions is a structure that represents the size of the terminal.
Definition terminal.hpp:11
Quirks is a structure that represents various terminal-specific behaviors that may require fallbacks.
Definition terminal.hpp:35
The FTXUI ftxui::Terminal:: namespace.
void SetFallbackSize(const Dimensions &fallbackSize)
Override terminal size in case auto-detection fails.
Definition terminal.cpp:160
The FTXUI ftxui:: namespace.
Definition animation.hpp:10