-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCPopUpMenu.h
59 lines (54 loc) · 1.15 KB
/
CPopUpMenu.h
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
47
48
49
50
51
52
53
54
55
56
57
58
#pragma once
#include "SituPlugin.h"
#include "CSiTRadar.h"
#include <vector>
#include <map>
struct SPopUpElement
{
string m_text;
int m_isHeaderFooter;
bool m_hasArrow;
string m_function;
int m_width;
RECT elementRect;
SPopUpElement(string t, string function, int header, bool hasarrow) {
m_text = t;
m_isHeaderFooter = header;
m_hasArrow = hasarrow;
m_function = function;
m_width = 115;
}
SPopUpElement(string t, string function, int header, bool hasarrow, int width) {
m_text = t;
m_isHeaderFooter = header;
m_hasArrow = hasarrow;
m_function = function;
m_width = width;
}
};
class CPopUpMenu
{
public:
POINT m_origin;
vector<SPopUpElement> m_listElements{};
CFlightPlan* m_fp;
CRadarScreen* m_rad;
CDC* m_dc;
static RECT prevRect;
static RECT totalRect;
int m_width_;
CPopUpMenu(POINT p) {
m_origin = p;
}
CPopUpMenu(POINT p, CFlightPlan* fp, CRadarScreen* rad) {
m_origin = p;
m_fp = fp;
m_rad = rad;
m_dc = nullptr;
}
void drawPopUpMenu(CDC* dc);
void highlightSelection(CDC* dc, RECT rect);
void populateMenu();
void drawElement(SPopUpElement& element, POINT p);
void populateSecondaryMenu(string type);
};