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 {
12 };
13 
14 namespace Fling
15 {
17  struct WindowProps
18  {
19  UINT32 m_Width = 800;
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 
87 
90  };
91 } // namespace Fling
UINT32 m_Height
Definition: FlingWindow.h:20
UINT32 m_Width
Definition: FlingWindow.h:19
Window creation data.
Definition: FlingWindow.h:17
Base class that represents a window to the Fling Engine.
Definition: FlingWindow.h:27
std::string m_Title
Definition: FlingWindow.h:21
WindowMode
Definition: FlingWindow.h:7
Definition: FlingWindow.h:10
Definition: FlingWindow.h:9
entt::hashed_string Guid
Definition: FlingTypes.h:26
Class that removes the copy operator and constructor.
Definition: NonCopyable.hpp:10
Definition: FlingWindow.h:11
uint32_t UINT32
Definition: FlingTypes.h:13
Definition: Engine.h:29