collapsible.cpp
functional
utility
ftxui/component/component.hpp
ftxui/component/component_base.hpp
ftxui/component/component_options.hpp
ftxui/dom/elements.hpp
ftxui/util/ref.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/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/collapsible.cpp
chrono
cstddef
cstdint
ftxui/dom/take_any_args.hpp
functional
memory
optional
sstream
string
unordered_map
utility
variant
vector
ftxui

    //Copyright2021ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<functional>//forfunction
    #include<utility>//formove

    #include"ftxui/component/component.hpp"//forCheckbox,Maybe,Make,Vertical,Collapsible
    #include"ftxui/component/component_base.hpp"//forComponent,ComponentBase
    #include"ftxui/component/component_options.hpp"//forCheckboxOption,EntryState
    #include"ftxui/dom/elements.hpp"//foroperator|=,text,hbox,Element,bold,inverted
    #include"ftxui/util/ref.hpp"//forRef,ConstStringRef

    namespaceftxui{

    ///@briefAcollapsiblecomponent.Itdisplayacheckboxwithanarrow.Once
    ///activated,thechildrenisdisplayed.
    ///@paramlabelThelabelofthecheckbox.
    ///@paramchildThechildrentodisplay.
    ///@paramshowHoldthestateaboutwhetherthechildrenisdisplayedornot.
    ///
    ///###Example
    ///```cpp
    ///autocomponent=Collapsible("Showdetails",details);
    ///```
    ///
    ///###Output
    ///```
    ///
    ///▼Showdetails
    ///<detailscomponent>
    /// ```
    //NOLINTNEXTLINE
    ComponentCollapsible(ConstStringReflabel,Componentchild,Ref<bool>show){
    classImpl:publicComponentBase{
    public:
    Impl(ConstStringReflabel,Componentchild,Ref<bool>show):show_(show){
    CheckboxOptionopt;
    opt.transform=[](EntryStates){//NOLINT
    autoprefix=text(s.state?"▼":"▶");//NOLINT
    autot=text(s.label);
    if(s.active){
    t|=bold;
    }
    if(s.focused){
    t|=inverted;
    }
    returnhbox({prefix,t});
    };
    Add(Container::Vertical({
    Checkbox(std::move(label),show_.operator->(),opt),
    Maybe(std::move(child),show_.operator->()),
    }));
    }
    Ref<bool>show_;
    };

    returnMake<Impl>(std::move(label),std::move(child),show);
    }

    }//namespaceftxui