FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
vbox_hbox.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// 本原始碼的使用受 MIT 授權條款約束,該條款可在 LICENSE 檔案中找到。
3#include <stdio.h> // for getchar
4#include <ftxui/dom/elements.hpp> // for filler, text, hbox, vbox
5#include <ftxui/screen/screen.hpp> // for Full, Screen
6#include <memory> // for allocator
7
8#include "ftxui/dom/node.hpp" // for Render
9#include "ftxui/screen/color.hpp" // for ftxui
10
11int main() {
12 using namespace ftxui;
13 auto document = //
14 vbox({
15 hbox({
16 text("north-west"),
17 filler(),
18 text("north-east"),
19 }),
20 filler(),
21 hbox({
22 filler(),
23 text("center"),
24 filler(),
25 }),
26 filler(),
27 hbox({
28 text("south-west"),
29 filler(),
30 text("south-east"),
31 }),
32 });
33 auto screen = Screen::Create(Dimension::Full());
34 Render(screen, document);
35 screen.Print();
36 getchar();
37
38 return 0;
39}
void Render(Screen &screen, const Element &element)
在 ftxui::Screen 上顯示元素。
Definition node.cpp:82
FTXUI 的 ftxui:: 命名空間
Definition animation.hpp:10
int main()
Definition vbox_hbox.cpp:11