Code::Blocks
SVN r11506
include
cbcolourmanager.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3
* http://www.gnu.org/licenses/lgpl-3.0.html
4
*/
5
#ifndef X_COLOURMANAGER_H
6
#define X_COLOURMANAGER_H
7
8
#include <map>
9
#include <
wx/colour.h
>
10
#include <
wx/string.h
>
11
12
#include "
manager.h
"
13
14
class
DLLIMPORT
ColourManager
:
public
Mgr
<ColourManager>
15
{
16
friend
class
Mgr
<
ColourManager
>;
17
friend
class
Manager
;
18
public
:
19
void
Load();
20
void
Save();
21
void
RegisterColour(
const
wxString
&category,
const
wxString
&name,
22
const
wxString
&
id
,
const
wxColour
&defaultColour);
23
wxColour
GetColour(
const
wxString
&
id
)
const
;
24
void
SetColour(
const
wxString
&
id
,
const
wxColour
&colour);
25
public
:
26
struct
ColourDef
27
{
28
wxString
category,
name
;
29
wxColour
value
, defaultValue;
30
31
bool
IsValid
()
const
32
{
33
return
!name.
empty
() && !category.
empty
();
34
}
35
};
36
typedef
std::map<wxString, ColourDef>
ColourDefMap
;
37
38
const
ColourDefMap& GetColourDefinitions()
const
;
39
private
:
40
ColourDefMap
m_colours
;
41
};
42
43
#endif // X_COLOURMANAGER_H
44
45
manager.h
string.h
Manager
Definition:
manager.h:48
wxString::empty
bool empty() const
DLLIMPORT
#define DLLIMPORT
Definition:
settings.h:16
ColourManager::ColourDef::name
wxString name
Definition:
cbcolourmanager.h:28
ColourManager::ColourDef::IsValid
bool IsValid() const
Definition:
cbcolourmanager.h:31
colour.h
wxString
ColourManager::m_colours
ColourDefMap m_colours
Definition:
cbcolourmanager.h:40
wxColour
ColourManager
Definition:
cbcolourmanager.h:14
Mgr
Definition:
manager.h:183
ColourManager::ColourDef
Definition:
cbcolourmanager.h:26
ColourManager::ColourDef::value
wxColour value
Definition:
cbcolourmanager.h:29
ColourManager::ColourDefMap
std::map< wxString, ColourDef > ColourDefMap
Definition:
cbcolourmanager.h:36
Generated by
1.8.13