mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-07-12 21:51:13 +08:00
Apply IWYU
This commit is contained in:
parent
5ff0764e77
commit
07a390ee63
@ -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, [&] {
|
||||
|
@ -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:
|
||||
|
@ -148,7 +148,6 @@ struct CheckboxOption {
|
||||
std::function<void()> on_change = [] {};
|
||||
};
|
||||
|
||||
|
||||
/// @brief Used to define style for the Input component.
|
||||
struct InputState {
|
||||
Element element;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user