Hana
Loading...
Searching...
No Matches
Application.h
1#pragma once
2
3#include "Hana/Core/Core.h"
4
5#include "Hana/Core/Window.h"
6#include "Hana/Core/LayerStack.h"
7#include "Hana/Events/Event.h"
8#include "Hana/Events/ApplicationEvent.h"
9
10#include "Hana/Core/Timestep.h"
11
12#include "Hana/ImGui/ImGuiLayer.h"
13
14namespace Hana
15{
16 class Application
17 {
18 public:
19 Application();
20 virtual ~Application();
21
22 void Run();
23
24 void OnEvent(Event& e);
25
26 void PushLayer(Layer* layer);
27 void PushOverlay(Layer* layer);
28
29 inline Window& GetWindow() { return *m_Window; }
30
31 inline static Application& Get() { return *s_Instance; }
32 private:
33 bool OnWindowClose(WindowCloseEvent& e);
34 bool OnWindowResize(WindowResizeEvent& e);
35
36 std::unique_ptr<Window> m_Window;
37 ImGuiLayer* m_ImGuiLayer;
38 bool m_Running = true;
39 bool m_Minimized = false;
40 LayerStack m_LayerStack;
41 float m_LastFrameTime = 0.0f;
42 private:
43 static Application* s_Instance;
44 };
45
46 // To be defined in the client
47 Application* CreateApplication();
48}
Definition Application.h:17
Definition Event.h:39
Definition ImGuiLayer.h:12
Definition LayerStack.h:11
Definition Layer.h:10
Definition ApplicationEvent.h:30
Definition ApplicationEvent.h:8
Definition Window.h:26