aboutsummaryrefslogtreecommitdiff
path: root/src/gui/Page.cpp
blob: ae13d826d89137656eb3aebf4bf0cb56a22204bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "../../include/gui/Page.hpp"

namespace gsr {
    // void Page::remove_child_widget(Widget *widget) {
    //     for(auto it = widgets.begin(), end = widgets.end(); it != end; ++it) {
    //         if(it->get() == widget) {
    //             widgets.erase(it);
    //             return;
    //         }
    //     }
    // }

    void Page::add_widget(std::unique_ptr<Widget> widget) {
        widget->parent_widget = this;
        widgets.push_back(std::move(widget));
    }
}