2019-01-06 17:10:35 +01:00
|
|
|
#include "ftxui/screen/screen.hpp"
|
2019-01-06 01:28:14 +01:00
|
|
|
#include "ftxui/dom/elements.hpp"
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
int main(int argc, const char *argv[])
|
|
|
|
|
{
|
2019-01-12 15:00:08 +01:00
|
|
|
using namespace ftxui;
|
2020-03-22 22:32:44 +01:00
|
|
|
// clang-format off
|
2019-01-06 01:28:14 +01:00
|
|
|
auto document =
|
|
|
|
|
hbox(
|
|
|
|
|
text(L"This text is "),
|
|
|
|
|
text(L"inverted") | inverted,
|
|
|
|
|
text(L". Do you like it?")
|
|
|
|
|
);
|
2020-03-22 22:32:44 +01:00
|
|
|
// clang-format on
|
2019-01-26 21:52:55 +01:00
|
|
|
auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
|
2019-01-06 01:28:14 +01:00
|
|
|
Render(screen, document.get());
|
|
|
|
|
|
|
|
|
|
std::cout << screen.ToString();
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|