17class SelectionStyleReset :
public NodeDecorator {
23 screen.SetSelectionStyle([](Pixel&) {});
29class SelectionStyle :
public NodeDecorator {
45 std::function<
void(Pixel&)> style_;
54 return std::make_shared<SelectionStyleReset>(std::move(
child));
61 pixel.background_color = foreground;
69 pixel.foreground_color = foreground;
85 return std::make_shared<SelectionStyle>(std::move(
child),
style);
A class representing terminal colors.
virtual void Render(Screen &screen)
Display an element on a ftxui::Screen.
std::function< Element(Element)> Decorator
std::shared_ptr< Node > Element
std::shared_ptr< T > Make(Args &&... args)
Decorator selectionStyle(std::function< void(Pixel &)> style)
Set the style of an element when selected.
Decorator selectionForegroundColor(Color foreground)
Set the foreground color of an element when selected. Note that the style is applied on top of the ex...
Decorator selectionBackgroundColor(Color foreground)
Set the background color of an element when selected. Note that the style is applied on top of the ex...
Decorator selectionColor(Color foreground)
Set the color of an element when selected.
Element selectionStyleReset(Element)
Reset the selection style of an element.
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
A Unicode character and its associated style.