aboutsummaryrefslogtreecommitdiff
path: root/include/gui/List.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-10 00:45:36 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-10 00:45:36 +0200
commit4ea5ada9050d22fcb7eed67a72358bce11c9b3df (patch)
treead5f1e5956d972ad7c6948d4ba2f753d47a4b315 /include/gui/List.hpp
parent1a49f86e9841035fe670f6b42a3c988f737267d2 (diff)
Settings page save settings, refactor
Diffstat (limited to 'include/gui/List.hpp')
-rw-r--r--include/gui/List.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/gui/List.hpp b/include/gui/List.hpp
index 0b1350c..426a66e 100644
--- a/include/gui/List.hpp
+++ b/include/gui/List.hpp
@@ -27,8 +27,14 @@ namespace gsr {
//void remove_child_widget(Widget *widget) override;
+ // Might not take effect immediately but at the next draw iteration if inside an event loop
void add_widget(std::unique_ptr<Widget> widget);
+ // Might not take effect immediately but at the next draw iteration if inside an event loop
void remove_widget(Widget *widget);
+ // Excludes widgets from queue
+ const std::vector<std::unique_ptr<Widget>>& get_child_widgets() const;
+ // Returns nullptr if index is invalid
+ Widget* get_child_widget_by_index(size_t index) const;
mgl::vec2f get_size() override;
private:
@@ -40,5 +46,6 @@ namespace gsr {
std::vector<Widget*> remove_queue;
Orientation orientation;
Alignment content_alignment;
+ bool inside_event_handler = false;
};
} \ No newline at end of file