void EditorManager::nameChanged(EventArgs& args) { EditorEventArgs eea = dynamic_cast<EditorEventArgs&>(args); EditorBase* editor = eea.getEditor(); if(mEditorIndexMap.find(editor) != mEditorIndexMap.end()) { int index = mEditorIndexMap[editor]; mEditorNotebook->SetPageText(index, editor->getName()); } }
EditorBase* EditorManager::findEditor(const wxString& name) { EditorList::iterator it; EditorBase* editor = NULL; for(it = mEditors.begin(); it != mEditors.end(); ++it) { editor = (*it); if(editor->getName() == name) return editor; } return NULL; }