2020-04-15 02:03:56 +02:00
|
|
|
#pragma once
|
2023-10-26 18:37:29 +02:00
|
|
|
#include "Graphics/RenderTarget.h"
|
2024-06-09 12:20:04 +02:00
|
|
|
#include "View.h"
|
2020-04-15 02:03:56 +02:00
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
namespace Seele {
|
2021-11-01 20:25:16 +01:00
|
|
|
DECLARE_REF(WindowManager)
|
2020-04-15 02:03:56 +02:00
|
|
|
// The logical window, with the graphics proxy
|
2024-06-09 12:20:04 +02:00
|
|
|
class Window {
|
|
|
|
|
public:
|
2023-11-08 23:27:21 +01:00
|
|
|
Window(PWindowManager owner, Gfx::OWindow handle);
|
2020-04-15 02:03:56 +02:00
|
|
|
~Window();
|
|
|
|
|
void addView(PView view);
|
2023-12-28 21:42:18 +01:00
|
|
|
void pollInputs();
|
2022-04-15 23:45:44 +02:00
|
|
|
void render();
|
2020-04-15 02:03:56 +02:00
|
|
|
Gfx::PWindow getGfxHandle();
|
2020-10-29 02:22:01 +01:00
|
|
|
void setFocused(PView view);
|
2023-11-18 11:04:30 +01:00
|
|
|
void onResize(uint32 width, uint32 height);
|
2024-06-09 12:20:04 +02:00
|
|
|
constexpr bool isPaused() const { return gfxHandle->isPaused(); }
|
|
|
|
|
|
|
|
|
|
protected:
|
2021-11-01 20:25:16 +01:00
|
|
|
PWindowManager owner;
|
2022-04-15 23:45:44 +02:00
|
|
|
Array<PView> views;
|
2023-11-08 23:27:21 +01:00
|
|
|
Gfx::OWindow gfxHandle;
|
2020-04-15 02:03:56 +02:00
|
|
|
};
|
2021-04-01 16:40:14 +02:00
|
|
|
DEFINE_REF(Window)
|
2020-05-05 01:51:13 +02:00
|
|
|
} // namespace Seele
|