Run IWYU. (#208)

This commit is contained in:
Arthur Sonzogni
2021-09-16 20:45:26 +02:00
committed by GitHub
parent 37b44e7557
commit 2c84f0cf1a
21 changed files with 107 additions and 100 deletions

View File

@@ -1,12 +1,13 @@
#include <memory> // for allocator, __shared_ptr_access
#include <string> // for char_traits, operator+, wstring, basic_string
#include <string> // for char_traits, operator+, string, basic_string
#include "ftxui/component/captured_mouse.hpp" // for ftxui
#include "ftxui/component/component.hpp" // for Renderer, Vertical
#include "ftxui/component/component_base.hpp" // for ComponentBase
#include "ftxui/component/captured_mouse.hpp" // for ftxui
#include "ftxui/component/component.hpp" // for Input, Renderer, Vertical
#include "ftxui/component/component_base.hpp" // for ComponentBase
#include "ftxui/component/component_options.hpp" // for InputOption
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
#include "ftxui/dom/elements.hpp" // for hbox, separator, Element, operator|, vbox, border
#include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border
#include "ftxui/util/ref.hpp" // for Ref
int main(int argc, const char* argv[]) {
using namespace ftxui;

View File

@@ -1,12 +1,15 @@
#include <functional> // for function
#include <iostream> // for basic_ostream::operator<<, operator<<, endl, basic_ostream, basic_ostream<>::__ostream_type, cout, ostream
#include <string> // for string, basic_string, allocator
#include <vector> // for vector
#include <memory> // for shared_ptr, __shared_ptr_access
#include <string> // for to_string, allocator
#include "ftxui/component/captured_mouse.hpp" // for ftxui
#include "ftxui/component/component.hpp" // for Menu
#include "ftxui/component/component_options.hpp" // for MenuOption
#include "ftxui/component/captured_mouse.hpp" // for ftxui
#include "ftxui/component/component.hpp" // for MenuEntry, Renderer, Vertical
#include "ftxui/component/component_base.hpp" // for ComponentBase
#include "ftxui/component/component_options.hpp" // for MenuEntryOption
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
#include "ftxui/dom/elements.hpp" // for operator|, separator, Element, Decorator, color, text, hbox, size, bold, frame, inverted, vbox, HEIGHT, LESS_THAN, border
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::Green, Color::Red, Color::Yellow
using namespace ftxui;
// Define a special style for some menu entry.
@@ -22,23 +25,6 @@ MenuEntryOption Colored(ftxui::Color c) {
int main(int argc, const char* argv[]) {
auto screen = ScreenInteractive::TerminalOutput();
//Black = 0,
//Red = 1,
//Green = 2,
//Yellow = 3,
//Blue = 4,
//Magenta = 5,
//Cyan = 6,
//GrayLight = 7,
//GrayDark = 8,
//RedLight = 9,
//GreenLight = 10,
//YellowLight = 11,
//BlueLight = 12,
//MagentaLight = 13,
//CyanLight = 14,
//White = 15,
int selected = 0;
auto menu = Container::Vertical(
{

View File

@@ -1,12 +1,11 @@
#include <memory> // for shared_ptr, __shared_ptr_access
#include <string> // for operator+, to_wstring
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
#include <string> // for operator+, string, char_traits, basic_string
#include "ftxui/component/captured_mouse.hpp" // for ftxui
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
#include "ftxui/component/component_base.hpp" // for ComponentBase
#include "ftxui/component/component_options.hpp" // for ButtonOption
#include "ftxui/component/component.hpp" // for Button, Vertical, Renderer
#include "ftxui/component/component_base.hpp" // for ComponentBase
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
#include "ftxui/dom/elements.hpp" // for separator, gauge, Element, operator|, vbox, border
#include "ftxui/dom/elements.hpp" // for separator, text, Element, operator|, vbox, border
using namespace ftxui;
@@ -24,13 +23,14 @@ void Nested(std::string path) {
});
auto renderer = Renderer(layout, [&] {
return vbox({
text("path: " + path),
separator(),
back_button->Render(),
goto_1->Render(),
goto_2->Render(),
goto_3->Render(),
}) | border;
text("path: " + path),
separator(),
back_button->Render(),
goto_1->Render(),
goto_2->Render(),
goto_3->Render(),
}) |
border;
});
screen.Loop(renderer);
}
@@ -40,8 +40,8 @@ int main(int argc, const char* argv[]) {
auto button_quit = Button("Quit", screen.ExitLoopClosure());
auto button_nested = Button("Nested", [] { Nested(""); });
screen.Loop(Container::Vertical({
button_quit,
button_nested,
button_quit,
button_nested,
}));
return 0;
}

View File

@@ -1,10 +1,10 @@
#include <ftxui/dom/elements.hpp> // for text, operator|, vbox, border, Element, Fit, hbox
#include <ftxui/screen/screen.hpp> // for Full, Screen
#include <iostream>
#include <memory> // for allocator
#include <ftxui/screen/screen.hpp> // for Screen
#include <iostream> // for endl, cout, ostream
#include <memory> // for allocator
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/box.hpp" // for ftxui
#include "ftxui/dom/elements.hpp" // for text, hbox, separatorDouble, separatorHeavy, separatorLight, vbox, operator|, Element, Fit, borderDouble, borderHeavy, borderLight
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/box.hpp" // for ftxui
int main(int argc, const char* argv[]) {
using namespace ftxui;