Apply IWYU

This commit is contained in:
ArthurSonzogni 2024-04-06 17:44:40 +02:00
parent 5ff0764e77
commit 07a390ee63
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C
5 changed files with 13 additions and 14 deletions

View File

@ -494,11 +494,11 @@ int main() {
"Exit", [&] { screen.Exit(); }, ButtonOption::Animated()); "Exit", [&] { screen.Exit(); }, ButtonOption::Animated());
auto main_container = Container::Vertical({ auto main_container = Container::Vertical({
Container::Horizontal({ Container::Horizontal({
tab_selection, tab_selection,
exit_button, exit_button,
}), }),
tab_content, tab_content,
}); });
auto main_renderer = Renderer(main_container, [&] { auto main_renderer = Renderer(main_container, [&] {

View File

@ -148,7 +148,6 @@ struct CheckboxOption {
std::function<void()> on_change = [] {}; std::function<void()> on_change = [] {};
}; };
/// @brief Used to define style for the Input component. /// @brief Used to define style for the Input component.
struct InputState { struct InputState {
Element element; Element element;

View File

@ -104,7 +104,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
// TODO(arthursonzogni): Consider posting the task to the main loop, instead // TODO(arthursonzogni): Consider posting the task to the main loop, instead
// of invoking it immediately. // of invoking it immediately.
on_click(); // May delete this. on_click(); // May delete this.
} }
bool OnEvent(Event event) override { bool OnEvent(Event event) override {
@ -113,7 +113,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
} }
if (event == Event::Return) { if (event == Event::Return) {
OnClick(); // May delete this. OnClick(); // May delete this.
return true; return true;
} }
return false; return false;
@ -130,7 +130,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
if (event.mouse().button == Mouse::Left && if (event.mouse().button == Mouse::Left &&
event.mouse().motion == Mouse::Pressed) { event.mouse().motion == Mouse::Pressed) {
TakeFocus(); TakeFocus();
OnClick(); // May delete this. OnClick(); // May delete this.
return true; return true;
} }

View File

@ -848,13 +848,13 @@ void ScreenInteractive::Draw(Component component) {
reset_cursor_position.clear(); reset_cursor_position.clear();
if (dy != 0) { if (dy != 0) {
set_cursor_position += "\x1B[" + std::to_string(dy) + "A"; set_cursor_position += "\x1B[" + std::to_string(dy) + "A";
reset_cursor_position += "\x1B[" + std::to_string(dy) + "B"; reset_cursor_position += "\x1B[" + std::to_string(dy) + "B";
} }
if (dx != 0) { if (dx != 0) {
set_cursor_position += "\x1B[" + std::to_string(dx) + "D"; set_cursor_position += "\x1B[" + std::to_string(dx) + "D";
reset_cursor_position += "\x1B[" + std::to_string(dx) + "C"; reset_cursor_position += "\x1B[" + std::to_string(dx) + "C";
} }
if (cursor_.shape == Cursor::Hidden) { if (cursor_.shape == Cursor::Hidden) {