examples/dom/border.cpp

    //Copyright2020ArthurSonzogni.Allrightsreserved.
    //UseofthissourcecodeisgovernedbytheMITlicensethatcanbefoundin
    //theLICENSEfile.
    #include<stdlib.h>//forEXIT_SUCCESS
    #include<ftxui/dom/elements.hpp>//fortext,operator|,vbox,border,Element,Fit,hbox
    #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=//
    hbox({
    vbox({
    text("Line1"),
    text("Line2"),
    text("Line3"),
    })|border,

    vbox({
    text("Line4"),
    text("Line5"),
    text("Line6"),
    })|border,

    vbox({
    text("Line7"),
    text("Line8"),
    text("Line9"),
    })|border,
    });
    autoscreen=Screen::Create(Dimension::Full(),Dimension::Fit(document));
    Render(screen,document);
    screen.Print();
    returnEXIT_SUCCESS;
    }