FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
underlined_double.cpp
Go to the documentation of this file.
1// Copyright 2023 Arthur Sonzogni. All rights reserved.
2// このソースコードの使用は、LICENSE ファイルにある MIT ライセンスに従って管理されます。
3#include <memory> // for make_shared
4#include <utility> // for move
5
6#include "ftxui/dom/elements.hpp" // for Element, underlinedDouble
7#include "ftxui/dom/node.hpp" // for Node
8#include "ftxui/dom/node_decorator.hpp" // for NodeDecorator
9#include "ftxui/screen/box.hpp" // for Box
10#include "ftxui/screen/screen.hpp" // for Pixel, Screen
11
12namespace ftxui {
13
14/// @brief テキストに二重下線を適用します。
15/// @ingroup dom
17 class Impl : public NodeDecorator {
18 public:
19 using NodeDecorator::NodeDecorator;
20
21 void Render(Screen& screen) override {
22 for (int y = box_.y_min; y <= box_.y_max; ++y) {
23 for (int x = box_.x_min; x <= box_.x_max; ++x) {
24 screen.PixelAt(x, y).underlined_double = true;
25 }
26 }
27 Node::Render(screen);
28 }
29 };
30
31 return std::make_shared<Impl>(std::move(child));
32}
33
34} // namespace ftxui
Element underlinedDouble(Element)
テキストに二重下線を適用します。
Pixel & PixelAt(int x, int y)
指定された位置のセル (ピクセル) にアクセスします。
Definition image.cpp:41
bool underlined_double
Definition pixel.hpp:33
ピクセルの長方形グリッド。
Definition screen.hpp:25
FTXUI ftxui:: 名前空間
Definition animation.hpp:9
std::shared_ptr< Node > Element
Definition elements.hpp:21