mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
Execute IWYU and format.
This commit is contained in:
parent
91c5954fe2
commit
20a05e99ca
@ -29,13 +29,13 @@
|
||||
@example ./examples/component/checkbox.cpp
|
||||
@example ./examples/component/checkbox_in_frame.cpp
|
||||
@example ./examples/component/menu2.cpp
|
||||
@example ./examples/component/resizable_split.cpp
|
||||
@example ./examples/component/tab_horizontal.cpp
|
||||
@example ./examples/component/slider.cpp
|
||||
@example ./examples/component/slider_rgb.cpp
|
||||
@example ./examples/component/input.cpp
|
||||
@example ./examples/component/homescreen.cpp
|
||||
@example ./examples/component/radiobox.cpp
|
||||
@example ./examples/component/resizable_split.cpp
|
||||
@example ./examples/component/slider_rgb.cpp
|
||||
@example ./examples/component/menu.cpp
|
||||
@example ./examples/component/menu_style.cpp
|
||||
@example ./examples/component/radiobox_in_frame.cpp
|
||||
|
@ -1,5 +1,10 @@
|
||||
#include "ftxui/component/component.hpp" // for Slider
|
||||
#include <memory> // for shared_ptr, allocator, __shared_ptr_access
|
||||
|
||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||
#include "ftxui/component/component.hpp" // for Renderer, ResizableSplitBottom, ResizableSplitLeft, ResizableSplitRight, ResizableSplitTop
|
||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||
#include "ftxui/dom/elements.hpp" // for Element, operator|, text, center, border
|
||||
|
||||
using namespace ftxui;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef FTXUI_COMPONENT_RECEIVER_HPP_
|
||||
#define FTXUI_COMPONENT_RECEIVER_HPP_
|
||||
|
||||
#include <algorithm> // for copy, max
|
||||
#include <algorithm> // for copy
|
||||
#include <atomic> // for atomic, __atomic_base
|
||||
#include <condition_variable> // for condition_variable
|
||||
#include <functional>
|
||||
|
@ -1,9 +1,8 @@
|
||||
#include <gtest/gtest-message.h> // for Message
|
||||
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver, TestFactoryImpl
|
||||
#include <memory> // for __shared_ptr_access, shared_ptr, allocator
|
||||
#include <gtest/gtest.h> // for Test, SuiteApiResolver, TestInfo (ptr only), TEST, TestFactoryImpl
|
||||
#include <memory> // for shared_ptr, allocator, make_shared, __shared_ptr_access
|
||||
|
||||
#include "ftxui/component/component_base.hpp"
|
||||
#include "gtest/gtest_pred_impl.h" // for AssertionResult, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, Test, TEST
|
||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||
#include "ftxui/component/component_base.hpp" // for ComponentBase, Component
|
||||
|
||||
using namespace ftxui;
|
||||
|
||||
|
@ -1,8 +1,13 @@
|
||||
#include <memory> // for __shared_ptr_access
|
||||
#include <utility> // for move
|
||||
|
||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||
#include "ftxui/component/component.hpp"
|
||||
#include "ftxui/component/component_base.hpp"
|
||||
#include "ftxui/component/event.hpp"
|
||||
#include "ftxui/dom/elements.hpp"
|
||||
#include "ftxui/component/component.hpp" // for Component, Make, Horizontal, Vertical, ResizableSplitBottom, ResizableSplitLeft, ResizableSplitRight, ResizableSplitTop
|
||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||
#include "ftxui/component/event.hpp" // for Event
|
||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Pressed, Mouse::Released
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, reflect, Element, separator, size, EQUAL, xflex, yflex, hbox, vbox, HEIGHT, WIDTH
|
||||
#include "ftxui/screen/box.hpp" // for Box
|
||||
|
||||
namespace ftxui {
|
||||
namespace {
|
||||
@ -63,7 +68,7 @@ class ResizableSplitLeftBase : public ComponentBase {
|
||||
Box global_box_;
|
||||
};
|
||||
|
||||
class ResizableSplitRightBase: public ComponentBase {
|
||||
class ResizableSplitRightBase : public ComponentBase {
|
||||
public:
|
||||
ResizableSplitRightBase(Component main, Component child, int* main_size)
|
||||
: main_(main), child_(child), main_size_(main_size) {
|
||||
@ -119,7 +124,7 @@ class ResizableSplitRightBase: public ComponentBase {
|
||||
Box global_box_;
|
||||
};
|
||||
|
||||
class ResizableSplitTopBase: public ComponentBase {
|
||||
class ResizableSplitTopBase : public ComponentBase {
|
||||
public:
|
||||
ResizableSplitTopBase(Component main, Component child, int* main_size)
|
||||
: main_(main), child_(child), main_size_(main_size) {
|
||||
@ -175,7 +180,7 @@ class ResizableSplitTopBase: public ComponentBase {
|
||||
Box global_box_;
|
||||
};
|
||||
|
||||
class ResizableSplitBottomBase: public ComponentBase {
|
||||
class ResizableSplitBottomBase : public ComponentBase {
|
||||
public:
|
||||
ResizableSplitBottomBase(Component main, Component child, int* main_size)
|
||||
: main_(main), child_(child), main_size_(main_size) {
|
||||
@ -259,7 +264,8 @@ class ResizableSplitBottomBase: public ComponentBase {
|
||||
/// │
|
||||
/// ```
|
||||
Component ResizableSplitLeft(Component main, Component back, int* main_size) {
|
||||
return Make<ResizableSplitLeftBase>(std::move(main), std::move(back), main_size);
|
||||
return Make<ResizableSplitLeftBase>(std::move(main), std::move(back),
|
||||
main_size);
|
||||
}
|
||||
|
||||
/// @brief An horizontal split in between two components, configurable using the
|
||||
@ -318,7 +324,8 @@ Component ResizableSplitRight(Component main, Component back, int* main_size) {
|
||||
/// bottom
|
||||
/// ```
|
||||
Component ResizableSplitTop(Component main, Component back, int* main_size) {
|
||||
return Make<ResizableSplitTopBase>(std::move(main), std::move(back), main_size);
|
||||
return Make<ResizableSplitTopBase>(std::move(main), std::move(back),
|
||||
main_size);
|
||||
}
|
||||
|
||||
/// @brief An vertical split in between two components, configurable using the
|
||||
@ -347,6 +354,11 @@ Component ResizableSplitTop(Component main, Component back, int* main_size) {
|
||||
/// bottom
|
||||
/// ```
|
||||
Component ResizableSplitBottom(Component main, Component back, int* main_size) {
|
||||
return Make<ResizableSplitBottomBase>(std::move(main), std::move(back), main_size);
|
||||
return Make<ResizableSplitBottomBase>(std::move(main), std::move(back),
|
||||
main_size);
|
||||
}
|
||||
} // namespace ftxui
|
||||
|
||||
// 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.
|
||||
|
@ -118,7 +118,7 @@ TerminalInputParser::Output TerminalInputParser::ParseUTF8() {
|
||||
|
||||
// Find the first zero in the first byte.
|
||||
int first_zero = 8;
|
||||
for(int i = 0; i<8; ++i) {
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
mask |= selector;
|
||||
if (head & selector) {
|
||||
selector >>= 1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
//#include "ftxui/component/event.hpp"
|
||||
//#include "ftxui/component/receiver.hpp"
|
||||
#include "ftxui/component/terminal_input_parser.hpp"
|
||||
#include <vector>
|
||||
#include "ftxui/component/terminal_input_parser.hpp"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
|
||||
using namespace ftxui;
|
||||
@ -17,3 +17,7 @@ extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) {
|
||||
;
|
||||
return 0; // Non-zero return values are reserved for future use.
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
Loading…
Reference in New Issue
Block a user