mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-07-13 06:01:14 +08:00
Apply IWYU
This commit is contained in:
parent
5ff0764e77
commit
07a390ee63
@ -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, [&] {
|
||||||
|
@ -76,7 +76,7 @@ Component Radiobox(ConstStringListRef entries,
|
|||||||
|
|
||||||
Component Dropdown(ConstStringListRef entries, int* selected);
|
Component Dropdown(ConstStringListRef entries, int* selected);
|
||||||
Component Dropdown(DropdownOption options);
|
Component Dropdown(DropdownOption options);
|
||||||
|
|
||||||
Component Toggle(ConstStringListRef entries, int* selected);
|
Component Toggle(ConstStringListRef entries, int* selected);
|
||||||
|
|
||||||
// General slider constructor:
|
// General slider constructor:
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user