15const std::vector<std::vector<std::vector<std::string>>> elements = {
17 {
"Replaced by the gauge"},
137 {
"(*----------)"}, {
"(-*---------)"}, {
"(--*--------)"},
138 {
"(---*-------)"}, {
"(----*------)"}, {
"(-----*-----)"},
139 {
"(------*----)"}, {
"(-------*---)"}, {
"(--------*--)"},
140 {
"(---------*-)"}, {
"(----------*)"}, {
"(---------*-)"},
141 {
"(--------*--)"}, {
"(-------*---)"}, {
"(------*----)"},
142 {
"(-----*-----)"}, {
"(----*------)"}, {
"(---*-------)"},
143 {
"(--*--------)"}, {
"(-*---------)"},
257 {
" ",
"_______",
" "},
258 {
" ",
"______/",
" "},
259 {
" _",
"_____/ ",
" "},
260 {
" _ ",
"____/ \\",
" "},
261 {
" _ ",
"___/ \\ ",
" \\"},
262 {
" _ ",
"__/ \\ ",
" \\_"},
263 {
" _ ",
"_/ \\ ",
" \\_/"},
264 {
" _ ",
"/ \\ _",
" \\_/ "},
265 {
"_ ",
" \\ __",
" \\_/ "},
266 {
" ",
"\\ ___",
" \\_/ "},
267 {
" ",
" ___",
"\\_/ "},
268 {
" ",
" _____",
"_/ "},
269 {
" ",
" ______",
"/ "},
270 {
" ",
"_______",
" "},
281 if (charset_index <= 0) {
282 const int progress_size = 40;
289 charset_index %= int(elements.size());
291 std::vector<Element> lines;
292 for (
const auto& it : elements[charset_index][
image_index]) {
293 lines.push_back(
text(it));
295 return vbox(std::move(lines));
Element text(std::string_view text)
UTF8エンコードされたユニコードテキストを表示します。
Decorator size(WidthOrHeight direction, Constraint constraint, int value)
要素のサイズに制約を適用する。
Element spinner(int charset_index, size_t image_index)
時間やイベントの効果を表現するのに便利です。これはアスキーアートの「ビデオ」を表示します。
Element gauge(float progress)
高精細プログレスバーを描画します。
Element vbox(Elements children)
要素を縦に一つずつ表示するコンテナ。
std::shared_ptr< Node > Element