Code::Blocks
SVN r11506
|
#include <editormanager.h>
Public Member Functions | |
EditorManager & | operator= (cb_unused const EditorManager &rhs) |
cbAuiNotebook * | GetNotebook () |
cbNotebookStack * | GetNotebookStack () |
void | DeleteNotebookStack () |
void | RebuildNotebookStack () |
void | RecreateOpenEditorStyles () |
int | GetEditorsCount () |
EditorBase * | IsOpen (const wxString &filename) |
cbEditor * | Open (const wxString &filename, int pos=0, ProjectFile *data=nullptr) |
cbEditor * | Open (LoaderBase *fileLdr, const wxString &filename, int pos=0, ProjectFile *data=nullptr) |
EditorBase * | GetEditor (int index) |
EditorBase * | GetEditor (const wxString &filename) |
EditorBase * | GetActiveEditor () |
cbEditor * | GetBuiltinEditor (EditorBase *eb) |
int | FindPageFromEditor (EditorBase *eb) |
cbEditor * | IsBuiltinOpen (const wxString &filename) |
cbEditor * | GetBuiltinEditor (int index) |
cbEditor * | GetBuiltinEditor (const wxString &filename) |
cbEditor * | GetBuiltinActiveEditor () |
void | ActivateNext () |
void | ActivatePrevious () |
void | SetActiveEditor (EditorBase *ed) |
EditorColourSet * | GetColourSet () |
void | SetColourSet (EditorColourSet *theme) |
cbEditor * | New (const wxString &newFileName=wxEmptyString) |
void | AddCustomEditor (EditorBase *eb) |
void | RemoveCustomEditor (EditorBase *eb) |
bool | UpdateProjectFiles (cbProject *project) |
bool | SwapActiveHeaderSource () |
bool | OpenContainingFolder () |
bool | CloseActive (bool dontsave=false) |
bool | Close (const wxString &filename, bool dontsave=false) |
bool | Close (EditorBase *editor, bool dontsave=false) |
bool | Close (int index, bool dontsave=false) |
bool | QueryClose (EditorBase *editor) |
bool | QueryCloseAll () |
bool | CloseAll (bool dontsave=false) |
Closes all opened editors. More... | |
bool | CloseAllExcept (EditorBase *editor, bool dontsave=false) |
Closes all opened editors, except the editor passed as parameter. More... | |
bool | CloseAllInTabCtrl (bool dontsave=false) |
Closes all editors in the same tab control as the active editor. More... | |
bool | CloseAllInTabCtrlExcept (EditorBase *editor, bool dontsave=false) |
Closes all editors in the same tab control as the active editor, except the editor passed as parameter. More... | |
bool | CloseAllInTabCtrlToTheLeft (EditorBase *editor, bool dontsave=false) |
Closes all editors in the same tab control which are on the left of the passed editor. More... | |
bool | CloseAllInTabCtrlToTheRight (EditorBase *editor, bool dontsave=false) |
Closes all editors in the same tab control which are on the right of the passed editor. More... | |
bool | Save (const wxString &filename) |
bool | Save (int index) |
bool | SaveActive () |
bool | SaveAs (int index) |
bool | SaveActiveAs () |
bool | SaveAll () |
void | Print (PrintScope ps, PrintColourMode pcm, bool line_numbers) |
void | HideNotebook () |
Hides the editor notebook for layout purposes. More... | |
void | ShowNotebook () |
Shows the previously hidden editor notebook. More... | |
void | CheckForExternallyModifiedFiles () |
Check if one of the open files has been modified outside the IDE. More... | |
void | SetZoom (int zoom) |
int | GetZoom () const |
void | MarkReadOnly (int page, bool readOnly=true) |
wxString | GetSelectionClipboard () |
void | SetSelectionClipboard (const wxString &data) |
Static Public Member Functions | |
static bool | CanShutdown () |
Static Public Member Functions inherited from Mgr< EditorManager > | |
static bool | Valid () |
static EditorManager * | Get () |
static void | Free () |
Protected Member Functions | |
void | AddEditorBase (EditorBase *eb) |
void | RemoveEditorBase (EditorBase *eb, bool deleteObject=true) |
cbEditor * | InternalGetBuiltinEditor (int page) |
EditorBase * | InternalGetEditorBase (int page) |
Protected Member Functions inherited from Mgr< EditorManager > | |
Mgr () | |
virtual | ~Mgr () |
Private Attributes | |
cbAuiNotebook * | m_pNotebook |
cbNotebookStack * | m_pNotebookStackHead |
cbNotebookStack * | m_pNotebookStackTail |
size_t | m_nNotebookStackSize |
EditorColourSet * | m_Theme |
int | m_Zoom |
bool | m_isCheckingForExternallyModifiedFiles |
EditorManagerInternalData * | m_pData |
Static Private Attributes | |
static bool | s_CanShutdown = true |
Friends | |
class | Mgr< EditorManager > |
class | Manager |
struct | EditorManagerInternalData |
Definition at line 59 of file editormanager.h.
|
private |
|
private |
Definition at line 145 of file editormanager.cpp.
References _(), _T, cbEVT_BUILDTARGET_SELECTED, cbEVT_PROJECT_ACTIVATE, cbEVT_WORKSPACE_LOADING_COMPLETE, CollectDefines(), COLORSET_DEFAULT, LogManager::DebugLog(), EditorManagerInternalData::EditorManagerInternalData(), Manager::Get(), Manager::GetAppWindow(), wxSystemSettings::GetColour(), Manager::GetColourManager(), Manager::GetConfigManager(), Manager::GetLogManager(), ID_NBEditorManager, ConfigManager::ReadInt(), ColourManager::RegisterColour(), Manager::RegisterEventSink(), wxBLACK, wxCLIP_CHILDREN, wxDefaultPosition, wxDefaultSize, wxLIGHT_GREY, wxNO_FULL_REPAINT_ON_RESIZE, wxSYS_COLOUR_3DFACE, wxSYS_COLOUR_3DHIGHLIGHT, wxSYS_COLOUR_BTNFACE, wxSYS_COLOUR_BTNTEXT, and wxT.
|
overrideprivate |
Definition at line 187 of file editormanager.cpp.
References _T, Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Write().
void EditorManager::ActivateNext | ( | ) |
Definition at line 441 of file editormanager.cpp.
Referenced by MainFrame::OnFileNext(), and ScriptBindings::RegisterBindings().
void EditorManager::ActivatePrevious | ( | ) |
Definition at line 446 of file editormanager.cpp.
Referenced by MainFrame::OnFilePrev(), and ScriptBindings::RegisterBindings().
void EditorManager::AddCustomEditor | ( | EditorBase * | eb | ) |
Definition at line 516 of file editormanager.cpp.
Referenced by EditorBase::EditorBase().
|
protected |
Definition at line 526 of file editormanager.cpp.
References EditorBase::GetTitle().
|
inlinestatic |
Definition at line 71 of file editormanager.h.
Referenced by MainFrame::OnApplicationClose(), MainFrame::OnFileCloseProject(), and MainFrame::OnFileMenuUpdateUI().
void EditorManager::CheckForExternallyModifiedFiles | ( | ) |
Check if one of the open files has been modified outside the IDE.
If so, ask to reload it.
Definition at line 845 of file editormanager.cpp.
References _(), _T, wxFile::Access(), wxArrayString::Add(), wxString::c_str(), cbMessageBox(), EditorBase::Close(), crAll, crCancel, crNo, crYes, ProjectManager::FindProjectForFile(), fvsMissing, fvsNormal, fvsReadOnly, Manager::Get(), cbProject::GetCheckForExternallyModifiedFiles(), cbEditor::GetControl(), wxArrayString::GetCount(), EditorBase::GetFilename(), ProjectFile::GetFileState(), cbEditor::GetLastModificationTime(), cbEditor::GetModified(), ProjectFile::GetParentProject(), cbEditor::GetProjectFile(), Manager::GetProjectManager(), wxScintilla::GetReadOnly(), GetStringFromArray(), cbEditor::IsOK(), EditorBase::IsReadOnly(), wxFileName::MakeAbsolute(), PlaceWindow(), wxString::Printf(), cbEditor::Reload(), EditorBase::Save(), ProjectFile::SetFileState(), EditorBase::SetModified(), cbEditor::SetModified(), cbEditor::SetReadOnly(), wxDialog::ShowModal(), cbEditor::Touch(), wxFile::write, wxCANCEL, wxFileExists(), wxICON_ERROR, wxICON_QUESTION, wxID_CANCEL, wxID_NO, wxID_YES, and wxYES_NO.
Referenced by MainFrame::OnFileNewWhat(), and ProjectFileOptionsDlg::OnReadOnlyCheck().
bool EditorManager::Close | ( | const wxString & | filename, |
bool | dontsave = false |
||
) |
Definition at line 720 of file editormanager.cpp.
Referenced by cbProject::CloseAllFiles(), EditorBase::DisplayContextMenu(), ScriptBindings::EditorManager_Close(), cbEditor::OnClose(), ProjectManagerUI::OnCloseFile(), EditorBase::OnContextMenuEntry(), cbProject::RemoveFile(), and FindReplace::ReplaceInFiles().
bool EditorManager::Close | ( | EditorBase * | editor, |
bool | dontsave = false |
||
) |
Definition at line 725 of file editormanager.cpp.
bool EditorManager::Close | ( | int | index, |
bool | dontsave = false |
||
) |
Definition at line 741 of file editormanager.cpp.
bool EditorManager::CloseActive | ( | bool | dontsave = false | ) |
Definition at line 694 of file editormanager.cpp.
Referenced by MainFrame::OnFileClose(), and ScriptBindings::RegisterBindings().
bool EditorManager::CloseAll | ( | bool | dontsave = false | ) |
Closes all opened editors.
Definition at line 567 of file editormanager.cpp.
References _().
Referenced by MainFrame::OnFileCloseAll(), and ScriptBindings::RegisterBindings().
bool EditorManager::CloseAllExcept | ( | EditorBase * | editor, |
bool | dontsave = false |
||
) |
Closes all opened editors, except the editor passed as parameter.
Definition at line 592 of file editormanager.cpp.
bool EditorManager::CloseAllInTabCtrl | ( | bool | dontsave = false | ) |
Closes all editors in the same tab control as the active editor.
Definition at line 604 of file editormanager.cpp.
Referenced by EditorBase::OnContextMenuEntry().
bool EditorManager::CloseAllInTabCtrlExcept | ( | EditorBase * | editor, |
bool | dontsave = false |
||
) |
Closes all editors in the same tab control as the active editor, except the editor passed as parameter.
Definition at line 612 of file editormanager.cpp.
Referenced by EditorBase::OnContextMenuEntry().
bool EditorManager::CloseAllInTabCtrlToTheLeft | ( | EditorBase * | editor, |
bool | dontsave = false |
||
) |
Closes all editors in the same tab control which are on the left of the passed editor.
Definition at line 622 of file editormanager.cpp.
bool EditorManager::CloseAllInTabCtrlToTheRight | ( | EditorBase * | editor, |
bool | dontsave = false |
||
) |
Closes all editors in the same tab control which are on the right of the passed editor.
Definition at line 640 of file editormanager.cpp.
|
private |
Closes all editors passed to the function.
Definition at line 670 of file editormanager.cpp.
|
private |
Definition at line 1857 of file editormanager.cpp.
References wxArrayString::Add(), AppendArray(), ExpandBackticks(), Manager::Get(), cbProject::GetActiveBuildTarget(), ProjectManager::GetActiveProject(), GetArrayFromString(), cbProject::GetBuildTarget(), CompilerFactory::GetCompiler(), CompileTargetBase::GetCompilerID(), CompileOptionsBase::GetCompilerOptions(), Manager::GetConfigManager(), cbEditor::GetControl(), wxArrayString::GetCount(), ProjectBuildTarget::GetFilesList(), cbProject::GetFilesList(), cbEditor::GetLanguage(), Manager::GetProjectManager(), GetStringFromArray(), MakeUniqueArray(), wxString::Replace(), wxScintilla::SetKeyWords(), ConfigManager::Write(), wxNOT_FOUND, and wxT.
Referenced by EditorManager().
void EditorManager::DeleteNotebookStack | ( | ) |
Definition at line 245 of file editormanager.cpp.
References cbNotebookStack::next.
Referenced by EnvironmentSettingsDlg::EndModal().
|
private |
Definition at line 1086 of file editormanager.cpp.
References FileTypeOf(), wxArrayString::GetCount(), wxFileName::GetExt(), wxFileName::GetFullName(), and wxIsupper().
int EditorManager::FindPageFromEditor | ( | EditorBase * | eb | ) |
Definition at line 707 of file editormanager.cpp.
Referenced by EditorBase::SetTitle().
EditorBase * EditorManager::GetActiveEditor | ( | ) |
Definition at line 432 of file editormanager.cpp.
Referenced by NativeParser::AddProjectToParser(), CompilerGCC::DoBuild(), MainFrame::DoUpdateAppTitle(), MainFrame::DoUpdateStatusBar(), MainFrame::OnEditBookmarksClearAll(), MainFrame::OnEditBookmarksNext(), MainFrame::OnEditBookmarksPrevious(), MainFrame::OnEditBookmarksToggle(), MainFrame::OnEditClearHistory(), MainFrame::OnEditCopy(), MainFrame::OnEditCut(), MainFrame::OnEditMenuUpdateUI(), CodeCompletion::OnEditorClosed(), MainFrame::OnEditorUpdateUI(), MainFrame::OnEditPaste(), MainFrame::OnEditRedo(), MainFrame::OnEditSelectAll(), MainFrame::OnEditSelectNext(), MainFrame::OnEditSelectNextSkip(), MainFrame::OnEditUndo(), MainFrame::OnFileMenuUpdateUI(), CodeCompletion::OnReparsingTimer(), ProjectManagerUI::OnUpdateUI(), GdbCmd_AddBreakpointCondition::ParseOutput(), ScriptBindings::RegisterBindings(), MacrosManager::ReplaceMacros(), FindReplace::ShowFindDialog(), ProjectManagerUI::ShowMenu(), and DebugInterfaceFactory::ShowValueTooltip().
|
inline |
Definition at line 95 of file editormanager.h.
Referenced by EditorBase::DisplayContextMenu(), CodeCompletion::DoAllMethodsImpl(), CodeCompletion::DoClassMethodDeclImpl(), CodeRefactoring::DoFindReferences(), CodeCompletion::DoParseOpenedProjectAndActiveEditor(), CodeRefactoring::DoRenameSymbols(), MainFrame::DoUpdateStatusBar(), FindReplace::FindInFiles(), FindReplace::FindNext(), FindReplace::FindSelectedText(), NativeParser::GetCurrentProject(), cbDebuggerPlugin::GetEditorWordAtCaret(), NativeParser::GetParserInfoByCurrentEditor(), CCManager::GetProviderFor(), GetSelectedText(), CodeRefactoring::GetSymbolUnderCursor(), CodeCompletion::GotoFunctionPrevNext(), CCManager::InjectAutoCompShow(), InsertNewLine(), NativeParser::MarkItemsByAI(), CCManager::NotifyDocumentation(), CodeBlocksApp::OnAppActivate(), CCManager::OnAutocompleteSelect(), CCManager::OnCompleteCode(), CCManager::OnDeactivateApp(), CCManager::OnDeferredCallTipCancel(), MainFrame::OnEditBoxCommentSelected(), MainFrame::OnEditCommentSelected(), MainFrame::OnEditEncoding(), MainFrame::OnEditEOLMode(), MainFrame::OnEditFoldAll(), MainFrame::OnEditFoldBlock(), MainFrame::OnEditGotoLineEnd(), MainFrame::OnEditGotoMatchingBrace(), MainFrame::OnEditHighlightMode(), MainFrame::OnEditInsertNewLine(), MainFrame::OnEditLineCopy(), MainFrame::OnEditLineCut(), MainFrame::OnEditLineDelete(), MainFrame::OnEditLineDuplicate(), MainFrame::OnEditLineMove(), MainFrame::OnEditLinePaste(), MainFrame::OnEditLineTranspose(), MainFrame::OnEditLowerCase(), MainFrame::OnEditMenuUpdateUI(), CodeCompletion::OnEditorActivatedTimer(), MainFrame::OnEditParaDown(), MainFrame::OnEditParaDownExtend(), MainFrame::OnEditParaUp(), MainFrame::OnEditParaUpExtend(), MainFrame::OnEditStreamCommentSelected(), MainFrame::OnEditToggleAllFolds(), MainFrame::OnEditToggleCommentSelected(), MainFrame::OnEditToggleFoldBlock(), MainFrame::OnEditUncommentSelected(), MainFrame::OnEditUnfoldAll(), MainFrame::OnEditUnfoldBlock(), MainFrame::OnEditUpperCase(), MainFrame::OnEditWordPartLeft(), MainFrame::OnEditWordPartLeftExtend(), MainFrame::OnEditWordPartRight(), MainFrame::OnEditWordPartRightExtend(), MainFrame::OnEditZoomIn(), MainFrame::OnEditZoomOut(), MainFrame::OnEditZoomReset(), MainFrame::OnFileMenuUpdateUI(), CodeCompletion::OnFunction(), CodeCompletion::OnGotoDeclaration(), CodeCompletion::OnGotoFunction(), MainFrame::OnHighlightMenu(), CCManager::OnMenuSelect(), CodeCompletion::OnOpenIncludeFile(), CodeCompletion::OnParserEnd(), CodeCompletion::OnParserStart(), NativeParser::OnParsingOneByOneTimer(), ProjectManagerUI::OnProperties(), CodeCompletion::OnRealtimeParsingTimer(), DebuggerMenuHandler::OnRunToCursor(), MainFrame::OnSearchFind(), MainFrame::OnSearchGotoLine(), MainFrame::OnSearchGotoNextChanged(), MainFrame::OnSearchGotoPrevChanged(), MainFrame::OnSearchReplace(), DebuggerMenuHandler::OnSetNextStatement(), MainFrame::OnShiftTab(), CCManager::OnShowCallTip(), CCManager::OnTimer(), DebuggerMenuHandler::OnToggleBreakpoint(), DebuggerMenuHandler::OnUpdateUI(), DebuggerToolbarHandler::OnUpdateUI(), CompilerGCC::OnUpdateUI(), CodeCompletion::OnUpdateUI(), MainFrame::OnViewMenuUpdateUI(), CodeRefactoring::Parse(), CodeCompletion::ParseFunctionsAndFillToolbar(), CompilerGCC::PrepareCompileFile(), PrintDialog::PrintDialog(), CCManager::ProcessArrow(), ScriptBindings::RegisterBindings(), ProjectLayoutLoader::Save(), CodeRefactoring::SearchInFiles(), ClassBrowser::UpdateClassBrowserView(), CodeCompletion::UpdateEditorSyntax(), and CodeRefactoring::VerifyResult().
cbEditor * EditorManager::GetBuiltinEditor | ( | EditorBase * | eb | ) |
Definition at line 309 of file editormanager.cpp.
References EditorBase::IsBuiltinEditor().
Referenced by cbDebuggerPlugin::ClearActiveMarkFromAllEditors(), CrashHandlerSaveEditorFiles(), CompilerErrors::DoClearErrorMarkFromAllEditors(), CompilerErrors::DoGotoError(), ScriptBindings::EditorManager_GetBuiltinEditor(), EditorConfigurationDlg::EndModal(), FindReplace::FindInFiles(), FindReplaceDlg::FindReplaceDlg(), FileManager::Load(), CCManager::OnDeactivateEd(), CodeCompletion::OnEditorActivated(), NativeParser::OnEditorActivated(), CCManager::OnEditorClose(), CodeCompletion::OnEditorClosed(), CCManager::OnEditorOpen(), CodeCompletion::OnEditorOpen(), MainFrame::OnEditUndo(), CompilerGCC::OnJobEnd(), CodeCompletion::OnParserEnd(), MainFrame::OnSearchMenuUpdateUI(), FindReplace::ReplaceInFiles(), FindReplace::ShowFindDialog(), cbDebuggerPlugin::SyncEditor(), and CCManager::UpdateEnvSettings().
|
inline |
Definition at line 93 of file editormanager.h.
References GetBuiltinEditor().
Referenced by GetBuiltinEditor().
Definition at line 94 of file editormanager.h.
|
inline |
Definition at line 100 of file editormanager.h.
References wxEmptyString.
Referenced by EditorConfigurationDlg::ChangeTheme(), MainFrame::CreateMenubar(), DisassemblyDlg::DisassemblyDlg(), MainFrame::DoUpdateStatusBar(), ProjectFileOptionsDlg::FillGeneralProperties(), MainFrame::OnEditBoxCommentSelected(), MainFrame::OnEditCommentSelected(), MainFrame::OnEditHighlightMode(), MainFrame::OnEditStreamCommentSelected(), MainFrame::OnEditToggleCommentSelected(), MainFrame::OnEditUncommentSelected(), MainFrame::OnHighlightMenu(), and CodeCompletion::UpdateEditorSyntax().
EditorBase * EditorManager::GetEditor | ( | int | index | ) |
Definition at line 332 of file editormanager.cpp.
Referenced by CrashHandlerSaveEditorFiles(), EditorBase::CreateContextSubMenu(), EditorConfigurationDlg::EndModal(), CodeRefactoring::GetOpenedFiles(), FileManager::Load(), CodeBlocksApp::LoadDelayedFiles(), BreakpointsDlg::OnBreakpointEdit(), MainFrame::OnFileMenuUpdateUI(), ProjectManagerUI::OnUpdateUI(), RefreshBreakpoints(), RecentItemsList::RefreshStartHerePage(), Wiz::RunFilesWizard(), MainFrame::ShowHideStartPage(), and CCManager::UpdateEnvSettings().
|
inline |
Definition at line 85 of file editormanager.h.
int EditorManager::GetEditorsCount | ( | ) |
Definition at line 287 of file editormanager.cpp.
Referenced by cbDebuggerPlugin::ClearActiveMarkFromAllEditors(), CrashHandlerSaveEditorFiles(), EditorBase::CreateContextSubMenu(), CompilerErrors::DoClearErrorMarkFromAllEditors(), CompilerErrors::DoGotoError(), EditorConfigurationDlg::EndModal(), FindReplace::FindInFiles(), FindReplaceDlg::FindReplaceDlg(), CodeRefactoring::GetOpenedFiles(), FileManager::Load(), CodeCompletion::OnEditorClosed(), CodeCompletion::OnParserEnd(), RefreshBreakpoints(), FindReplace::ReplaceInFiles(), cbDebuggerPlugin::SyncEditor(), and CCManager::UpdateEnvSettings().
|
private |
Returns a vector with pointers to the editors that are in the same tab control as the passed editor.
Definition at line 658 of file editormanager.cpp.
|
inline |
Definition at line 73 of file editormanager.h.
Referenced by MainFrame::DoUpdateEditorStyle(), EditorConfigurationDlg::EndModal(), FindReplace::FindInFiles(), WorkspaceLoader::LoadLayout(), ProjectLayoutLoader::LoadNotebookLayout(), CodeBlocksApp::OnAppActivate(), MainFrame::OnFocusEditor(), ProjectManagerUI::OnProperties(), MainFrame::OnSwitchTabs(), MainFrame::OnViewHideEditorTabs(), cbEditor::OnZoom(), EditorBase::SetTitle(), and ProjectManager::WorkspaceChanged().
cbNotebookStack * EditorManager::GetNotebookStack | ( | ) |
Definition at line 196 of file editormanager.cpp.
References cbNotebookStack::next, NULL, cbNotebookStack::window, and wxNOT_FOUND.
wxString EditorManager::GetSelectionClipboard | ( | ) |
int EditorManager::GetZoom | ( | ) | const |
Definition at line 2050 of file editormanager.cpp.
Referenced by EditorConfigurationDlg::EndModal(), and cbAuiNotebook::OnIdle().
void EditorManager::HideNotebook | ( | ) |
Hides the editor notebook for layout purposes.
Definition at line 1828 of file editormanager.cpp.
Referenced by cbProject::CloseAllFiles(), and cbProject::LoadLayout().
|
protected |
Definition at line 301 of file editormanager.cpp.
References EditorBase::IsBuiltinEditor().
|
protected |
Definition at line 292 of file editormanager.cpp.
Definition at line 92 of file editormanager.h.
Referenced by BreakpointsDlg::BreakpointProperties(), CodeRefactoring::DoRenameSymbols(), BreakpointsDlg::EnableBreakpoint(), FindReplace::FindInFiles(), BreakpointsDlg::OnEnable(), CCDebugInfo::OnGoDeclClick(), CCDebugInfo::OnGoImplClick(), BreakpointsDlg::OnRemove(), cbProject::QueryCloseAllFiles(), ScriptBindings::RegisterBindings(), BreakpointsDlg::RemoveAllBreakpoints(), CodeRefactoring::SearchInFiles(), and CodeRefactoring::VerifyResult().
|
private |
Definition at line 1049 of file editormanager.cpp.
References _T, wxString::CmpNoCase(), wxFileName::FileExists(), FileTypeOf(), ftHeader, ftSource, ftTemplateSource, wxDir::GetAllFiles(), wxArrayString::GetCount(), wxFileName::GetFullName(), wxFileName::GetName(), wxFileName::GetPath(), wxDIR_FILES, and wxDIR_HIDDEN.
EditorBase * EditorManager::IsOpen | ( | const wxString & | filename | ) |
Definition at line 314 of file editormanager.cpp.
References g_EditorModified, EditorBase::GetFilename(), wxString::IsSameAs(), NULL, realpath(), and UnixFilename().
Referenced by ProjectManagerUI::DoOpenFile(), FindReplace::ReplaceInFiles(), and ProjectManagerUI::ShowMenu().
void EditorManager::MarkReadOnly | ( | int | page, |
bool | readOnly = true |
||
) |
Definition at line 1039 of file editormanager.cpp.
References _T, cbLoadBitmap(), ConfigManager::GetDataFolder(), and wxNullBitmap.
Referenced by EditorBase::SetTitle().
cbEditor * EditorManager::New | ( | const wxString & | newFileName = wxEmptyString | ) |
Definition at line 476 of file editormanager.cpp.
References _T, cbEVT_EDITOR_OPEN, FileTypeOf(), Manager::Get(), Manager::GetConfigManager(), cbEditor::GetControl(), EditorBase::GetFilename(), Manager::GetMacrosManager(), Manager::GetPluginManager(), wxString::IsEmpty(), wxFile::IsOpened(), PluginManager::NotifyPlugins(), wxString::Printf(), ConfigManager::Read(), MacrosManager::ReplaceMacros(), cbEditor::SetColourSet(), wxScintilla::SetText(), wxFile::write, wxDirExists(), wxEmptyString, wxFileExists(), and wxPathOnly().
Referenced by MainFrame::OnFileNewWhat(), and ScriptBindings::RegisterBindings().
|
private |
Definition at line 1777 of file editormanager.cpp.
References Manager::Get(), ProjectManager::GetActiveProject(), cbProject::GetFileByFilename(), Manager::GetProjectManager(), ProjectManager::GetUI(), and cbProjectManagerUI::RebuildTree().
|
private |
Definition at line 1813 of file editormanager.cpp.
|
private |
Definition at line 1818 of file editormanager.cpp.
|
private |
Definition at line 1823 of file editormanager.cpp.
|
private |
Definition at line 1707 of file editormanager.cpp.
|
private |
Definition at line 1712 of file editormanager.cpp.
|
private |
Definition at line 1717 of file editormanager.cpp.
References idNBTabCloseAllOthers, idNBTabCloseToTheLeft, and idNBTabCloseToTheRight.
|
private |
Definition at line 1447 of file editormanager.cpp.
References idNBSwitchFile1, idNBSwitchFileMax, idNBTabSplitHorz, idNBTabSplitVert, idNBTabUnsplit, cbEditor::Split(), cbEditor::stHorizontal, cbEditor::stVertical, and cbEditor::Unsplit().
|
private |
Definition at line 1742 of file editormanager.cpp.
|
private |
Definition at line 1467 of file editormanager.cpp.
References _T, cbEVT_EDITOR_ACTIVATED, cbEVT_EDITOR_SWITCHED, Manager::Get(), wxAuiNotebookEvent::GetOldSelection(), Manager::GetPluginManager(), wxAuiNotebookEvent::GetSelection(), cbNotebookStack::next, PluginManager::NotifyPlugins(), and cbNotebookStack::window.
|
private |
Definition at line 1515 of file editormanager.cpp.
References cbEVT_EDITOR_DEACTIVATED, Manager::Get(), Manager::GetPluginManager(), and PluginManager::NotifyPlugins().
|
private |
Definition at line 1527 of file editormanager.cpp.
References _T, cbEVT_EDITOR_SWITCHED, Manager::Get(), Manager::GetPluginManager(), wxAuiNotebookEvent::GetSelection(), cbNotebookStack::next, PluginManager::NotifyPlugins(), and cbNotebookStack::window.
|
private |
Definition at line 1573 of file editormanager.cpp.
References _(), _T, wxMenu::Append(), wxMenu::AppendCheckItem(), wxMenu::AppendSeparator(), PluginManager::AskPluginsForModuleMenu(), Associations::Check(), EditorMaxSwitchTo, wxMenu::Enable(), wxMenu::FindItemByPosition(), Manager::Get(), wxMenu::GetMenuItemCount(), EditorBase::GetModified(), Manager::GetPluginManager(), cbEditor::GetProjectFile(), wxAuiNotebookEvent::GetSelection(), EditorBase::GetShortName(), cbEditor::GetSplitType(), idNBAddFileToProject, idNBProperties, idNBRemoveFileFromProject, idNBShowFileInTree, idNBSwapHeaderSource, idNBSwitchFile1, idNBTabBottom, idNBTabClose, idNBTabCloseAll, idNBTabCloseAllOthers, idNBTabCloseToTheLeft, idNBTabCloseToTheRight, idNBTabOpenContainingFolder, idNBTabSave, idNBTabSaveAll, idNBTabSplitHorz, idNBTabSplitVert, idNBTabTop, idNBTabUnsplit, mtEditorTab, cbEditor::stHorizontal, cbEditor::stNoSplit, cbEditor::stVertical, wxEmptyString, wxGetKeyState(), wxID_ANY, WXK_CONTROL, and wxT.
|
private |
Definition at line 1761 of file editormanager.cpp.
References Manager::Get(), cbEditor::GetProjectFile(), PlaceWindow(), wxDialog::ShowModal(), and ProjectFile::ShowOptions().
|
private |
Definition at line 1791 of file editormanager.cpp.
References Manager::Get(), ProjectFile::GetParentProject(), Manager::GetProjectManager(), ProjectManager::GetUI(), cbProjectManagerUI::RebuildTree(), and ProjectManager::RemoveFileFromProject().
|
private |
Definition at line 1727 of file editormanager.cpp.
|
private |
Definition at line 1732 of file editormanager.cpp.
|
private |
Definition at line 1802 of file editormanager.cpp.
References Manager::Get(), Manager::GetProjectManager(), ProjectManager::GetUI(), cbProjectManagerUI::ShowFileInTree(), and cbProjectManagerUI::SwitchToProjectsPage().
|
private |
Definition at line 1737 of file editormanager.cpp.
|
private |
Definition at line 1747 of file editormanager.cpp.
References _T, Manager::Get(), Manager::GetConfigManager(), idNBTabBottom, and ConfigManager::Write().
|
private |
|
private |
|
private |
|
private |
Definition at line 1840 of file editormanager.cpp.
References Manager::Get(), and cbEditor::GetControl().
cbEditor * EditorManager::Open | ( | const wxString & | filename, |
int | pos = 0 , |
||
ProjectFile * | data = nullptr |
||
) |
Definition at line 353 of file editormanager.cpp.
Referenced by CompilerErrors::DoGotoError(), MainFrame::DoOpenFile(), CodeRefactoring::DoRenameSymbols(), ScriptBindings::EditorManager_Open(), NewFromTemplateDlg::EditScript(), cbProject::LoadLayout(), DocumentationHelper::OnDocumentationLink(), CCDebugInfo::OnGoDeclClick(), CCDebugInfo::OnGoImplClick(), CodeCompletion::OnGotoDeclaration(), ClassBrowser::OnJumpTo(), BreakpointsDlg::OnOpen(), CodeCompletion::OnOpenIncludeFile(), ProjectManagerUI::OnOpenWith(), ScriptingManager::OnScriptMenu(), ClassBrowser::OnTreeItemDoubleClick(), FindReplace::ReplaceInFiles(), cbSearchResultsLog::SyncEditor(), and cbDebuggerPlugin::SyncEditor().
cbEditor * EditorManager::Open | ( | LoaderBase * | fileLdr, |
const wxString & | filename, | ||
int | pos = 0 , |
||
ProjectFile * | data = nullptr |
||
) |
Definition at line 358 of file editormanager.cpp.
References _T, LogManager::DebugLog(), ProjectFile::file, ProjectManager::FindProjectForFile(), Manager::Get(), cbEditor::GetControl(), Manager::GetFileManager(), EditorBase::GetFilename(), wxFileName::GetFullPath(), Manager::GetLogManager(), cbEditor::GetProjectFile(), Manager::GetProjectManager(), EditorBase::IsBuiltinEditor(), ProjectManager::IsLoading(), cbEditor::IsOK(), FileManager::Load(), NormalizePath(), realpath(), cbEditor::SetProjectFile(), UnixFilename(), wxEmptyString, and wxFileExists().
bool EditorManager::OpenContainingFolder | ( | ) |
Definition at line 1189 of file editormanager.cpp.
References _T, cbDEFAULT_OPEN_FOLDER_CMD, OpenContainingFolderData::command, LogManager::DebugLog(), F(), Manager::Get(), Manager::GetConfigManager(), EditorBase::GetFilename(), Manager::GetLogManager(), QuoteStringIfNeeded(), ConfigManager::Read(), wxFileName::SplitPath(), OpenContainingFolderData::supportSelect, wxString::wx_str(), wxExecute(), and wxT.
Referenced by cbEditor::OnContextMenuEntry().
|
inline |
Definition at line 64 of file editormanager.h.
void EditorManager::Print | ( | PrintScope | ps, |
PrintColourMode | pcm, | ||
bool | line_numbers | ||
) |
Definition at line 819 of file editormanager.cpp.
References cbEditor::Print(), psActiveEditor, psAllOpenEditors, and psSelection.
Referenced by MainFrame::OnFilePrint().
bool EditorManager::QueryClose | ( | EditorBase * | editor | ) |
Definition at line 699 of file editormanager.cpp.
References EditorBase::QueryClose().
Referenced by cbProject::QueryCloseAllFiles().
bool EditorManager::QueryCloseAll | ( | ) |
Definition at line 581 of file editormanager.cpp.
void EditorManager::RebuildNotebookStack | ( | ) |
Definition at line 258 of file editormanager.cpp.
References cbNotebookStack::next.
Referenced by EnvironmentSettingsDlg::EndModal().
void EditorManager::RecreateOpenEditorStyles | ( | ) |
Definition at line 269 of file editormanager.cpp.
References cbEditor::FixFoldState(), cbEditor::SaveFoldState(), and cbEditor::SetEditorStyle().
Referenced by MainFrame::OnSettingsEditor(), and MainFrame::OnSettingsEnvironment().
void EditorManager::RemoveCustomEditor | ( | EditorBase * | eb | ) |
Definition at line 521 of file editormanager.cpp.
Referenced by EditorBase::~EditorBase().
|
protected |
Definition at line 537 of file editormanager.cpp.
References Manager::IsAppShuttingDown().
bool EditorManager::Save | ( | const wxString & | filename | ) |
Definition at line 749 of file editormanager.cpp.
References EditorBase::Save().
Referenced by CompilerGCC::CompileFileWithoutProject(), ScriptBindings::EditorManager_Save(), ProjectManagerUI::OnSaveFile(), and cbProject::SaveAllFiles().
bool EditorManager::Save | ( | int | index | ) |
Definition at line 761 of file editormanager.cpp.
References EditorBase::Save().
bool EditorManager::SaveActive | ( | ) |
Definition at line 773 of file editormanager.cpp.
References EditorBase::Save().
Referenced by ScriptBindings::RegisterBindings().
bool EditorManager::SaveActiveAs | ( | ) |
Definition at line 793 of file editormanager.cpp.
References EditorBase::SaveAs().
Referenced by MainFrame::OnFileSaveAs(), and ScriptBindings::RegisterBindings().
bool EditorManager::SaveAll | ( | ) |
Definition at line 803 of file editormanager.cpp.
References _(), wxString::c_str(), cbMessageBox(), EditorBase::GetFilename(), EditorBase::GetModified(), wxString::Printf(), EditorBase::Save(), and wxICON_ERROR.
Referenced by EditorBase::OnContextMenuEntry(), MainFrame::OnFileSaveAll(), and ScriptBindings::RegisterBindings().
bool EditorManager::SaveAs | ( | int | index | ) |
Definition at line 785 of file editormanager.cpp.
References EditorBase::SaveAs().
Referenced by ScriptBindings::RegisterBindings().
void EditorManager::SetActiveEditor | ( | EditorBase * | ed | ) |
Definition at line 451 of file editormanager.cpp.
References cbEVT_EDITOR_ACTIVATED, cbEVT_EDITOR_SWITCHED, Manager::Get(), Manager::GetPluginManager(), EditorBase::IsBuiltinEditor(), and PluginManager::NotifyPlugins().
Referenced by EditorBase::Activate(), EditorBase::OnContextMenuEntry(), and FindReplace::ReplaceInFiles().
void EditorManager::SetColourSet | ( | EditorColourSet * | theme | ) |
Definition at line 337 of file editormanager.cpp.
References cbEditor::SetColourSet().
Referenced by EditorConfigurationDlg::EndModal().
void EditorManager::SetSelectionClipboard | ( | const wxString & | data | ) |
void EditorManager::SetZoom | ( | int | zoom | ) |
Definition at line 2045 of file editormanager.cpp.
Referenced by EditorConfigurationDlg::EndModal(), and cbEditor::OnZoom().
void EditorManager::ShowNotebook | ( | ) |
Shows the previously hidden editor notebook.
Definition at line 1834 of file editormanager.cpp.
Referenced by cbProject::CloseAllFiles(), and cbProject::LoadLayout().
bool EditorManager::SwapActiveHeaderSource | ( | ) |
Definition at line 1222 of file editormanager.cpp.
References _(), _T, wxArrayString::Add(), ProjectManager::AddFileToProject(), ProjectFile::AutoGeneratedBy(), cbMessageBox(), wxArrayString::Clear(), FileFilters::CPP_EXT, ProjectFile::file, FileTypeOf(), ftHeader, ftSource, ftTemplateSource, ProjectFile::generatedFiles, Manager::Get(), ProjectManager::GetActiveProject(), wxDir::GetAllFiles(), CompileTargetBase::GetBasePath(), cbProject::GetBuildTarget(), cbProject::GetBuildTargetsCount(), wxArrayString::GetCount(), cbProject::GetFileByFilename(), EditorBase::GetFilename(), cbProject::GetFilesList(), wxFileName::GetFullPath(), CompileOptionsBase::GetIncludeDirs(), Manager::GetMacrosManager(), ProjectFile::GetParentProject(), wxFileName::GetPath(), cbEditor::GetProjectFile(), Manager::GetProjectManager(), ProjectManager::GetUI(), FileFilters::H_EXT, wxArrayString::Index(), wxFileName::IsAbsolute(), wxFileName::Normalize(), cbProjectManagerUI::RebuildTree(), MacrosManager::ReplaceMacros(), cbEditor::SetProjectFile(), wxDIR_FILES, wxDIR_HIDDEN, wxICON_QUESTION, wxID_YES, wxNOT_FOUND, wxPATH_NORM_ALL, wxPATH_NORM_CASE, wxSetWorkingDirectory(), and wxYES_NO.
Referenced by cbEditor::OnContextMenuEntry(), MainFrame::OnEditSwapHeaderSource(), and ScriptBindings::RegisterBindings().
bool EditorManager::UpdateProjectFiles | ( | cbProject * | project | ) |
Definition at line 547 of file editormanager.cpp.
References ProjectFile::editorTabPos, ProjectFile::GetParentProject(), cbEditor::GetProjectFile(), and cbEditor::UpdateProjectFile().
Referenced by ProjectManager::CloseProject().
|
friend |
Definition at line 209 of file editormanager.h.
|
friend |
Definition at line 70 of file editormanager.h.
|
friend |
Definition at line 61 of file editormanager.h.
|
private |
Definition at line 208 of file editormanager.h.
|
private |
Definition at line 205 of file editormanager.h.
|
private |
Definition at line 210 of file editormanager.h.
|
private |
Definition at line 202 of file editormanager.h.
|
private |
Definition at line 203 of file editormanager.h.
|
private |
Definition at line 204 of file editormanager.h.
|
private |
Definition at line 206 of file editormanager.h.
|
private |
Definition at line 207 of file editormanager.h.
|
staticprivate |
Definition at line 62 of file editormanager.h.