22 : main_(std::move(
main)),
23 modal_(std::move(modal)),
24 show_modal_(show_modal) {
25 Add(Container::Tab({main_, modal_}, &selector_));
30 selector_ = *show_modal_;
31 auto document = main_->Render();
41 bool OnEvent(
Event event)
override {
42 selector_ = *show_modal_;
43 return ComponentBase::OnEvent(event);
48 const bool* show_modal_;
49 int selector_ = *show_modal_;
51 return Make<Impl>(
main, modal, show_modal);
60 return Modal(std::move(
main), modal, show_modal);
It implement rendering itself as ftxui::Element. It implement keyboard navigation by responding to ft...
Component Modal(Component main, Component modal, const bool *show_modal)
Represent an event. It can be key press event, a terminal resize, or more ...
Element clear_under(Element element)
Before drawing |child|, clear the pixels below. This is useful in combination with dbox.
Element center(Element)
Center an element horizontally and vertically.
Element dbox(Elements)
Stack several element on top of each other.
The FTXUI ftxui:: namespace.
std::shared_ptr< Node > Element
std::shared_ptr< ComponentBase > Component
std::function< Component(Component)> ComponentDecorator