reflect.cpp
memory
utility
ftxui/dom/elements.hpp
ftxui/dom/node.hpp
ftxui/dom/requirement.hpp
ftxui/screen/box.hpp
ftxui/screen/screen.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/dom/reflect.cpp
cstddef
cstdint
ftxui/dom/take_any_args.hpp
functional
memory
optional
sstream
string
unordered_map
utility
variant
vector
ftxui

    //Copyright2020ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<memory>//formake_shared,__shared_ptr_access
    #include<utility>//formove

    #include"ftxui/dom/elements.hpp"//forElement,unpack,Decorator,reflect
    #include"ftxui/dom/node.hpp"//forNode,Elements
    #include"ftxui/dom/requirement.hpp"//forRequirement
    #include"ftxui/screen/box.hpp"//forBox
    #include"ftxui/screen/screen.hpp"//forScreen

    namespaceftxui{
    namespace{

    //Helperclass.
    classReflect:publicNode{
    public:
    Reflect(Elementchild,Box&box)
    :Node(unpack(std::move(child))),reflected_box_(box){}

    voidComputeRequirement()final{
    Node::ComputeRequirement();
    requirement_=children_[0]->requirement();
    }

    voidSetBox(Boxbox)final{
    reflected_box_=box;
    Node::SetBox(box);
    children_[0]->SetBox(box);
    }

    voidRender(Screen&screen)final{
    reflected_box_=Box::Intersection(screen.stencil,reflected_box_);
    Node::Render(screen);
    }

    private:
    Box&reflected_box_;
    };
    }//namespace

    Decoratorreflect(Box&box){
    return[&](Elementchild)->Element{
    returnstd::make_shared<Reflect>(std::move(child),box);
    };
    }

    }//namespaceftxui