FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
style_dim.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4// 版權所有 2020 Arthur Sonzogni. 保留所有權利。
5// 本原始碼的使用受 MIT 授權條款約束,該條款可在
6// LICENSE 檔案中找到。
7#include <ftxui/dom/elements.hpp> // for text, operator|, dim, Fit, hbox, Element
8#include <ftxui/screen/screen.hpp> // for Full, Screen
9#include <memory> // for allocator
10
11#include "ftxui/dom/node.hpp" // for Render
12#include "ftxui/screen/color.hpp" // for ftxui
13
14int main() {
15 using namespace ftxui;
16 auto document = //
17 hbox({
18 text("This text is "),
19 text("dim") | dim,
20 text(". Do you like it?"),
21 });
22 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
23 Render(screen, document);
24 screen.Print();
25
26 return 0;
27}
void Render(Screen &screen, const Element &element)
在 ftxui::Screen 上顯示元素。
Definition node.cpp:82
FTXUI 的 ftxui:: 命名空間
Definition animation.hpp:10
int main()
Definition style_dim.cpp:14