FTXUI/examples/dom/style_gallery.cpp
Prokop Randáček 59bbe3ed5e
fix some warnings (#660)
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2023-06-03 13:59:39 +02:00

35 lines
1.4 KiB
C++

#include <ftxui/dom/elements.hpp> // for text, operator|, Element, bgcolor, color, blink, bold, dim, inverted, underlined, Fit, hbox
#include <ftxui/screen/screen.hpp> // for Full, Screen
#include <memory> // for allocator
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, ftxui
int main() {
using namespace ftxui;
// clang-format off
auto document =
hbox({
text("normal") , text(" ") ,
text("bold") | bold , text(" ") ,
text("dim") | dim , text(" ") ,
text("inverted") | inverted , text(" ") ,
text("underlined") | underlined , text(" ") ,
text("underlinedDouble") | underlinedDouble , text(" ") ,
text("blink") | blink , text(" ") ,
text("strikethrough") | strikethrough , text(" ") ,
text("color") | color(Color::Blue) , text(" ") ,
text("bgcolor") | bgcolor(Color::Blue) ,
});
// clang-format on
auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
Render(screen, document);
screen.Print();
return 0;
}
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.