aboutsummaryrefslogtreecommitdiff
path: root/include/gui/Page.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui/Page.hpp')
-rw-r--r--include/gui/Page.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/gui/Page.hpp b/include/gui/Page.hpp
new file mode 100644
index 0000000..1435e68
--- /dev/null
+++ b/include/gui/Page.hpp
@@ -0,0 +1,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;
+ };
+} \ No newline at end of file