-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCACList.h
81 lines (68 loc) · 1.56 KB
/
CACList.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#include <vector>
#include <string>
#include "SituPlugin.h"
#include "constants.h"
class CACListItemElement {
public:
static unsigned int m_list_item_element_IDs_;
int m_list_ID_{};
int m_list_element_ID{};
std::string m_list_element_text;
COLORREF m_list_item_color{};
RECT list_item_element_rect{};
int list_x_loc{ 0 };
CACListItemElement(int listElementType, std::string text) {
m_list_element_ID = m_list_item_element_IDs_;
m_list_item_element_IDs_++;
if (listElementType == LIST_ITEM_SIMPLE_STRING) {
m_list_element_text = text;
}
};
};
class CACListItem {
public:
static unsigned long m_list_IDs_;
POINT m_origin;
int m_list_ID_;
int m_list_item_line;
std::vector<CACListItemElement> m_list_elements_;
bool shifted;
int m_priority{ 0 };
RECT list_item_rect;
CACListItem();
// Simple string list overload: i.e. for message list;
CACListItem(std::string str) {
m_list_ID_ = m_list_IDs_;
m_list_elements_.push_back(CACListItemElement(LIST_ITEM_SIMPLE_STRING, str));
m_list_IDs_++;
}
void PopulateListItem() {
}
};
class CACList
{
public:
CDC* m_dc;
int m_listType;
POINT origin;
int m_list_ID;
bool m_has_arrow{ false };
bool m_collapsed{ false };
std::string m_header;
std::vector<CACListItem> m_list_items_;
CACList();
CACList(CDC* dc, int listType) {
m_dc = dc;
m_listType = listType;
}
void PopulatetList(std::vector<std::string> listContents) {
for (auto le : listContents) {
CACListItem li(le);
li.m_priority = 3;
li.m_origin = origin;
m_list_items_.push_back(li);
}
}
void DrawList();
};