examples/dom/dbox.cpp

    //Copyright2020ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<ftxui/dom/elements.hpp>//fortext,operator|,border,Element,vbox,center,Fit,dbox
    #include<ftxui/screen/screen.hpp>//forFull,Screen
    #include<memory>//forallocator

    #include"ftxui/dom/node.hpp"//forRender
    #include"ftxui/screen/color.hpp"//forftxui

    intmain(){
    usingnamespaceftxui;
    autodocument=dbox({
    vbox({
    text("line_1"),
    text("line_2"),
    text("line_3"),
    text("line_4"),
    text("line_5"),
    })|border,
    text("overlay")|border|center,
    });
    autoscreen=Screen::Create(Dimension::Full(),Dimension::Fit(document));
    Render(screen,document);

    screen.Print();

    return0;
    }