18 template<>
ColourManager* Mgr<ColourManager>::instance =
nullptr;
25 for (
size_t ii = 0; ii < colours.
GetCount(); ++ii)
27 const wxString &
id = colours[ii].Lower();
30 ColourDefMap::iterator it =
m_colours.find(
id);
32 it->second.value = colour;
36 def.
value = def.defaultValue = colour;
47 if (it->second.value != it->second.defaultValue)
48 config->
Write(
wxT(
"list/") + it->first, it->second.value);
50 config->
UnSet(
wxT(
"list/") + it->first);
58 ColourDefMap::iterator it =
m_colours.find(lowerID);
61 it->second.name = name;
62 it->second.category = category;
63 it->second.defaultValue = defaultColour;
77 ColourDefMap::const_iterator it =
m_colours.find(
id);
83 ColourDefMap::iterator it =
m_colours.find(
id);
85 it->second.value = colour;
ConfigManager * GetConfigManager(const wxString &name_space) const
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
void RegisterColour(const wxString &category, const wxString &name, const wxString &id, const wxColour &defaultColour)
wxColour ReadColour(const wxString &name, const wxColour &defaultVal= *wxBLACK)
void UnSet(const wxString &name)
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
wxColour GetColour(const wxString &id) const
const ColourDefMap & GetColourDefinitions() const
std::map< wxString, ColourDef > ColourDefMap
void SetColour(const wxString &id, const wxColour &colour)
wxArrayString EnumerateKeys(const wxString &path)