-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolormanager.h
executable file
·57 lines (42 loc) · 1.09 KB
/
colormanager.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
#ifndef _COLOR_MANAGER_
#define _COLOR_MANAGER_
#include "predef.h"
#include "ini.h"
#include "stringutil.h"
#include "xml/xml.h"
//////////////////////////////////////////////////////////////////////////
#define SYSTEM_COLOR 0
#define EXT_COLOR 1
//////////////////////////////////////////////////////////////////////////
class ColorManager
{
private :
static ColorManager* instance;
ColorManager();
~ColorManager();
public:
static ColorManager *GetInstance()
{
if (instance == NULL)
instance = new ColorManager;
return instance;
}
bool ExistColor(int type, String tag);
unsigned long GetColor(int type, String tag);
void SetColor(int type, String tag, unsigned long color);
void RemoveColor(int type, String tag);
std::map<String, unsigned long> GetAlltable(int type)
{
if( type == SYSTEM_COLOR )
return systemtable;
else
return extcolortable;
}
bool SaveXML();
private :
std::map<String, unsigned long> systemtable;
std::map<String, unsigned long> extcolortable;
CXml xml;
CXmlNode* rootnode;
};
#endif