-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathwindow.hpp
38 lines (27 loc) · 987 Bytes
/
window.hpp
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
#pragma once
#include "native.hpp"
#include "basic_types.hpp"
#include "image_drawer.hpp"
#include "message_controller.hpp"
#include <memory>
#include <string>
namespace firefly
{
class system_button;
class window : public message_controller
{
public:
window(HINSTANCE hinstance, std::string const& class_name, std::string const& window_name, char* icon_resource, rectangle& rect, bool show_in_taskbar = true, bool can_minimize = true, HWND hwnd_parent = NULL);
~window();
void start(bool animate);
private:
bool register_class(std::string const& class_name, char* icon_resource);
bool create_window(std::string const& class_name, std::string const& window_name, rectangle& rect, bool show_in_taskbar, HWND hwnd_parent);
void set_default_message_handlers();
void create_controls(rectangle& rect, bool can_minimize);
private:
HBRUSH background_brush;
std::unique_ptr<system_button> minimize_button;
std::unique_ptr<system_button> close_button;
};
}