examples/dom/border_colored.cpp

    //Copyright2020ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<ftxui/dom/elements.hpp>//foroperator|,text,Element,Fit,borderDouble,borderHeavy,borderLight,borderRounded,vbox
    #include<ftxui/screen/screen.hpp>//forScreen
    #include<iostream>//forendl,cout,ostream
    #include<memory>//forallocator

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

    intmain(){
    usingnamespaceftxui;

    automake_boxed=[]{
    returnvbox({
    text("borderLight")|borderStyled(LIGHT,Color::Red),
    text("borderDashed")|borderStyled(DASHED,Color::Green),
    text("borderHeavy")|borderStyled(HEAVY,Color::Blue),
    text("borderDouble")|borderStyled(DOUBLE,Color::Yellow),
    text("borderRounded")|borderStyled(ROUNDED,Color::Cyan),
    });
    };

    autodocument=hbox({
    make_boxed(),
    separator()|color(Color::Red),
    make_boxed(),
    separator()|color(Color::Red),
    make_boxed(),
    })|
    borderStyled(ROUNDED,Color::Red);

    autoscreen=
    Screen::Create(Dimension::Fit(document),Dimension::Fit(document));
    Render(screen,document);
    screen.Print();
    std::cout<<std::endl;
    }