26 :
entries_(entries), selected_(selected) {
It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ft...
virtual bool OnEvent(Event)
Called in response to an event.
An adapter. Reference a list of strings.
Component Vertical(Components children)
A list of components, drawn one by one vertically and navigated vertically using up/down arrow key or...
constexpr const T & clamp(const T &v, const T &lo, const T &hi)
Element vscroll_indicator(Element)
Add a filter that will invert the foreground and the background colors.
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
Component Maybe(Component, const bool *show)
Decorate a component |child|. It is shown only when |show| is true.
Component Checkbox(CheckboxOption options)
std::shared_ptr< Node > Element
std::shared_ptr< ComponentBase > Component
Element bold(Element)
Use a bold font, for elements with more emphasis.
Component Radiobox(RadioboxOption options)
A list of element, where only one can be selected.
Element hbox(Elements)
A container displaying elements horizontally one by one.
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.
Component Dropdown(ConstStringListRef entries, int *selected)
A dropdown menu.
Component Slider(SliderOption< T > options)
A slider in any direction.
Element separator()
Draw a vertical or horizontal separation in between two other elements.
Element filler()
An element that will take expand proportionnally to the space left in a container.
Element frame(Element)
Allow an element to be displayed inside a 'virtual' area. It size can be larger than its container....
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
Element border(Element)
Draw a border around the element.
Element vbox(Elements)
A container displaying elements vertically one by one.
arguments for |ButtonOption::transform|, |CheckboxOption::transform|, |Radiobox::transform|,...
Option for the Checkbox component.
std::function< Element(const EntryState &)> transform
Represent an event. It can be key press event, a terminal resize, or more ...