summaryrefslogtreecommitdiff
path: root/ui/windowContent.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-06-15 15:28:53 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-06-15 15:28:53 +0100
commit02c3f1fd622bb5b4da1462c5bb507a4a541447d5 (patch)
tree8db9ad8cc755cdab17d11a97309b3b147c576964 /ui/windowContent.h
parentAdd imgui init and shutdown to appbase and gamemainwindow (diff)
downloadilt-02c3f1fd622bb5b4da1462c5bb507a4a541447d5.tar.bz2
ilt-02c3f1fd622bb5b4da1462c5bb507a4a541447d5.tar.xz
ilt-02c3f1fd622bb5b4da1462c5bb507a4a541447d5.zip
First cut reshuffling app/window/gl/render bits
Diffstat (limited to 'ui/windowContent.h')
-rw-r--r--ui/windowContent.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/windowContent.h b/ui/windowContent.h
new file mode 100644
index 0000000..474445a
--- /dev/null
+++ b/ui/windowContent.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "chronology.h"
+#include "collection.h"
+#include "gfx/gl/uiShader.h"
+#include "special_members.h"
+#include "stdTypeDefs.h"
+#include "uiComponent.h" // IWYU pragma: keep
+#include <functional>
+
+class WindowContent : public StdTypeDefs<WindowContent> {
+public:
+ using Factory = std::function<Ptr(size_t width, size_t height)>;
+ WindowContent(size_t width, size_t height);
+ virtual ~WindowContent() = default;
+ NO_MOVE(WindowContent);
+ NO_COPY(WindowContent);
+
+ virtual void tick(TickDuration);
+ virtual void render() const = 0;
+ virtual bool handleInput(const SDL_Event & e);
+
+protected:
+ ::Collection<UIComponent> uiComponents;
+ UIShader uiShader;
+};