22 return text(
"RGB = (" +
23 std::to_string(red) +
"," +
24 std::to_string(green) +
"," +
25 std::to_string(blue) +
")"
33 auto slider_red =
Slider(
"Red :", &red, 0, 255, 1);
34 auto slider_green =
Slider(
"Green:", &green, 0, 255, 1);
35 auto slider_blue =
Slider(
"Blue :", &blue, 0, 255, 1);
43 auto renderer =
Renderer(container, [&] {
60 screen.Loop(renderer);
static ScreenInteractive TerminalOutput()
Component Renderer(Component child, std::function< Element()>)
Return a new Component, similar to |child|, but using |render| as the Component::Render() event.
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
virtual void Render(Screen &screen)
Display an element on a ftxui::Screen.
Decorator bgcolor(Color)
Decorate using a background color.
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
Element text(std::wstring text)
Display a piece of unicode text.
Element separator()
Draw a vertical or horizontal separation in between two other elements.
Element vbox(Elements)
A container displaying elements vertically one by one.
static Color RGB(uint8_t red, uint8_t green, uint8_t blue)
Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model.
The FTXUI ftxui:: namespace.
std::shared_ptr< Node > Element
Element hbox(Elements)
A container displaying elements horizontally one by one.
Component Slider(SliderOption< T > options)
A slider in any direction.
Element ColorTile(int red, int green, int blue)
Element ColorString(int red, int green, int blue)