| Fling Engine 0.00.1 Fling Engine is a game engine written in Vulkan

FlingWindow.h
Go to the documentation of this file.
1 #pragma once
2
3 #include "pch.h"
4 #include "FlingTypes.h"
5 #include "NonCopyable.hpp"
6
7 enum WindowMode
8 {
9 Fullscreen,
10 Windowed,
11 BorderlessWindowed
12 };
13
14 namespace Fling
15 {
17 struct WindowProps
18 {
19 UINT32 m_Width = 800;
20 UINT32 m_Height = 600;
21 std::string m_Title = "Fling Engine";
22 };
23
27 class FlingWindow : public NonCopyable
28 {
29 public:
30
32 static FlingWindow* Create(const WindowProps& t_Props);
33
34 virtual ~FlingWindow() = default;
35
37 virtual void Update() = 0;
38
40 virtual void CreateSurface(void* t_GraphicsInstance, void* t_SurfData) = 0;
41
43 virtual void RecreateSwapChain() = 0;
44
46 virtual UINT32 GetWidth() const = 0;
47
49 virtual UINT32 GetHeight() const = 0;
50
52 virtual float GetAspectRatio() const = 0;
53
55 virtual int ShouldClose() = 0;
56
58 virtual void SetMouseVisible(bool t_IsVisible) = 0;
59
61 virtual bool GetMouseVisible() = 0;
62
67 virtual void SetWindowIcon(Guid t_ID) = 0;
68
73 virtual bool IsMinimized() const = 0;
74
76 virtual void SetWindowMode(WindowMode t_WindowMode) = 0;
77
79 virtual WindowMode GetWindowMode() = 0;
80
81 protected:
83 bool m_IsMouseVisible = true;
84
86 WindowMode m_WindowMode = WindowMode::Windowed;
87
90 };
91 } // namespace Fling
Fling::WindowProps::m_Height
UINT32 m_Height
Definition: FlingWindow.h:20
Fling::WindowProps::m_Width
UINT32 m_Width
Definition: FlingWindow.h:19
Fling::WindowProps
Window creation data.
Definition: FlingWindow.h:17
Fling::FlingWindow
Base class that represents a window to the Fling Engine.
Definition: FlingWindow.h:27
Fling::WindowProps::m_Title
std::string m_Title
Definition: FlingWindow.h:21
WindowMode
WindowMode
Definition: FlingWindow.h:7
Windowed
Definition: FlingWindow.h:10
Fullscreen
Definition: FlingWindow.h:9
NonCopyable.hpp
pch.h
Fling::Guid
entt::hashed_string Guid
Definition: FlingTypes.h:26
Fling::NonCopyable
Class that removes the copy operator and constructor.
Definition: NonCopyable.hpp:10
BorderlessWindowed
Definition: FlingWindow.h:11
UINT32
uint32_t UINT32
Definition: FlingTypes.h:13
Fling
Definition: Engine.h:29
FlingTypes.h