Add hflow.

This commit is contained in:
Arthur Sonzogni
2019-01-22 23:42:57 +01:00
parent 456ede70fd
commit 610b86183b
10 changed files with 161 additions and 2 deletions

View File

@@ -33,9 +33,10 @@ Element bgcolor(Color, Element);
// --- Layout ---
// Horizontal, Vertical or stacked set of elements.
Element vbox(Elements);
Element hbox(Elements);
Element vbox(Elements);
Element dbox(Elements);
Element hflow(Elements);
// -- Flexibility ---
// Define how to share the remaining space when not all of it is used inside a
@@ -73,6 +74,7 @@ Decorator operator|(Decorator, Decorator);
TAKE_ANY_ARGS(vbox)
TAKE_ANY_ARGS(hbox)
TAKE_ANY_ARGS(dbox)
TAKE_ANY_ARGS(hflow)
}; // namespace ftxui

View File

@@ -33,6 +33,7 @@ class Screen {
// Constructor using the terminal.
static Screen TerminalFullscreen();
static Screen TerminalOutput(std::unique_ptr<Node>& element);
static Screen FitDocument(std::unique_ptr<Node>& element);
// Node write into the screen using Screen::at.
wchar_t& at(size_t x, size_t y);