aboutsummaryrefslogtreecommitdiff
path: root/include/gui/Page.hpp
blob: 1435e68e4d5ea4a0e3d382378ee176d644c3f4d9 (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
25
26
27
#pragma once

#include <vector>
#include <memory>

namespace mgl {
    class Event;
    class Window;
}

namespace gsr {
    class Widget;

    class Page {
    public:
        Page() = default;
        Page(const Page&) = delete;
        Page& operator=(const Page&) = delete;

        void add_widget(std::unique_ptr<Widget> widget);

        void on_event(mgl::Event &event, mgl::Window &window);
        void draw(mgl::Window &window);
    private:
        std::vector<std::unique_ptr<Widget>> widgets;
    };
}