diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-02 10:07:25 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-02 10:07:25 -0400 |
commit | 9f25878acfe1c7281a96f83742349516510c5b6d (patch) | |
tree | d68daca94d65ac97fe9ac0a87fb0a3f95f4b6fea /area_window.h | |
parent | 531898b0fef9f81e82ad5d5f38d2c627a0c10e56 (diff) | |
download | lingo-ap-tracker-9f25878acfe1c7281a96f83742349516510c5b6d.tar.gz lingo-ap-tracker-9f25878acfe1c7281a96f83742349516510c5b6d.tar.bz2 lingo-ap-tracker-9f25878acfe1c7281a96f83742349516510c5b6d.zip |
Added areas to map
Diffstat (limited to 'area_window.h')
-rw-r--r-- | area_window.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/area_window.h b/area_window.h new file mode 100644 index 0000000..0806da4 --- /dev/null +++ b/area_window.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef AREA_WINDOW_H_C2653ACF | ||
2 | #define AREA_WINDOW_H_C2653ACF | ||
3 | |||
4 | #include <wx/wxprec.h> | ||
5 | |||
6 | #ifndef WX_PRECOMP | ||
7 | #include <wx/wx.h> | ||
8 | #endif | ||
9 | |||
10 | class AreaWindow : public wxWindow { | ||
11 | public: | ||
12 | static constexpr int ACTUAL_SIZE = 64; | ||
13 | static constexpr int BORDER_SIZE = 5; | ||
14 | static constexpr int EFFECTIVE_SIZE = ACTUAL_SIZE + BORDER_SIZE * 2; | ||
15 | |||
16 | AreaWindow(wxWindow* parent, int area_id); | ||
17 | |||
18 | int GetAreaId() const { return area_id_; } | ||
19 | |||
20 | private: | ||
21 | void OnPaint(wxPaintEvent& event); | ||
22 | void OnEnterWindow(wxMouseEvent& event); | ||
23 | |||
24 | void Redraw(); | ||
25 | |||
26 | int area_id_; | ||
27 | wxBitmap rendered_; | ||
28 | }; | ||
29 | |||
30 | #endif /* end of include guard: AREA_WINDOW_H_C2653ACF */ | ||