FTXUI/examples/vbox_hbox/main.cpp
Arthur Sonzogni 711b71688e Implement a lot of new features.
This commit deserve to be cut into at least 8 sub commit. Sorry, I
acknowledge this is bad... Here are the new features:

 * dom decorator: bold, dim, underlined, inverted.
 * component mechanism
 * components
   * menu
   * toogle
2018-10-09 19:08:55 +02:00

39 lines
662 B
C++

#include "ftxui/screen.hpp"
#include "ftxui/dom/elements.hpp"
#include <iostream>
int main(int argc, const char *argv[])
{
using namespace ftxui::dom;
auto document =
vbox(
hbox(
text(L"north-west"),
flex(),
text(L"north-east")
),
flex(),
hbox(
hbox(
flex(),
text(L"center"),
flex()
)
),
flex(),
hbox(
text(L"south-west"),
flex(),
text(L"south-east")
)
);
auto screen = ftxui::Screen::TerminalFullscreen();
Render(screen, document.get());
std::cout << screen.ToString();
getchar();
return 0;
}