summaryrefslogtreecommitdiff
path: root/ui/windowContent.h
blob: 474445aafca65b15146f014d514a98127725719b (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
#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;
};