Module ftxui/screen
Classes & Structs
| Class | Description |
|---|---|
ftxui::Box | |
ftxui::Color | A class representing terminal colors. |
ftxui::ColorInfo | |
ftxui::Dimensions | |
ftxui::Pixel | A unicode character and its associated style. |
ftxui::Screen | A rectangular grid of Pixel. |
ftxui::Screen::Cursor |
Enumerations
Color
enum Color { Palette1, Palette16, Palette256, TrueColor };Examples: component/button_animated, component/button_in_frame, component/button_style, component/canvas_animated, component/flexbox_gallery, component/focus, component/homescreen, component/linear_gradient_gallery, component/maybe, component/menu_entries, component/menu_entries_animated, component/menu_style (+17 more)
WordBreakProperty
enum WordBreakProperty { ALetter, CR, Double_Quote, Extend, ExtendNumLet, Format, Hebrew_Letter, Katakana, LF, MidLetter, MidNum, MidNumLet, Newline, Numeric, Regional_Indicator, Single_Quote, WSegSpace, ZWJ };Functions
| Symbol | Description |
|---|---|
Contain | Returns: whether (x,y) is contained inside the box. |
Intersection | Returns: the biggest Box contained in both a and b. |
operator!= | Returns: whether other and this are different. |
operator== | Returns: whether other is the same as this |
Union | Returns: the smallest Box containing both a and b. |
Color | Build a transparent color. |
HSV | Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV. |
RGB | Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model. |
operator""_rgb | Creates a color from a combined hex RGB representation, e.g. 0x808000_rgb. |
SetFallbackSize | Override terminal size in case auto-detection fails. |
to_string | Convert a UTF8 std::string into a std::wstring. |
to_wstring | Convert a std::wstring into a UTF8 std::string. |
Contain
bool Contain(int x, int y) const;Returns: whether (x,y) is contained inside the box.
Intersection
static Box Intersection(Box a, Box b);Returns: the biggest Box contained in both a and b.
operator!=
bool operator!=(const Box & other) const;Returns: whether other and this are different.
operator==
bool operator==(const Box & other) const;Returns: whether other is the same as this
Union
Returns: the smallest Box containing both a and b.
Color
Color();Build a transparent color.
Examples: component/button_animated, component/button_in_frame, component/button_style, component/canvas_animated, component/flexbox_gallery, component/focus, component/homescreen, component/linear_gradient_gallery, component/maybe, component/menu_entries, component/menu_entries_animated, component/menu_style (+17 more)
Color
Build a transparent color.
Examples: component/button_animated, component/button_in_frame, component/button_style, component/canvas_animated, component/flexbox_gallery, component/focus, component/homescreen, component/linear_gradient_gallery, component/maybe, component/menu_entries, component/menu_entries_animated, component/menu_style (+17 more)
Color
Build a transparent using Palette16 colors.
Examples: component/button_animated, component/button_in_frame, component/button_style, component/canvas_animated, component/flexbox_gallery, component/focus, component/homescreen, component/linear_gradient_gallery, component/maybe, component/menu_entries, component/menu_entries_animated, component/menu_style (+17 more)
Color
Color(Palette256 index);Build a transparent using Palette256 colors.
Examples: component/button_animated, component/button_in_frame, component/button_style, component/canvas_animated, component/flexbox_gallery, component/focus, component/homescreen, component/linear_gradient_gallery, component/maybe, component/menu_entries, component/menu_entries_animated, component/menu_style (+17 more)
Color
Color(uint8_t red, uint8_t green, uint8_t blue);Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model.
Parameters:
red: The quantity of red [0,255]green: The quantity of green [0,255]blue: The quantity of blue [0,255]
Examples: component/button_animated, component/button_in_frame, component/button_style, component/canvas_animated, component/flexbox_gallery, component/focus, component/homescreen, component/linear_gradient_gallery, component/maybe, component/menu_entries, component/menu_entries_animated, component/menu_style (+17 more)
HSV
Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV.
Parameters:
h: The hue of the color [0,255]s: The "colorfulness" [0,255].v: The "Lightness" [0,255]
Examples: component/flexbox_gallery, component/focus, component/homescreen, dom/color_gallery, dom/color_truecolor_HSV
RGB
Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model.
Parameters:
red: The quantity of red [0,255]green: The quantity of green [0,255]blue: The quantity of blue [0,255]
Examples: component/slider_rgb, dom/color_truecolor_RGB
operator""_rgb
Color operator""_rgb(unsigned long long int combined);Creates a color from a combined hex RGB representation, e.g. 0x808000_rgb.
SetFallbackSize
void SetFallbackSize(const Dimensions & fallbackSize);Override terminal size in case auto-detection fails.
Parameters:
fallbackSize: Terminal dimensions to fallback to
to_string
std::string to_string(const std::wstring & s);Convert a UTF8 std::string into a std::wstring.
Examples: component/button, component/button_animated, component/button_in_frame, component/button_style, component/checkbox, component/checkbox_in_frame, component/composition, component/custom_loop, component/flexbox_gallery, component/focus, component/homescreen, component/linear_gradient_gallery (+16 more)
to_wstring
std::wstring to_wstring(const std::string & s);Convert a std::wstring into a UTF8 std::string.