LexerConf::Ptr_t ColoursAndFontsManager::CopyTheme(const wxString& lexerName, const wxString& themeName, const wxString& sourceTheme) { LexerConf::Ptr_t sourceLexer = GetLexer(lexerName, sourceTheme); CHECK_PTR_RET_NULL(sourceLexer); JSONElement json = sourceLexer->ToJSON(); LexerConf::Ptr_t newLexer(new LexerConf()); newLexer->FromJSON(json); // Update the theme name newLexer->SetThemeName(themeName); // Add it return DoAddLexer(newLexer->ToJSON()); }
void ColoursAndFontsManager::AddLexer(LexerConf::Ptr_t lexer) { CHECK_PTR_RET(lexer); DoAddLexer(lexer->ToJSON()); }