FTXUI
6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
italic.cpp
Go to the documentation of this file.
1
// Copyright 2025 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
12
namespace
ftxui
{
13
14
/// @brief テキストに斜体を適用します。
15
/// @ingroup dom
16
Element
italic
(
Element
child) {
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).
italic
=
true
;
25
}
26
}
27
Node::Render(screen);
28
}
29
};
30
31
return
std::make_shared<Impl>(std::move(child));
32
}
33
34
}
// namespace ftxui
box.hpp
ftxui::NodeDecorator
Definition
node_decorator.hpp:16
elements.hpp
ftxui::italic
Element italic(Element)
テキストに斜体を適用します。
Definition
italic.cpp:16
ftxui::Image::PixelAt
Pixel & PixelAt(int x, int y)
指定された位置のセル (ピクセル) にアクセスします。
Definition
image.cpp:41
ftxui::Pixel::italic
bool italic
Definition
pixel.hpp:30
ftxui::Screen
ピクセルの長方形グリッド。
Definition
screen.hpp:25
ftxui
FTXUI ftxui:: 名前空間
Definition
animation.hpp:9
ftxui::Element
std::shared_ptr< Node > Element
Definition
elements.hpp:21
node.hpp
node_decorator.hpp
screen.hpp