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());
auto main_container = Container::Vertical({
Container::Horizontal({
tab_selection,
exit_button,
}),
tab_content,
Container::Horizontal({
tab_selection,
exit_button,
}),
tab_content,
});
auto main_renderer = Renderer(main_container, [&] {

View File

@ -76,7 +76,7 @@ Component Radiobox(ConstStringListRef entries,
Component Dropdown(ConstStringListRef entries, int* selected);
Component Dropdown(DropdownOption options);
Component Toggle(ConstStringListRef entries, int* selected);
// General slider constructor:

View File

@ -148,7 +148,6 @@ struct CheckboxOption {
std::function<void()> on_change = [] {};
};
/// @brief Used to define style for the Input component.
struct InputState {
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
// of invoking it immediately.
on_click(); // May delete this.
on_click(); // May delete this.
}
bool OnEvent(Event event) override {
@ -113,7 +113,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
}
if (event == Event::Return) {
OnClick(); // May delete this.
OnClick(); // May delete this.
return true;
}
return false;
@ -130,7 +130,7 @@ class ButtonBase : public ComponentBase, public ButtonOption {
if (event.mouse().button == Mouse::Left &&
event.mouse().motion == Mouse::Pressed) {
TakeFocus();
OnClick(); // May delete this.
OnClick(); // May delete this.
return true;
}

View File

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