I can't seem to find the solution by myself. How do I access a color setting in 'default.conf' through code? Say I want to access 'editor/colour_sets/default/cc/'->default background color. I've tried this:
ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("editor"));
wxString key = _T("/colour_sets/default/cc");
wxColour back = cfg->ReadColour(key + _T("/default/back"));
and numerous variations of that to no avail. I always read a black color (0, 0, 0) which I think is the default return value. Can someone please show me the way to do it? Or better yet how can I access settings the editor currently uses?
Another try:
EditorColourSet* ecs = Manager::Get()->GetEditorManager()->GetColourSet();
HighlightLanguage hl = ecs->GetHighlightLanguage(wxSCI_LEX_CPP);
Code above gives me the 'HighlightLanguage' for 'Ogre compositor script'!? What am I missing here?
EditorColourSet* ecs = Manager::Get()->GetEditorManager()->GetColourSet();
HighlightLanguage hl = ecs->GetHighlightLanguage(wxT("C/C++"));
or
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
HighlightLanguage hl = ed->GetLanguage();
then
OptionColour* col = ecs->GetOptionByIndex(hl, 0); // or GetOptionByName(hl, wxT("String"))
// col->fore
// col->back
You can clone it to access the html offline.
git clone https://github.com/alpha0010/cb-docs.git
I will try building a pdf later.