aboutsummaryrefslogtreecommitdiff
path: root/include/gui/List.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui/List.hpp')
-rw-r--r--include/gui/List.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/gui/List.hpp b/include/gui/List.hpp
index 8c4e1fc..0b1350c 100644
--- a/include/gui/List.hpp
+++ b/include/gui/List.hpp
@@ -25,10 +25,19 @@ namespace gsr {
bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override;
void draw(mgl::Window &window, mgl::vec2f offset) override;
+ //void remove_child_widget(Widget *widget) override;
+
void add_widget(std::unique_ptr<Widget> widget);
+ void remove_widget(Widget *widget);
+
mgl::vec2f get_size() override;
+ private:
+ void update();
+ void remove_widget_immediate(Widget *widget);
protected:
std::vector<std::unique_ptr<Widget>> widgets;
+ std::vector<std::unique_ptr<Widget>> add_queue;
+ std::vector<Widget*> remove_queue;
Orientation orientation;
Alignment content_alignment;
};