FTXUI 6.1.9
C++ functional terminal UI.
载入中...
搜索中...
未找到
examples/dom/vbox_hbox.cpp
// 版权所有 2020 Arthur Sonzogni. 保留所有权利。
// 此源代码的使用受 MIT 许可证的约束,该许可证可在 LICENSE 文件中找到。
#include <stdio.h> // for getchar
#include <ftxui/dom/elements.hpp> // for filler, text, hbox, vbox
#include <ftxui/screen/screen.hpp> // for Full, Screen
#include <memory> // for allocator
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/color.hpp" // for ftxui
int main() {
using namespace ftxui;
auto document = //
vbox({
hbox({
text("north-west"),
filler(),
text("north-east"),
}),
filler(),
hbox({
filler(),
text("center"),
filler(),
}),
filler(),
hbox({
text("south-west"),
filler(),
text("south-east"),
}),
});
auto screen = Screen::Create(Dimension::Full());
Render(screen, document);
screen.Print();
getchar();
return 0;
}
#include "ftxui/component/component_base.hpp" // 用于 ComponentBase