diff options
Diffstat (limited to 'area_window.h')
-rw-r--r-- | area_window.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/area_window.h b/area_window.h index 0806da4..c9abc4c 100644 --- a/area_window.h +++ b/area_window.h | |||
@@ -7,24 +7,30 @@ | |||
7 | #include <wx/wx.h> | 7 | #include <wx/wx.h> |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #include "area_popup.h" | ||
11 | |||
10 | class AreaWindow : public wxWindow { | 12 | class AreaWindow : public wxWindow { |
11 | public: | 13 | public: |
12 | static constexpr int ACTUAL_SIZE = 64; | 14 | static constexpr int ACTUAL_SIZE = 64; |
13 | static constexpr int BORDER_SIZE = 5; | 15 | static constexpr int BORDER_SIZE = 5; |
14 | static constexpr int EFFECTIVE_SIZE = ACTUAL_SIZE + BORDER_SIZE * 2; | 16 | static constexpr int EFFECTIVE_SIZE = ACTUAL_SIZE + BORDER_SIZE * 2; |
15 | 17 | ||
16 | AreaWindow(wxWindow* parent, int area_id); | 18 | AreaWindow(wxWindow* parent, int area_id, AreaPopup* popup); |
17 | 19 | ||
18 | int GetAreaId() const { return area_id_; } | 20 | int GetAreaId() const { return area_id_; } |
19 | 21 | ||
22 | AreaPopup* GetPopup() { return popup_; } | ||
23 | |||
20 | private: | 24 | private: |
21 | void OnPaint(wxPaintEvent& event); | 25 | void OnPaint(wxPaintEvent& event); |
22 | void OnEnterWindow(wxMouseEvent& event); | 26 | void OnEnterWindow(wxMouseEvent& event); |
27 | void OnLeaveWindow(wxMouseEvent& event); | ||
23 | 28 | ||
24 | void Redraw(); | 29 | void Redraw(); |
25 | 30 | ||
26 | int area_id_; | 31 | int area_id_; |
27 | wxBitmap rendered_; | 32 | wxBitmap rendered_; |
33 | AreaPopup* popup_; | ||
28 | }; | 34 | }; |
29 | 35 | ||
30 | #endif /* end of include guard: AREA_WINDOW_H_C2653ACF */ | 36 | #endif /* end of include guard: AREA_WINDOW_H_C2653ACF */ |