-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.h
More file actions
46 lines (36 loc) · 1.22 KB
/
application.h
File metadata and controls
46 lines (36 loc) · 1.22 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef WINDOWMANAGER_APPLICATION_H
#define WINDOWMANAGER_APPLICATION_H
#include <queue>
#include <list>
#include "config.h"
#include "windows/windows.h"
#include "events/eventQueue.h"
#include "primitives/primitives.h"
#include "windows/sliderPointer.h"
enum AppMode {
fullscreen
};
class Application: public Window {
private:
bool appOpen = false;
Engine engineApp;
Color backgroundColor;
std::list<Window*> windowsList;
SystemEventSender systemEventSender;
public:
Application(int width, int height, const char* appName);
Application(const char* appName, AppMode appMode);
SystemEventSender* getSystemEventManager();
void setBackgroundColor(unsigned char r, unsigned char g, unsigned char b, unsigned char alpha = 255);
void setBackgroundColor(const Color& color);
void close();
void run();
void addDrawableObject(Window* drawableObject);
void loadImageFromFile(const std::string_view& path,
const std::string& name);
void loadFontFromFile(const std::string_view& path,
const std::string& name);
void getEvent(std::unique_ptr<Event>& event) override;
void savePixels(std::unique_ptr<Event>& event);
};
#endif