diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-07-02 18:20:22 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-07-02 18:20:22 +0100 |
commit | 9d6d2c0eb21b6295b2668c23f0ef386d5827a83f (patch) | |
tree | ec4bedce6f3a695aa75412f30259e0f791f46f82 /ui/windowContent.h | |
parent | Add an InstanceVertices partition perf test (diff) | |
parent | Build ImGui as a static library (diff) | |
download | ilt-9d6d2c0eb21b6295b2668c23f0ef386d5827a83f.tar.bz2 ilt-9d6d2c0eb21b6295b2668c23f0ef386d5827a83f.tar.xz ilt-9d6d2c0eb21b6295b2668c23f0ef386d5827a83f.zip |
Psycho-rebased branch imgui on top of main
Diffstat (limited to 'ui/windowContent.h')
-rw-r--r-- | ui/windowContent.h | 26 |
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; +}; |