aboutsummaryrefslogtreecommitdiff
path: root/include/gui/List.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-04-14 11:38:52 +0200
committerdec05eba <dec05eba@protonmail.com>2025-04-14 11:38:52 +0200
commit0018788780d756dbf0d3a77f6b40b384183348f7 (patch)
tree63c8e5f5f0ffb60f85d500c35d4aa2d1d5c73e56 /include/gui/List.hpp
parente3e6c3c3b9485f5cdb375eec77b3ae0f1f8a4135 (diff)
Redesign audio to support multiple audio tracks explicitly
Diffstat (limited to 'include/gui/List.hpp')
-rw-r--r--include/gui/List.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/gui/List.hpp b/include/gui/List.hpp
index 72c5353..f79d165 100644
--- a/include/gui/List.hpp
+++ b/include/gui/List.hpp
@@ -21,19 +21,20 @@ namespace gsr {
List(Orientation orientation, Alignment content_alignment = Alignment::START);
List(const List&) = delete;
List& operator=(const List&) = delete;
+ virtual ~List() override;
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);
+ void replace_widget(Widget *widget, std::unique_ptr<Widget> new_widget);
void clear();
// Return true from |callback| to continue
void for_each_child_widget(std::function<bool(std::unique_ptr<Widget> &widget)> callback);
// Returns nullptr if index is invalid
Widget* get_child_widget_by_index(size_t index) const;
+ size_t get_num_children() const;
void set_spacing(float spacing);