mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-12-02 00:12:28 +08:00
711b71688e
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
27 lines
518 B
C++
27 lines
518 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 =
|
|
hbox(
|
|
text(L"left-column"),
|
|
separator(),
|
|
flex(vbox(
|
|
flex(center(text(L"right-column"))),
|
|
separator(),
|
|
center(text(L"bottom-column"))
|
|
))
|
|
);
|
|
auto screen = ftxui::Screen::TerminalFullscreen();
|
|
Render(screen, document.get());
|
|
|
|
std::cout << screen.ToString();
|
|
|
|
getchar();
|
|
|
|
return 0;
|
|
}
|