20void Post(std::function<
void()>
f) {
58 if (
event.is_mouse()) {
88 std::function<
void()> on_enter,
93 std::function<
void()> on_enter,
107 if (
event.is_mouse()) {
192 [on_change] { on_change(
true); },
193 [on_change] { on_change(
false); }
It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ft...
virtual Element Render()
Draw the component. Build a ftxui::Element to be drawn on the ftxi::Screen representing this ftxui::C...
virtual bool OnEvent(Event)
Called in response to an event.
static ScreenInteractive * Active()
Return the currently active screen, or null if none.
std::shared_ptr< Node > Element
std::shared_ptr< ComponentBase > Component
Component Hoverable(Component component, bool *hover)
Wrap a component. Gives the ability to know if it is hovered by the mouse.
Component Slider(SliderOption< T > options)
A slider in any direction.
Decorator reflect(Box &box)
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
std::function< Component(Component)> ComponentDecorator
Represent an event. It can be key press event, a terminal resize, or more ...