diff --git a/.nxxm/deps b/.nxxm/deps deleted file mode 100644 index ee034b1..0000000 --- a/.nxxm/deps +++ /dev/null @@ -1,5 +0,0 @@ -{ - "platform": [ - "GTest::+gtest" - ] -} diff --git a/README.md b/README.md index 47781f8..c710bb1 100644 --- a/README.md +++ b/README.md @@ -340,10 +340,6 @@ Several games using the FTXUI have been made during the Game Jam: - [smoothlife](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_2022/smoothlife.md) - [Consu](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_2022/consu.md) -## Hosted on - * [github](https://github.com/ArthurSonzogni/ftxui) - * [gitlab](https://gitlab.com/ArthurSonzogni/ftxui) - ## External package It is **highly** recommended to use CMake FetchContent to depend on FTXUI. This diff --git a/examples/component/button_style.cpp b/examples/component/button_style.cpp index 275c27d..bf898de 100644 --- a/examples/component/button_style.cpp +++ b/examples/component/button_style.cpp @@ -1,7 +1,8 @@ +#include // for shared_ptr #include // for operator+, to_string #include "ftxui/component/captured_mouse.hpp" // for ftxui -#include "ftxui/component/component.hpp" // for Button, Renderer, Vertical, Horizontal, operator| +#include "ftxui/component/component.hpp" // for Button, Vertical, Renderer, Horizontal, operator| #include "ftxui/component/component_base.hpp" // for Component #include "ftxui/component/component_options.hpp" // for ButtonOption #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive diff --git a/examples/component/maybe.cpp b/examples/component/maybe.cpp index 5c1419b..ad0af17 100644 --- a/examples/component/maybe.cpp +++ b/examples/component/maybe.cpp @@ -1,4 +1,5 @@ -#include // for string, allocator +#include // for shared_ptr +#include // for string, basic_string, allocator #include // for vector #include "ftxui/component/captured_mouse.hpp" // for ftxui diff --git a/examples/dom/hflow.cpp b/examples/dom/hflow.cpp index d86ad92..d1d82f7 100644 --- a/examples/dom/hflow.cpp +++ b/examples/dom/hflow.cpp @@ -1,6 +1,7 @@ #include // for getchar #include // for operator|, size, Element, text, hcenter, Decorator, Fit, WIDTH, hflow, window, EQUAL, GREATER_THAN, HEIGHT, bold, border, dim, LESS_THAN #include // for Full, Screen +#include // for shared_ptr #include // for allocator, operator+, to_string, char_traits, string #include "ftxui/dom/node.hpp" // for Render diff --git a/examples/dom/html_like.cpp b/examples/dom/html_like.cpp index 7ea23e6..dc1f9fe 100644 --- a/examples/dom/html_like.cpp +++ b/examples/dom/html_like.cpp @@ -1,10 +1,11 @@ #include // for operator""s, chrono_literals #include // for Screen #include // for cout, ostream +#include // for shared_ptr #include // for allocator, operator<<, string #include // for sleep_for -#include "ftxui/dom/elements.hpp" // for paragraph, operator|, text, Element, border, Fit, color, hflow, spinner, vbox, bold, dim, underlined +#include "ftxui/dom/elements.hpp" // for paragraph, text, operator|, Element, border, Fit, color, hflow, spinner, vbox, bold, dim, underlined #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/box.hpp" // for ftxui #include "ftxui/screen/color.hpp" // for Color, Color::Red diff --git a/examples/dom/vflow.cpp b/examples/dom/vflow.cpp index 2d05b42..92e0e8f 100644 --- a/examples/dom/vflow.cpp +++ b/examples/dom/vflow.cpp @@ -1,6 +1,7 @@ #include // for getchar #include // for operator|, Element, size, text, hcenter, Fit, vflow, window, EQUAL, bold, border, dim, HEIGHT, WIDTH #include // for Full, Screen +#include // for shared_ptr #include // for allocator, operator+, to_string, char_traits, string #include "ftxui/dom/node.hpp" // for Render diff --git a/include/ftxui/component/component_options.hpp b/include/ftxui/component/component_options.hpp index be55dc2..7b02f0f 100644 --- a/include/ftxui/component/component_options.hpp +++ b/include/ftxui/component/component_options.hpp @@ -2,7 +2,7 @@ #define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP #include // for milliseconds -#include // for Duration, Function, QuadraticInOut +#include // for Duration, QuadraticInOut, Function #include // for Element #include // for Ref #include // for function diff --git a/include/ftxui/component/screen_interactive.hpp b/include/ftxui/component/screen_interactive.hpp index 02d09c0..ab34207 100644 --- a/include/ftxui/component/screen_interactive.hpp +++ b/include/ftxui/component/screen_interactive.hpp @@ -2,9 +2,9 @@ #define FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP #include // for atomic -#include // for ReceiverImpl, SenderImpl +#include // for Receiver, Sender #include // for function -#include // for unique_ptr, shared_ptr +#include // for shared_ptr #include // for string #include // for thread #include // for variant diff --git a/include/ftxui/screen/screen.hpp b/include/ftxui/screen/screen.hpp index 061173d..21eb377 100644 --- a/include/ftxui/screen/screen.hpp +++ b/include/ftxui/screen/screen.hpp @@ -2,7 +2,7 @@ #define FTXUI_SCREEN_SCREEN_HPP #include -#include // for string, allocator +#include // for string, allocator, basic_string #include // for vector #include "ftxui/screen/box.hpp" // for Box diff --git a/src/ftxui/component/button_test.cpp b/src/ftxui/component/button_test.cpp index e4c770c..57dade2 100644 --- a/src/ftxui/component/button_test.cpp +++ b/src/ftxui/component/button_test.cpp @@ -12,6 +12,7 @@ #include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/screen.hpp" // for Screen +#include "ftxui/screen/terminal.hpp" // for SetColorSupport, Color, TrueColor #include "gtest/gtest_pred_impl.h" // for AssertionResult, EXPECT_EQ, Test, EXPECT_FALSE, EXPECT_TRUE, TEST namespace ftxui { diff --git a/src/ftxui/component/menu.cpp b/src/ftxui/component/menu.cpp index f275ca3..0727c32 100644 --- a/src/ftxui/component/menu.cpp +++ b/src/ftxui/component/menu.cpp @@ -115,8 +115,9 @@ class MenuBase : public ComponentBase { bool is_focused = (focused_entry() == i) && is_menu_focused; bool is_selected = (*selected_ == i); - auto focus_management = - !is_selected ? nothing : is_menu_focused ? focus : nothing; + auto focus_management = !is_selected ? nothing + : is_menu_focused ? focus + : nothing; EntryState state = { entries_[i], false, diff --git a/src/ftxui/component/radiobox.cpp b/src/ftxui/component/radiobox.cpp index f3f32b0..298518d 100644 --- a/src/ftxui/component/radiobox.cpp +++ b/src/ftxui/component/radiobox.cpp @@ -39,8 +39,9 @@ class RadioboxBase : public ComponentBase { for (int i = 0; i < size(); ++i) { bool is_focused = (focused_entry() == i) && is_menu_focused; bool is_selected = (hovered_ == i); - auto focus_management = - !is_selected ? nothing : is_menu_focused ? focus : select; + auto focus_management = !is_selected ? nothing + : is_menu_focused ? focus + : select; auto state = EntryState{ entries_[i], *selected_ == i, diff --git a/src/ftxui/component/terminal_input_parser.hpp b/src/ftxui/component/terminal_input_parser.hpp index 1c82d72..5449b1e 100644 --- a/src/ftxui/component/terminal_input_parser.hpp +++ b/src/ftxui/component/terminal_input_parser.hpp @@ -7,7 +7,7 @@ #include "ftxui/component/event.hpp" // for Event (ptr only) #include "ftxui/component/mouse.hpp" // for Mouse -#include "ftxui/component/receiver.hpp" // for SenderImpl +#include "ftxui/component/receiver.hpp" // for Sender #include "ftxui/component/task.hpp" // for Task namespace ftxui { diff --git a/src/ftxui/dom/blink_test.cpp b/src/ftxui/dom/blink_test.cpp index 8bbe423..f6f8de6 100644 --- a/src/ftxui/dom/blink_test.cpp +++ b/src/ftxui/dom/blink_test.cpp @@ -1,11 +1,11 @@ #include // for Message #include // for SuiteApiResolver, TestFactoryImpl, TestPartResult -#include // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST -#include // for allocator +#include // for allocator #include "ftxui/dom/elements.hpp" // for operator|, text, blink, Element #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/screen.hpp" // for Screen, Pixel +#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST namespace ftxui { diff --git a/src/ftxui/dom/bold_test.cpp b/src/ftxui/dom/bold_test.cpp index fac4431..83989c9 100644 --- a/src/ftxui/dom/bold_test.cpp +++ b/src/ftxui/dom/bold_test.cpp @@ -1,11 +1,11 @@ #include // for Message #include // for SuiteApiResolver, TestFactoryImpl, TestPartResult -#include // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST -#include // for allocator +#include // for allocator #include "ftxui/dom/elements.hpp" // for operator|, text, bold, Element #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/screen.hpp" // for Screen, Pixel +#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST namespace ftxui { diff --git a/src/ftxui/dom/dbox.cpp b/src/ftxui/dom/dbox.cpp index 6bfc128..bf1c244 100644 --- a/src/ftxui/dom/dbox.cpp +++ b/src/ftxui/dom/dbox.cpp @@ -1,6 +1,7 @@ #include // for max #include // for __shared_ptr_access, shared_ptr, make_shared #include // for move +#include // for vector #include "ftxui/dom/elements.hpp" // for Element, Elements, dbox #include "ftxui/dom/node.hpp" // for Node, Elements diff --git a/src/ftxui/dom/dim_test.cpp b/src/ftxui/dom/dim_test.cpp index 312c1fe..75dadd6 100644 --- a/src/ftxui/dom/dim_test.cpp +++ b/src/ftxui/dom/dim_test.cpp @@ -1,11 +1,11 @@ #include // for Message #include // for SuiteApiResolver, TestFactoryImpl, TestPartResult -#include // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST -#include // for allocator +#include // for allocator #include "ftxui/dom/elements.hpp" // for operator|, text, dim, Element #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/screen.hpp" // for Screen, Pixel +#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST namespace ftxui { diff --git a/src/ftxui/dom/underlined_test.cpp b/src/ftxui/dom/underlined_test.cpp index 0c71341..4026f3c 100644 --- a/src/ftxui/dom/underlined_test.cpp +++ b/src/ftxui/dom/underlined_test.cpp @@ -1,11 +1,11 @@ #include // for Message #include // for SuiteApiResolver, TestFactoryImpl, TestPartResult -#include // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST -#include // for allocator +#include // for allocator #include "ftxui/dom/elements.hpp" // for operator|, text, underlined, Element #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/screen.hpp" // for Screen, Pixel +#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST namespace ftxui { diff --git a/src/ftxui/dom/util.cpp b/src/ftxui/dom/util.cpp index 38a82cb..bbe8813 100644 --- a/src/ftxui/dom/util.cpp +++ b/src/ftxui/dom/util.cpp @@ -2,6 +2,7 @@ #include // for function #include // for __shared_ptr_access, make_unique #include // for move +#include // for vector #include "ftxui/dom/elements.hpp" // for Element, Decorator, Elements, operator|, Fit, emptyElement, nothing, operator|= #include "ftxui/dom/node.hpp" // for Node, Node::Status