forked from vpinball/vpinball
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codeviewedit.h
68 lines (58 loc) · 2.14 KB
/
codeviewedit.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
#pragma once
//#define STYLE_SUBFUN 10
//#define STYLE_COMPONENTS 11
//#define STYLE_VPCORE 12
//#define STYLE_CURRENTWORD 13
enum WordType { eUnknown, eClass, eSub, eFunction, ePropGet, ePropLet, ePropSet, eDim, eConst };
class UserData
{
public:
string m_uniqueKey;
int m_lineNum; // Line No. Declaration
string m_keyName; // Name
WordType eTyping;
string m_uniqueParent;
vector<string> m_children; // Unique key
string m_description; // Brief Description
string m_comment;
UserData();
UserData(const int LineNo, const string &Desc, const string &Name, const WordType TypeIn);
~UserData() {}
};
bool FindOrInsertStringIntoAutolist(vector<string>* const ListIn, const string& strIn);
size_t FindOrInsertUD(vector<UserData>* const ListIn, const UserData& udIn);
int FindUD(vector<UserData>* const ListIn, string& strIn, vector<UserData>::iterator& UDiterOut, int& Pos);
int FindClosestUD(const vector<UserData>* const ListIn, const int CurrentLine, const int CurrentIdx);
int UDKeyIndex(const vector<UserData>* const ListIn, const string& strIn);
int UDIndex(const vector<UserData>* const ListIn, const string& strIn);
UserData GetUDfromUniqueKey(const vector<UserData>* const ListIn, const string& UniKey);
size_t GetUDPointerfromUniqueKey(const vector<UserData>* const ListIn, const string& UniKey);
// CodeViewer Preferences
class CVPreference
{
public:
LOGFONT m_logFont;
int m_pointSize;
COLORREF m_rgb;
int m_sciKeywordID;
int IDC_ChkBox_code;
int IDC_ColorBut_code;
int IDC_Font_code;
private:
string szRegName;
bool m_highlight;
public:
CVPreference(
const COLORREF crTextColor,
const bool bDisplay, const string& szRegistryName,
const int szScintillaKeyword, const int IDC_ChkBox,
const int IDC_ColorBut, const int IDC_Font);
~CVPreference() {}
void GetPrefsFromReg();
void SetPrefsToReg();
void SetCheckBox(const HWND hwndDlg);
void ReadCheckBox(const HWND hwndDlg);
void SetDefaultFont(const HWND hwndDlg);
int GetHeightFromPointSize(const HWND hwndDlg);
void ApplyPreferences(const HWND hwndScin, const CVPreference* DefaultPref);
};