mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 04:31:34 +08:00
Execute IWYU
This commit is contained in:
parent
7f514ff41c
commit
5c4cd1add1
@ -1,11 +1,12 @@
|
|||||||
#include <memory> // for __shared_ptr_access, shared_ptr
|
#include <memory> // for shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for operator+, to_wstring
|
#include <string> // for operator+, to_wstring
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for ButtonOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for separator, Element, gauge, text, operator|, vbox, border
|
#include "ftxui/dom/elements.hpp" // for separator, gauge, text, Element, operator|, vbox, border
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
@ -3,17 +3,18 @@
|
|||||||
#include <cmath> // for sin
|
#include <cmath> // for sin
|
||||||
#include <functional> // for ref, reference_wrapper, function
|
#include <functional> // for ref, reference_wrapper, function
|
||||||
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for wstring, basic_string, operator+, to_wstring
|
#include <string> // for wstring, basic_string, operator+, char_traits, to_wstring
|
||||||
#include <thread> // for sleep_for, thread
|
#include <thread> // for sleep_for, thread
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Horizontal, Vertical, Input, Menu, Radiobox, Tab, Toggle
|
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Horizontal, Vertical, Input, Menu, Radiobox, Tab, Toggle
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::Custom
|
#include "ftxui/component/component_options.hpp" // for InputOption
|
||||||
|
#include "ftxui/component/event.hpp" // for Event, Event::Custom
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, operator|, color, bgcolor, Element, filler, size, vbox, flex, hbox, graph, separator, EQUAL, WIDTH, hcenter, bold, border, window, HEIGHT, Elements, hflow, flex_grow, frame, gauge, LESS_THAN, spinner, dim, GREATER_THAN
|
#include "ftxui/dom/elements.hpp" // for text, operator|, color, bgcolor, filler, Element, size, vbox, flex, hbox, graph, separator, EQUAL, WIDTH, hcenter, bold, border, window, HEIGHT, Elements, hflow, flex_grow, frame, gauge, LESS_THAN, spinner, dim, GREATER_THAN
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::Black, Color::Blue, Color::Cyan, Color::CyanLight, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::White, Color::Yellow, Color::YellowLight, Color::Default
|
#include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::Black, Color::Blue, Color::Cyan, Color::CyanLight, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::White, Color::Yellow, Color::YellowLight, Color::Default
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <iostream> // for basic_ostream::operator<<, operator<<, endl, basic_ostream, basic_ostream<>::__ostream_type, cout, ostream
|
#include <iostream> // for basic_ostream::operator<<, operator<<, endl, basic_ostream, basic_ostream<>::__ostream_type, cout, ostream
|
||||||
#include <string> // for wstring, allocator, basic_string
|
#include <string> // for wstring, 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
|
||||||
#include "ftxui/component/component.hpp" // for Menu
|
#include "ftxui/component/component.hpp" // for Menu
|
||||||
|
#include "ftxui/component/component_options.hpp" // for MenuOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <memory> // for allocator, __shared_ptr_access
|
#include <memory> // for allocator, __shared_ptr_access
|
||||||
#include <string> // for wstring, operator+, to_string, basic_string
|
#include <string> // for wstring, basic_string, operator+, to_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer
|
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for MenuOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, separator, bold, hcenter, vbox, hbox, gauge, Element, operator|, border
|
#include "ftxui/dom/elements.hpp" // for text, separator, bold, hcenter, vbox, hbox, gauge, Element, operator|, border
|
||||||
#include "ftxui/screen/string.hpp" // for to_wstring
|
#include "ftxui/screen/string.hpp" // for to_wstring
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <initializer_list> // for initializer_list
|
#include <memory> // for shared_ptr, __shared_ptr_access, allocator
|
||||||
#include <memory> // for __shared_ptr_access, shared_ptr, allocator
|
#include <string> // for wstring, basic_string
|
||||||
#include <string> // for wstring, basic_string
|
#include <vector> // for vector
|
||||||
#include <vector> // for vector
|
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer
|
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component
|
#include "ftxui/component/component_options.hpp" // for MenuOption
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, separator, bgcolor, color, flex, Decorator, bold, hbox, border, dim
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#include "ftxui/dom/elements.hpp" // for operator|, color, separator, Decorator, bgcolor, flex, Element, bold, hbox, border, dim
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::BlueLight, Color::Red, Color::Yellow
|
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::BlueLight, Color::Red, Color::Yellow
|
||||||
|
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
|
@ -8,13 +8,19 @@
|
|||||||
|
|
||||||
#include "ftxui/component/component_base.hpp"
|
#include "ftxui/component/component_base.hpp"
|
||||||
#include "ftxui/component/component_options.hpp"
|
#include "ftxui/component/component_options.hpp"
|
||||||
#include "ftxui/dom/elements.hpp" // for Element
|
#include "ftxui/dom/elements.hpp" // for Element
|
||||||
#include "ftxui/util/ref.hpp" // for ConstStringRef, StringRef
|
#include "ftxui/util/ref.hpp" // for Ref, ConstStringRef, StringRef
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
class ComponentBase;
|
class ComponentBase;
|
||||||
struct Event;
|
struct Event;
|
||||||
|
struct ButtonOption;
|
||||||
|
struct CheckboxOption;
|
||||||
|
struct InputOption;
|
||||||
|
struct MenuOption;
|
||||||
|
struct RadioboxOption;
|
||||||
|
struct ToggleOption;
|
||||||
|
|
||||||
using Component = std::shared_ptr<ComponentBase>;
|
using Component = std::shared_ptr<ComponentBase>;
|
||||||
using Components = std::vector<Component>;
|
using Components = std::vector<Component>;
|
||||||
|
@ -81,3 +81,7 @@ struct ToggleOption {
|
|||||||
}; // namespace ftxui
|
}; // namespace ftxui
|
||||||
|
|
||||||
#endif /* end of include guard: FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP */
|
#endif /* end of include guard: FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP */
|
||||||
|
|
||||||
|
// Copyright 2021 Arthur Sonzogni. All rights reserved.
|
||||||
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
|
// the LICENSE file.
|
||||||
|
@ -24,7 +24,7 @@ class ConstRef {
|
|||||||
|
|
||||||
/// @brief An adapter. Own or reference an mutable object.
|
/// @brief An adapter. Own or reference an mutable object.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class Ref{
|
class Ref {
|
||||||
public:
|
public:
|
||||||
Ref() {}
|
Ref() {}
|
||||||
Ref(T t) : owned_(t) {}
|
Ref(T t) : owned_(t) {}
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <memory> // for shared_ptr
|
#include <memory> // for shared_ptr
|
||||||
|
#include <utility> // for move
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||||
#include "ftxui/component/component.hpp" // for CapturedMouse
|
#include "ftxui/component/component.hpp" // for Make, Button
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::Return
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for ButtonOption
|
||||||
|
#include "ftxui/component/event.hpp" // for Event, Event::Return
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component
|
||||||
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, nothing, reflect, text, border, inverted
|
||||||
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
|
#include "ftxui/util/ref.hpp" // for ConstStringRef, Ref
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -1,19 +1,16 @@
|
|||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <memory> // for shared_ptr
|
#include <memory> // for shared_ptr
|
||||||
|
#include <utility> // for move
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::Return
|
#include "ftxui/component/component.hpp" // for Make, Component, Checkbox
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
|
||||||
|
|
||||||
#include <functional> // for function
|
|
||||||
#include <string> // for allocator, wstring
|
|
||||||
|
|
||||||
#include "ftxui/component/component.hpp" // for Component
|
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, Decorator, inverted, nothing
|
#include "ftxui/component/component_options.hpp" // for CheckboxOption
|
||||||
#include "ftxui/screen/box.hpp" // for Box
|
#include "ftxui/component/event.hpp" // for Event, Event::Return
|
||||||
#include "ftxui/screen/string.hpp" // for ConstStringRef
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
||||||
|
#include "ftxui/dom/elements.hpp" // for operator|, text, Element, hbox, reflect, focus, nothing, select
|
||||||
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
|
#include "ftxui/util/ref.hpp" // for Ref, ConstStringRef
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
@ -23,9 +20,7 @@ namespace {
|
|||||||
/// @ingroup dom
|
/// @ingroup dom
|
||||||
class CheckboxBase : public ComponentBase {
|
class CheckboxBase : public ComponentBase {
|
||||||
public:
|
public:
|
||||||
CheckboxBase(ConstStringRef label,
|
CheckboxBase(ConstStringRef label, bool* state, Ref<CheckboxOption> option)
|
||||||
bool* state,
|
|
||||||
Ref<CheckboxOption> option)
|
|
||||||
: label_(label), state_(state), option_(std::move(option)) {
|
: label_(label), state_(state), option_(std::move(option)) {
|
||||||
#if defined(FTXUI_MICROSOFT_TERMINAL_FALLBACK)
|
#if defined(FTXUI_MICROSOFT_TERMINAL_FALLBACK)
|
||||||
// Microsoft terminal do not use fonts able to render properly the default
|
// Microsoft terminal do not use fonts able to render properly the default
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
#include <gtest/gtest.h> // for Test, SuiteApiResolver, TestInfo (ptr only), TEST, TestFactoryImpl
|
||||||
#include <memory> // for shared_ptr, allocator, make_shared, __shared_ptr_access
|
#include <memory> // for shared_ptr, allocator, make_shared, __shared_ptr_access
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase, Component
|
#include "ftxui/component/component_base.hpp" // for ComponentBase, Component
|
||||||
#include "gtest/gtest_pred_impl.h" // for Test, SuiteApiResolver, TEST, TestFactoryImpl
|
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
#include <stddef.h> // for size_t
|
#include <stddef.h> // for size_t
|
||||||
|
|
||||||
#include <algorithm> // for max, min
|
#include <algorithm> // for max, min
|
||||||
#include <memory> // for __shared_ptr_access, shared_ptr, make_shared, allocator, __shared_ptr_access<>::element_type, allocator_traits<>::value_type
|
#include <memory> // for __shared_ptr_access, shared_ptr, make_shared, allocator, __shared_ptr_access<>::element_type, allocator_traits<>::value_type
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector, __alloc_traits<>::value_type
|
#include <vector> // for vector, __alloc_traits<>::value_type
|
||||||
|
|
||||||
#include "ftxui/component/component.hpp"
|
#include "ftxui/component/component.hpp" // for Component, Components, Horizontal, Vertical, Tab
|
||||||
#include "ftxui/component/event.hpp"
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/event.hpp" // for Event, Event::Tab, Event::TabReverse, Event::ArrowDown, Event::ArrowLeft, Event::ArrowRight, Event::ArrowUp
|
||||||
|
#include "ftxui/dom/elements.hpp" // for text, Elements, Element, hbox, vbox
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
#include <memory> // for __shared_ptr_access, shared_ptr, allocator
|
#include <memory> // for __shared_ptr_access, shared_ptr, allocator
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for AssertionResult, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, Test, TEST
|
#include "ftxui/component/component.hpp" // for Horizontal, Vertical
|
||||||
#include "ftxui/component/event.hpp" // for AssertionResult, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, Test, TEST
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/event.hpp" // for Event, Event::Tab, Event::TabReverse, Event::ArrowDown, Event::ArrowLeft, Event::ArrowRight, Event::ArrowUp
|
||||||
#include "gtest/gtest_pred_impl.h" // for AssertionResult, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, Test, TEST
|
#include "gtest/gtest_pred_impl.h" // for AssertionResult, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, Test, TEST
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
#include <algorithm> // for max, min
|
#include <algorithm> // for max, min
|
||||||
#include <memory> // for shared_ptr
|
#include <functional> // for function
|
||||||
#include <string> // for wstring, allocator, basic_string
|
#include <memory> // for shared_ptr, allocator
|
||||||
|
#include <string> // for wstring, basic_string
|
||||||
|
#include <utility> // for move
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||||
#include "ftxui/component/component.hpp" // for Component
|
#include "ftxui/component/component.hpp" // for Make, Input
|
||||||
#include "ftxui/component/component_base.hpp" // for Component
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for InputOption
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Backspace, Event::Custom, Event::Delete, Event::End, Event::Home, Event::Return
|
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Backspace, Event::Custom, Event::Delete, Event::End, Event::Home, Event::Return
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component
|
#include "ftxui/component/screen_interactive.hpp" // for Component
|
||||||
#include "ftxui/util/ref.hpp" // for Component
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, text, reflect, dim, flex, focus, inverted, hbox, size, frame, select, underlined, Decorator, EQUAL, HEIGHT
|
||||||
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
|
#include "ftxui/util/ref.hpp" // for StringRef, Ref, ConstStringRef
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
#include <gtest/gtest-message.h> // for Message
|
#include <gtest/gtest-message.h> // for Message
|
||||||
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl
|
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl
|
||||||
#include <memory> // for __shared_ptr_access
|
#include <memory> // for __shared_ptr_access, shared_ptr, allocator
|
||||||
#include <string> // for wstring, allocator
|
#include <string> // for wstring
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp"
|
#include "ftxui/component/component.hpp" // for Input, Component
|
||||||
#include "ftxui/component/component_options.hpp"
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for InputOption
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Backspace, Event::Delete, Event::End, Event::Home
|
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Backspace, Event::Delete, Event::End, Event::Home
|
||||||
|
#include "ftxui/util/ref.hpp" // for Ref
|
||||||
#include "gtest/gtest_pred_impl.h" // for Test, EXPECT_EQ, TEST
|
#include "gtest/gtest_pred_impl.h" // for Test, EXPECT_EQ, TEST
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
#include <stddef.h> // for size_t
|
#include <stddef.h> // for size_t
|
||||||
#include <algorithm> // for max, min
|
#include <algorithm> // for max, min
|
||||||
#include <memory> // for shared_ptr, allocator_traits<>::value_type
|
#include <functional> // for function
|
||||||
#include <utility> // for move
|
#include <memory> // for shared_ptr, allocator_traits<>::value_type
|
||||||
|
#include <string> // for operator+, wstring
|
||||||
|
#include <utility> // for move
|
||||||
|
#include <vector> // for vector, __alloc_traits<>::value_type
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||||
#include "ftxui/component/component.hpp" // for CapturedMouse
|
#include "ftxui/component/component.hpp" // for Make, Menu
|
||||||
#include "ftxui/component/component.hpp" // for Component
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for MenuOption
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::ArrowDown, Event::ArrowUp, Event::Return, Event::Tab, Event::TabReverse
|
#include "ftxui/component/event.hpp" // for Event, Event::ArrowDown, Event::ArrowUp, Event::Return, Event::Tab, Event::TabReverse
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Released
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Released
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component
|
#include "ftxui/component/screen_interactive.hpp" // for Component
|
||||||
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, reflect, text, vbox, Elements, focus, nothing, select
|
||||||
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
|
#include "ftxui/util/ref.hpp" // for Ref
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -2,13 +2,20 @@
|
|||||||
#include <algorithm> // for max, min
|
#include <algorithm> // for max, min
|
||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <memory> // for shared_ptr, allocator_traits<>::value_type
|
#include <memory> // for shared_ptr, allocator_traits<>::value_type
|
||||||
|
#include <string> // for wstring
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||||
#include "ftxui/component/component.hpp" // for Component
|
#include "ftxui/component/component.hpp" // for Make, Radiobox
|
||||||
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for RadioboxOption
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::ArrowDown, Event::ArrowUp, Event::Return, Event::Tab, Event::TabReverse
|
#include "ftxui/component/event.hpp" // for Event, Event::ArrowDown, Event::ArrowUp, Event::Return, Event::Tab, Event::TabReverse
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component
|
#include "ftxui/component/screen_interactive.hpp" // for Component
|
||||||
|
#include "ftxui/dom/elements.hpp" // for Element, operator|, text, hbox, reflect, vbox, focus, nothing, select
|
||||||
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
|
#include "ftxui/util/ref.hpp" // for Ref
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
@ -34,7 +41,6 @@ class RadioboxBase : public ComponentBase {
|
|||||||
~RadioboxBase() override = default;
|
~RadioboxBase() override = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Element Render() override {
|
Element Render() override {
|
||||||
std::vector<Element> elements;
|
std::vector<Element> elements;
|
||||||
bool is_focused = Focused();
|
bool is_focused = Focused();
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
#include <gtest/gtest-message.h> // for Message
|
#include <gtest/gtest-message.h> // for Message
|
||||||
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl
|
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl
|
||||||
#include <memory> // for __shared_ptr_access, shared_ptr
|
#include <memory> // for __shared_ptr_access, shared_ptr, allocator
|
||||||
|
#include <string> // for wstring, basic_string
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/component/component.hpp"
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
|
#include "ftxui/component/component.hpp" // for Radiobox
|
||||||
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::Return, Event::ArrowDown, Event::ArrowUp, Event::Tab, Event::TabReverse
|
#include "ftxui/component/event.hpp" // for Event, Event::Return, Event::ArrowDown, Event::ArrowUp, Event::Tab, Event::TabReverse
|
||||||
#include "ftxui/component/mouse.hpp" // for ftxui
|
|
||||||
#include "gtest/gtest_pred_impl.h" // for EXPECT_EQ, Test, TEST
|
#include "gtest/gtest_pred_impl.h" // for EXPECT_EQ, Test, TEST
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight
|
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed, Mouse::Released
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed, Mouse::Released
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component
|
#include "ftxui/component/screen_interactive.hpp" // for Component
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, text, color, operator|, xflex, gauge, dim, hbox, reflect, underlined, vcenter
|
#include "ftxui/dom/elements.hpp" // for operator|, text, Element, reflect, xflex, gauge, hbox, underlined, color, dim, vcenter
|
||||||
#include "ftxui/screen/box.hpp" // for Box
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::GrayDark, Color::GrayLight
|
#include "ftxui/screen/color.hpp" // for Color, Color::GrayDark, Color::GrayLight
|
||||||
#include "ftxui/screen/string.hpp" // for StringRef
|
#include "ftxui/util/ref.hpp" // for StringRef
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
#include <stddef.h> // for size_t
|
#include <stddef.h> // for size_t
|
||||||
#include <algorithm> // for max, min
|
#include <algorithm> // for max, min
|
||||||
#include <memory> // for shared_ptr, allocator_traits<>::value_type
|
#include <functional> // for function
|
||||||
#include <utility> // for move
|
#include <memory> // for shared_ptr, allocator_traits<>::value_type
|
||||||
|
#include <string> // for wstring
|
||||||
|
#include <utility> // for move
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||||
#include "ftxui/component/component.hpp" // for Mouse, Mouse::Left, Mouse::Pressed
|
#include "ftxui/component/component.hpp" // for Make, Component, Toggle
|
||||||
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for ToggleOption
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Return, Event::Tab, Event::TabReverse
|
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Return, Event::Tab, Event::TabReverse
|
||||||
#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/elements.hpp" // for operator|, Element, Elements, hbox, reflect, separator, text, focus, nothing, select
|
||||||
|
#include "ftxui/screen/box.hpp" // for Box
|
||||||
|
#include "ftxui/util/ref.hpp" // for Ref
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
@ -49,7 +57,7 @@ class ToggleBase : public ComponentBase {
|
|||||||
return hbox(std::move(children));
|
return hbox(std::move(children));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OnEvent(Event event) override{
|
bool OnEvent(Event event) override {
|
||||||
if (event.is_mouse())
|
if (event.is_mouse())
|
||||||
return OnMouseEvent(event);
|
return OnMouseEvent(event);
|
||||||
|
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
#include <gtest/gtest-message.h> // for Message
|
#include <gtest/gtest-message.h> // for Message
|
||||||
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl
|
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl
|
||||||
#include <memory> // for __shared_ptr_access, shared_ptr
|
#include <functional> // for function
|
||||||
|
#include <memory> // for __shared_ptr_access, shared_ptr, allocator
|
||||||
|
#include <string> // for wstring, basic_string
|
||||||
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "ftxui/component/component.hpp"
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
|
#include "ftxui/component/component.hpp" // for Toggle
|
||||||
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
|
#include "ftxui/component/component_options.hpp" // for ToggleOption
|
||||||
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Return, Event::Tab, Event::TabReverse
|
#include "ftxui/component/event.hpp" // for Event, Event::ArrowLeft, Event::ArrowRight, Event::Return, Event::Tab, Event::TabReverse
|
||||||
#include "ftxui/component/mouse.hpp" // for ftxui
|
|
||||||
#include "gtest/gtest_pred_impl.h" // for AssertionResult, EXPECT_EQ, Test, EXPECT_TRUE, EXPECT_FALSE, TEST
|
#include "gtest/gtest_pred_impl.h" // for AssertionResult, EXPECT_EQ, Test, EXPECT_TRUE, EXPECT_FALSE, TEST
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <codecvt> // for codecvt_utf8_utf16
|
#include <codecvt> // for codecvt_utf8_utf16
|
||||||
#include <locale> // for wstring_convert
|
#include <locale> // for wstring_convert
|
||||||
#include <utility> // for move
|
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
Loading…
Reference in New Issue
Block a user