#include <chrono>
#include <iostream>
#include <string>
#include <thread>
#include <utility>
#include <vector>
int main() {
using namespace std::chrono_literals;
std::string reset_position;
for (int index = 0; index < 200; ++index) {
std::vector<Element> entries;
for (int i = 0; i < 23; ++i) {
if (i != 0)
entries.push_back(
}));
}
});
std::cout << reset_position;
screen.Print();
reset_position = screen.ResetPosition();
std::this_thread::sleep_for(0.1s);
}
std::cout << std::endl;
}
static Screen Create(Dimensions dimension)
Create a screen with the given dimension.
Dimensions Fit(Element &)
Decorator size(WidthOrHeight, Constraint, int value)
Apply a constraint on the size of an element.
Element bold(Element)
Use a bold font, for elements with more emphasis.
Element spinner(int charset_index, size_t image_index)
Useful to represent the effect of time and/or events. This display an ASCII art "video".
Element hbox(Elements)
A container displaying elements horizontally one by one.
std::string to_string(const std::wstring &s)
Convert a UTF8 std::string into a std::wstring.
Element text(std::wstring text)
Display a piece of unicode text.
Element separator()
Draw a vertical or horizontal separation in between two other elements.
Element filler()
An element that will take expand proportionally to the space left in a container.
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
Element border(Element)
Draw a border around the element.
Element vbox(Elements)
A container displaying elements vertically one by one.