23 state.label = (state.active ?
"> " :
" ") + state.label;
71 hbox(
text(
"selected = "),
text(std::to_string(selected))),
78 screen.Loop(renderer);
80 std::cout <<
"Selected element = " << selected << std::endl;
static ScreenInteractive TerminalOutput()
std::function< Element(const EntryState &state)> transform
Component MenuEntry(MenuEntryOption options)
A specific menu entry. They can be put into a Container::Vertical to form a menu.
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 size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
Element bold(Element)
Use a bold font, for elements with more emphasis.
Element inverted(Element)
Add a filter that will invert the foreground and the background colors.
Element text(std::wstring text)
Display a piece of unicode text.
Element separator()
Draw a vertical or horizontal separation in between two other elements.
Decorator color(Color)
Decorate using a foreground color.
Element vbox(Elements)
A container displaying elements vertically one by one.
Color is a class that represents a color in the terminal user interface.
The FTXUI ftxui:: namespace.
std::shared_ptr< Node > Element
Element hbox(Elements)
A container displaying elements horizontally one by one.
arguments for transform from |ButtonOption|, |CheckboxOption|, |RadioboxOption|, |MenuEntryOption|,...