aboutsummaryrefslogtreecommitdiff
path: root/include/gui/Page.hpp
blob: 0d8536a4a7bf5bb2b213e9dafee059a34e95097d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "Widget.hpp"
#include "../SafeVector.hpp"
#include <memory>

namespace gsr {
    class Page : public Widget {
    public:
        Page() = default;
        Page(const Page&) = delete;
        Page& operator=(const Page&) = delete;
        virtual ~Page() = default;

        virtual void on_navigate_to_page() {}
        virtual void on_navigate_away_from_page() {}

        //void remove_child_widget(Widget *widget) override;

        virtual void add_widget(std::unique_ptr<Widget> widget);
    protected:
        SafeVector<std::unique_ptr<Widget>> widgets;
    };
}