modal.cpp
ftxui/component/event.hpp
ftxui/dom/elements.hpp
memory
utility
ftxui/component/component.hpp
ftxui/component/component_base.hpp
ftxui/component/animation.hpp
ftxui/component/captured_mouse.hpp
ftxui/component/component.hpp
ftxui/component/component_base.hpp
ftxui/component/component_options.hpp
ftxui/component/event.hpp
ftxui/component/mouse.hpp
ftxui/dom/canvas.hpp
ftxui/dom/deprecated.hpp
ftxui/dom/direction.hpp
ftxui/dom/elements.hpp
ftxui/dom/flexbox_config.hpp
ftxui/dom/linear_gradient.hpp
ftxui/dom/node.hpp
ftxui/dom/requirement.hpp
ftxui/dom/selection.hpp
ftxui/screen/box.hpp
ftxui/screen/color.hpp
ftxui/screen/image.hpp
ftxui/screen/pixel.hpp
ftxui/screen/screen.hpp
ftxui/screen/string.hpp
ftxui/screen/terminal.hpp
ftxui/util/autoreset.hpp
ftxui/util/ref.hpp
src/ftxui/component/modal.cpp
chrono
cstddef
cstdint
ftxui/dom/take_any_args.hpp
functional
memory
optional
sstream
string
unordered_map
utility
variant
vector
ftxui

    //Copyright2022ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<ftxui/component/event.hpp>//forEvent
    #include<ftxui/dom/elements.hpp>//foroperator|,Element,center,clear_under,dbox
    #include<memory>//for__shared_ptr_access,shared_ptr
    #include<utility>//formove

    #include"ftxui/component/component.hpp"//forMake,Tab,ComponentDecorator,Modal
    #include"ftxui/component/component_base.hpp"//forComponent,ComponentBase

    namespaceftxui{

    //Adda|modal|windowontopofthe|main|component.Itisshownoneonthe
    //topoftheotherwhen|show_modal|istrue.
    ///@ingroupcomponent
    //NOLINTNEXTLINE
    ComponentModal(Componentmain,Componentmodal,constbool*show_modal){
    classImpl:publicComponentBase{
    public:
    explicitImpl(Componentmain,Componentmodal,constbool*show_modal)
    :main_(std::move(main)),
    modal_(std::move(modal)),
    show_modal_(show_modal){
    Add(Container::Tab({main_,modal_},&selector_));
    }

    private:
    ElementOnRender()override{
    selector_=*show_modal_;
    autodocument=main_->Render();
    if(*show_modal_){
    document=dbox({
    document,
    modal_->Render()|clear_under|center,
    });
    }
    returndocument;
    }

    boolOnEvent(Eventevent)override{
    selector_=*show_modal_;
    returnComponentBase::OnEvent(event);
    }

    Componentmain_;
    Componentmodal_;
    constbool*show_modal_;
    intselector_=*show_modal_;
    };
    returnMake<Impl>(main,modal,show_modal);
    }

    //Decorateacomponent.Adda|modal|windowontopofit.Itisshownoneon
    //thetopoftheotherwhen|show_modal|istrue.
    ///@ingroupcomponent
    //NOLINTNEXTLINE
    ComponentDecoratorModal(Componentmodal,constbool*show_modal){
    return[modal,show_modal](Componentmain){
    returnModal(std::move(main),modal,show_modal);
    };
    }

    }//namespaceftxui