Use IWYU.

This commit is contained in:
ArthurSonzogni
2021-05-01 20:40:35 +02:00
parent eb399d20c5
commit 155758c073
119 changed files with 770 additions and 342 deletions

View File

@@ -1,7 +1,12 @@
#include "ftxui/component/toggle.hpp"
#include "ftxui/component/screen_interactive.hpp"
#include <stddef.h> // for size_t
#include <algorithm> // for max, min
#include <memory> // for shared_ptr, alloca...
#include <utility> // for move
#include <algorithm>
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
#include "ftxui/component/toggle.hpp"
namespace ftxui {
@@ -60,7 +65,7 @@ bool Toggle::OnEvent(Event event) {
}
bool Toggle::OnMouseEvent(Event event) {
if (!event.screen()->CaptureMouse())
if (!CaptureMouse(event))
return false;
for (int i = 0; i < boxes_.size(); ++i) {
if (!boxes_[i].Contain(event.mouse().x, event.mouse().y))