mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 04:31:34 +08:00
Remove NXXM. Execute IWYU. (#397)
This commit is contained in:
parent
a6e04b4346
commit
c033ca61ae
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"platform": [
|
|
||||||
"GTest::+gtest"
|
|
||||||
]
|
|
||||||
}
|
|
@ -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)
|
- [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)
|
- [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
|
## External package
|
||||||
|
|
||||||
It is **highly** recommended to use CMake FetchContent to depend on FTXUI. This
|
It is **highly** recommended to use CMake FetchContent to depend on FTXUI. This
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
#include <memory> // for shared_ptr
|
||||||
#include <string> // for operator+, to_string
|
#include <string> // for operator+, to_string
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#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_base.hpp" // for Component
|
||||||
#include "ftxui/component/component_options.hpp" // for ButtonOption
|
#include "ftxui/component/component_options.hpp" // for ButtonOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <string> // for string, allocator
|
#include <memory> // for shared_ptr
|
||||||
|
#include <string> // for string, basic_string, allocator
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <stdio.h> // for getchar
|
#include <stdio.h> // for getchar
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, size, Element, text, hcenter, Decorator, Fit, WIDTH, hflow, window, EQUAL, GREATER_THAN, HEIGHT, bold, border, dim, LESS_THAN
|
#include <ftxui/dom/elements.hpp> // for operator|, size, Element, text, hcenter, Decorator, Fit, WIDTH, hflow, window, EQUAL, GREATER_THAN, HEIGHT, bold, border, dim, LESS_THAN
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#include <memory> // for shared_ptr
|
||||||
#include <string> // for allocator, operator+, to_string, char_traits, string
|
#include <string> // for allocator, operator+, to_string, char_traits, string
|
||||||
|
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
#include <iostream> // for cout, ostream
|
#include <iostream> // for cout, ostream
|
||||||
|
#include <memory> // for shared_ptr
|
||||||
#include <string> // for allocator, operator<<, string
|
#include <string> // for allocator, operator<<, string
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // 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/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/box.hpp" // for ftxui
|
#include "ftxui/screen/box.hpp" // for ftxui
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <stdio.h> // for getchar
|
#include <stdio.h> // for getchar
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, Element, size, text, hcenter, Fit, vflow, window, EQUAL, bold, border, dim, HEIGHT, WIDTH
|
#include <ftxui/dom/elements.hpp> // for operator|, Element, size, text, hcenter, Fit, vflow, window, EQUAL, bold, border, dim, HEIGHT, WIDTH
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#include <memory> // for shared_ptr
|
||||||
#include <string> // for allocator, operator+, to_string, char_traits, string
|
#include <string> // for allocator, operator+, to_string, char_traits, string
|
||||||
|
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
|
#define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP
|
||||||
|
|
||||||
#include <chrono> // for milliseconds
|
#include <chrono> // for milliseconds
|
||||||
#include <ftxui/component/animation.hpp> // for Duration, Function, QuadraticInOut
|
#include <ftxui/component/animation.hpp> // for Duration, QuadraticInOut, Function
|
||||||
#include <ftxui/dom/elements.hpp> // for Element
|
#include <ftxui/dom/elements.hpp> // for Element
|
||||||
#include <ftxui/util/ref.hpp> // for Ref
|
#include <ftxui/util/ref.hpp> // for Ref
|
||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
#define FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
|
#define FTXUI_COMPONENT_SCREEN_INTERACTIVE_HPP
|
||||||
|
|
||||||
#include <atomic> // for atomic
|
#include <atomic> // for atomic
|
||||||
#include <ftxui/component/receiver.hpp> // for ReceiverImpl, SenderImpl
|
#include <ftxui/component/receiver.hpp> // for Receiver, Sender
|
||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <memory> // for unique_ptr, shared_ptr
|
#include <memory> // for shared_ptr
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
#include <thread> // for thread
|
#include <thread> // for thread
|
||||||
#include <variant> // for variant
|
#include <variant> // for variant
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define FTXUI_SCREEN_SCREEN_HPP
|
#define FTXUI_SCREEN_SCREEN_HPP
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string> // for string, allocator
|
#include <string> // for string, allocator, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/screen/box.hpp" // for Box
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/screen.hpp" // for Screen
|
#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
|
#include "gtest/gtest_pred_impl.h" // for AssertionResult, EXPECT_EQ, Test, EXPECT_FALSE, EXPECT_TRUE, TEST
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
@ -115,8 +115,9 @@ class MenuBase : public ComponentBase {
|
|||||||
bool is_focused = (focused_entry() == i) && is_menu_focused;
|
bool is_focused = (focused_entry() == i) && is_menu_focused;
|
||||||
bool is_selected = (*selected_ == i);
|
bool is_selected = (*selected_ == i);
|
||||||
|
|
||||||
auto focus_management =
|
auto focus_management = !is_selected ? nothing
|
||||||
!is_selected ? nothing : is_menu_focused ? focus : nothing;
|
: is_menu_focused ? focus
|
||||||
|
: nothing;
|
||||||
EntryState state = {
|
EntryState state = {
|
||||||
entries_[i],
|
entries_[i],
|
||||||
false,
|
false,
|
||||||
|
@ -39,8 +39,9 @@ class RadioboxBase : public ComponentBase {
|
|||||||
for (int i = 0; i < size(); ++i) {
|
for (int i = 0; i < size(); ++i) {
|
||||||
bool is_focused = (focused_entry() == i) && is_menu_focused;
|
bool is_focused = (focused_entry() == i) && is_menu_focused;
|
||||||
bool is_selected = (hovered_ == i);
|
bool is_selected = (hovered_ == i);
|
||||||
auto focus_management =
|
auto focus_management = !is_selected ? nothing
|
||||||
!is_selected ? nothing : is_menu_focused ? focus : select;
|
: is_menu_focused ? focus
|
||||||
|
: select;
|
||||||
auto state = EntryState{
|
auto state = EntryState{
|
||||||
entries_[i],
|
entries_[i],
|
||||||
*selected_ == i,
|
*selected_ == i,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "ftxui/component/event.hpp" // for Event (ptr only)
|
#include "ftxui/component/event.hpp" // for Event (ptr only)
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse
|
#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
|
#include "ftxui/component/task.hpp" // for Task
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include <gtest/gtest-message.h> // for Message
|
#include <gtest/gtest-message.h> // for Message
|
||||||
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
||||||
#include <gtest/gtest.h> // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST
|
#include <string> // for allocator
|
||||||
#include <string> // for allocator
|
|
||||||
|
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, text, blink, Element
|
#include "ftxui/dom/elements.hpp" // for operator|, text, blink, Element
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||||
|
#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include <gtest/gtest-message.h> // for Message
|
#include <gtest/gtest-message.h> // for Message
|
||||||
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
||||||
#include <gtest/gtest.h> // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST
|
#include <string> // for allocator
|
||||||
#include <string> // for allocator
|
|
||||||
|
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, text, bold, Element
|
#include "ftxui/dom/elements.hpp" // for operator|, text, bold, Element
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||||
|
#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <algorithm> // for max
|
#include <algorithm> // for max
|
||||||
#include <memory> // for __shared_ptr_access, shared_ptr, make_shared
|
#include <memory> // for __shared_ptr_access, shared_ptr, make_shared
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, Elements, dbox
|
#include "ftxui/dom/elements.hpp" // for Element, Elements, dbox
|
||||||
#include "ftxui/dom/node.hpp" // for Node, Elements
|
#include "ftxui/dom/node.hpp" // for Node, Elements
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include <gtest/gtest-message.h> // for Message
|
#include <gtest/gtest-message.h> // for Message
|
||||||
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
||||||
#include <gtest/gtest.h> // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST
|
#include <string> // for allocator
|
||||||
#include <string> // for allocator
|
|
||||||
|
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, text, dim, Element
|
#include "ftxui/dom/elements.hpp" // for operator|, text, dim, Element
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||||
|
#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include <gtest/gtest-message.h> // for Message
|
#include <gtest/gtest-message.h> // for Message
|
||||||
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl, TestPartResult
|
||||||
#include <gtest/gtest.h> // for Test, AssertionResult, TestInfo (ptr only), EXPECT_TRUE, TEST
|
#include <string> // for allocator
|
||||||
#include <string> // for allocator
|
|
||||||
|
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, text, underlined, Element
|
#include "ftxui/dom/elements.hpp" // for operator|, text, underlined, Element
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||||
|
#include "gtest/gtest_pred_impl.h" // for Test, AssertionResult, EXPECT_TRUE, TEST
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <memory> // for __shared_ptr_access, make_unique
|
#include <memory> // for __shared_ptr_access, make_unique
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, Decorator, Elements, operator|, Fit, emptyElement, nothing, operator|=
|
#include "ftxui/dom/elements.hpp" // for Element, Decorator, Elements, operator|, Fit, emptyElement, nothing, operator|=
|
||||||
#include "ftxui/dom/node.hpp" // for Node, Node::Status
|
#include "ftxui/dom/node.hpp" // for Node, Node::Status
|
||||||
|
Loading…
Reference in New Issue
Block a user