Code::Blocks
SVN r11506
|
#include <projectmanagerui.h>
Public Member Functions | |
ProjectManagerUI () | |
~ProjectManagerUI () | |
cbAuiNotebook * | GetNotebook () |
cbTreeCtrl * | GetTree () |
Retrieve a pointer to the project manager's tree (GUI). More... | |
wxTreeItemId | GetTreeSelection () |
Get the selection of the project manager's tree (GUI). More... | |
void | RebuildTree () |
Rebuild the project manager's tree. More... | |
void | FreezeTree () |
Stop the tree control from updating. More... | |
void | UnfreezeTree (bool force=false) |
Le the tree control be updated again. More... | |
void | UpdateActiveProject (cbProject *oldProject, cbProject *newProject, bool refresh) |
void | RemoveProject (cbProject *project) |
void | BeginLoadingWorkspace () |
void | CloseWorkspace () |
void | FinishLoadingProject (cbProject *project, bool newAddition, cb_unused FilesGroupsAndMasks *fgam) |
void | FinishLoadingWorkspace (cbProject *activeProject, const wxString &workspaceTitle) |
void | ShowFileInTree (ProjectFile &projectFile) |
void | CreateMenu (wxMenuBar *menuBar) |
bool | QueryCloseAllProjects () |
Checks whether all projects are saved. More... | |
bool | QueryCloseProject (cbProject *project, bool dontsavefiles) |
Checks whether project is saved. More... | |
bool | QueryCloseWorkspace () |
Asks user to save the workspace, projects and files (Yes/No/cancel). More... | |
int | AskForBuildTargetIndex (cbProject *project) |
Utility function. More... | |
wxArrayInt | AskForMultiBuildTargetIndex (cbProject *project) |
Utility function. More... | |
void | ConfigureProjectDependencies (cbProject *base) |
Displays a dialog to setup project dependencies. More... | |
void | CheckForExternallyModifiedProjects () |
Public Member Functions inherited from cbProjectManagerUI | |
virtual | ~cbProjectManagerUI () |
virtual void | FinishLoadingProject (cbProject *project, bool newAddition, FilesGroupsAndMasks *fileGroups)=0 |
Private Attributes | |
cbAuiNotebook * | m_pNotebook |
cbTreeCtrl * | m_pTree |
wxTreeItemId | m_TreeRoot |
wxImageList * | m_pImages |
int | m_TreeVisualState |
int | m_TreeFreezeCounter |
wxArrayTreeItemIds | m_DraggingSelection |
wxTreeItemId | m_RightClickItem |
bool | m_isCheckingForExternallyModifiedProjects |
Definition at line 17 of file projectmanagerui.h.
ProjectManagerUI::ProjectManagerUI | ( | ) |
Definition at line 209 of file projectmanagerui.cpp.
References _(), _T, Manager::Get(), Manager::GetAppWindow(), wxSystemSettings::GetColour(), Manager::GetColourManager(), Manager::GetConfigManager(), ptvsCategorize, ptvsHideFolderName, ptvsNone, ptvsUseFolders, ConfigManager::ReadBool(), ColourManager::RegisterColour(), ConfigManager::Write(), wxDefaultPosition, wxDefaultSize, wxSYS_COLOUR_GRAYTEXT, and wxT.
ProjectManagerUI::~ProjectManagerUI | ( | ) |
Definition at line 245 of file projectmanagerui.cpp.
References m_pImages, and m_pNotebook.
|
virtual |
Utility function.
Displays a single selection list of a project's build targets to choose from.
project | The project to use. If NULL, the active project is used. |
Implements cbProjectManagerUI.
Definition at line 2622 of file projectmanagerui.cpp.
References _(), wxArrayString::Add(), cbGetSingleChoiceIndex(), Manager::Get(), ProjectManager::GetActiveProject(), cbProject::GetBuildTarget(), cbProject::GetBuildTargetsCount(), Manager::GetProjectManager(), CompileTargetBase::GetTitle(), and m_pTree.
Referenced by GetTree().
|
virtual |
Utility function.
Displays a multiple selection list of a project's build targets to choose from.
project | The project to use. If NULL, the active project is used. |
Implements cbProjectManagerUI.
Definition at line 2640 of file projectmanagerui.cpp.
References _(), wxArrayString::Add(), Manager::Get(), ProjectManager::GetActiveProject(), cbProject::GetBuildTarget(), cbProject::GetBuildTargetsCount(), Manager::GetProjectManager(), MultiSelectDlg::GetSelectedIndices(), CompileTargetBase::GetTitle(), PlaceWindow(), wxDialog::ShowModal(), and wxID_OK.
Referenced by GetTree().
|
virtual |
Implements cbProjectManagerUI.
Definition at line 423 of file projectmanagerui.cpp.
References _(), wxTreeCtrl::AppendItem(), wxTreeCtrl::Expand(), FreezeTree(), wxTreeCtrl::GetRootItem(), m_pTree, and UnfreezeTree().
Referenced by GetTree().
|
private |
(Re)build the project tree.
tree | The wxTreeCtrl to use. |
root | The tree item to use as root. The project is built as a child of this item. |
ptvs | The visual style of the project tree |
fgam | If not NULL, use these file groups and masks for virtual folders. |
Definition at line 3304 of file projectmanagerui.cpp.
References _(), _T, wxFile::Access(), wxTreeCtrl::AppendItem(), cbProject::AppendUniqueVirtualFolder(), ProjectFile::AutoGeneratedBy(), wxString::c_str(), cbC2U(), ProjectFile::compile, LogManager::DebugLogError(), wxTreeCtrl::Delete(), wxTreeCtrl::Expand(), F(), ProjectFile::file, cbProjectTreeImages::FolderIconIndex(), FileTreeData::ftdkFile, FileTreeData::ftdkFolder, FileTreeData::ftdkProject, FileTreeData::ftdkVirtualFolder, FileTreeData::ftdkVirtualGroup, Manager::Get(), wxTreeCtrl::GetChildrenCount(), wxArrayString::GetCount(), CompileTargetBase::GetFilename(), cbProject::GetFilesList(), ProjectFile::GetFileState(), wxFileName::GetFullName(), wxFileName::GetFullPath(), FilesGroupsAndMasks::GetGroupName(), FilesGroupsAndMasks::GetGroupsCount(), Manager::GetLogManager(), cbProject::GetProjectNode(), CompileTargetBase::GetTitle(), cbProject::GetVirtualFolders(), wxString::IsEmpty(), wxString::Last(), FilesGroupsAndMasks::MatchesMask(), cbProjectTreeImages::ProjectIconIndex(), ptvsCategorize, ptvsHideFolderName, ptvsUseFolders, ProjectFile::relativeToCommonTopLevelPath, cbTreeCtrl::SetCompareFunction(), FileTreeData::SetFileIndex(), FileTreeData::SetFolder(), FileTreeData::SetProjectFile(), cbProject::SetProjectNode(), ProjectFile::SetTreeItemId(), wxStopWatch::Time(), ProjectFile::virtual_path, cbProjectTreeImages::VirtualFolderIconIndex(), and wxFile::write.
Referenced by FinishLoadingProject(), GetTree(), and RebuildTree().
|
private |
Definition at line 262 of file projectmanagerui.cpp.
References _T, wxImageList::Add(), cbLoadBitmap(), m_pImages, m_pNotebook, m_pTree, ConfigManager::ReadDataPath(), wxTreeCtrl::SetImageList(), wxBITMAP_TYPE_PNG, and wxEmptyString.
Referenced by GetTree(), and InitPane().
void ProjectManagerUI::CheckForExternallyModifiedProjects | ( | ) |
Definition at line 2670 of file projectmanagerui.cpp.
References _(), _T, wxArrayString::Add(), wxString::AfterLast(), wxTreeCtrl::AppendItem(), cbProject::AppendUniqueVirtualFolder(), wxString::BeforeFirst(), wxString::c_str(), cbEVT_PROJECT_OPTIONS_CHANGED, cbMessageBox(), wxString::CmpNoCase(), crAll, crCancel, crNo, crYes, wxTreeCtrl::Delete(), wxTreeCtrl::Expand(), wxString::Find(), wxString::First(), cbProjectTreeImages::FolderIconIndex(), FileTreeData::ftdkFile, FileTreeData::ftdkFolder, FileTreeData::ftdkProject, FileTreeData::ftdkVirtualFolder, Manager::Get(), wxString::GetChar(), ColourManager::GetColour(), Manager::GetColourManager(), cbProject::GetCommonTopLevelPath(), wxArrayString::GetCount(), CompileTargetBase::GetFilename(), cbProject::GetFilesList(), wxTreeCtrl::GetFirstChild(), FileTreeData::GetFolder(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetItemImage(), wxTreeCtrl::GetItemParent(), wxTreeCtrl::GetItemText(), wxTreeCtrl::GetItemTextColour(), FileTreeData::GetKind(), cbProject::GetLastModificationTime(), Manager::GetLogManager(), wxTreeCtrl::GetNextChild(), wxFileName::GetPathSeparator(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), Manager::GetProjectManager(), cbProject::GetProjectNode(), ProjectManager::GetProjects(), wxTreeCtrl::GetRootItem(), ProjectManager::GetUI(), cbProject::GetVirtualFolders(), wxArrayString::Index(), wxTreeCtrl::InsertItem(), wxString::IsEmpty(), wxTreeCtrl::IsExpanded(), wxTreeItemId::IsOk(), wxString::IsSameAs(), wxTreeCtrl::ItemHasChildren(), wxString::Last(), wxString::Left(), wxString::Length(), LogManager::Log(), m_isCheckingForExternallyModifiedProjects, wxString::Matches(), wxString::Mid(), PlaceWindow(), wxString::Prepend(), wxString::Printf(), Manager::ProcessEvent(), cbProjectManagerUI::RebuildTree(), ProjectManager::ReloadProject(), wxString::Remove(), wxString::RemoveLast(), cbProject::RemoveVirtualFolders(), wxString::Replace(), cbProject::ReplaceVirtualFolder(), wxString::Right(), HTMLTags::sep, FileTreeData::SetFolder(), wxTreeCtrl::SetItemTextColour(), FileTreeData::SetKind(), cbProject::SetModified(), FileTreeData::SetProjectFile(), cbProject::SetVirtualFolders(), wxDialog::ShowModal(), wxTreeCtrl::SortChildren(), wxString::StartsWith(), cbProject::Touch(), ProjectFile::virtual_path, cbProjectTreeImages::VirtualFolderIconIndex(), wxICON_ERROR, wxICON_WARNING, wxID_OK, wxNOT_FOUND, wxOK, and wxT.
Referenced by GetTree().
|
virtual |
Implements cbProjectManagerUI.
Definition at line 431 of file projectmanagerui.cpp.
References _(), Manager::IsAppShuttingDown(), m_pTree, m_TreeRoot, RebuildTree(), and wxTreeCtrl::SetItemText().
Referenced by GetTree().
|
virtual |
Displays a dialog to setup project dependencies.
base | The project to setup its dependencies. Can be NULL (default) because there's a project selection combo in the dialog. |
Implements cbProjectManagerUI.
Definition at line 2663 of file projectmanagerui.cpp.
References Manager::Get(), PlaceWindow(), and wxDialog::ShowModal().
Referenced by GetTree().
void ProjectManagerUI::CreateMenu | ( | wxMenuBar * | menuBar | ) |
Definition at line 489 of file projectmanagerui.cpp.
References _(), _T, wxMenu::Append(), wxMenu::AppendSeparator(), CreateMenuTreeProps(), wxMenuBar::FindMenu(), wxMenuBar::GetMenu(), wxMenu::GetMenuItemCount(), wxMenu::Insert(), and wxID_SEPARATOR.
Referenced by GetTree().
|
private |
Definition at line 527 of file projectmanagerui.cpp.
References _(), _T, wxMenu::Append(), wxMenu::AppendCheckItem(), wxMenu::AppendSeparator(), wxMenu::Check(), wxMenu::Enable(), Manager::Get(), Manager::GetConfigManager(), ConfigManager::ReadBool(), and ConfigManager::Write().
Referenced by CreateMenu(), GetTree(), and ShowMenu().
|
private |
Definition at line 762 of file projectmanagerui.cpp.
References _(), EditorBase::Activate(), wxString::c_str(), cbMessageBox(), wxFileName::FileExists(), FileTypeOf(), ftHeader, ftSource, ftTemplateSource, fvsMissing, Manager::Get(), Manager::GetEditorManager(), Manager::GetLogManager(), PluginManager::GetMIMEHandlerForFile(), PluginManager::GetPluginInfo(), Manager::GetPluginManager(), EditorBase::IsBuiltinEditor(), EditorManager::IsOpen(), LogManager::LogError(), cbMimePlugin::OpenFile(), wxString::Printf(), ProjectFile::SetFileState(), and PluginInfo::title.
Referenced by DoOpenSelectedFile(), GetTree(), OnFindFile(), OnGotoFile(), and OpenFilesRecursively().
|
private |
Definition at line 822 of file projectmanagerui.cpp.
References DoOpenFile(), wxTreeCtrl::GetItemData(), GetTreeSelection(), wxTreeItemId::IsOk(), and m_pTree.
Referenced by GetTree(), OnOpenFile(), and OnProjectFileActivated().
void ProjectManagerUI::FinishLoadingProject | ( | cbProject * | project, |
bool | newAddition, | ||
cb_unused FilesGroupsAndMasks * | fgam | ||
) |
Definition at line 441 of file projectmanagerui.cpp.
References BuildProjectTree(), wxTreeCtrl::Expand(), Manager::Get(), ProjectManager::GetFilesGroupsAndMasks(), Manager::GetProjectManager(), cbProject::GetProjectNode(), m_pTree, m_TreeRoot, m_TreeVisualState, and RebuildTree().
Referenced by GetTree().
|
virtual |
Implements cbProjectManagerUI.
Definition at line 454 of file projectmanagerui.cpp.
References wxTreeCtrl::Expand(), cbProject::GetProjectNode(), m_pTree, m_TreeRoot, RebuildTree(), wxTreeCtrl::SetItemText(), and UnfreezeTree().
Referenced by GetTree().
|
virtual |
Stop the tree control from updating.
Implements cbProjectManagerUI.
Definition at line 361 of file projectmanagerui.cpp.
References m_pTree, and m_TreeFreezeCounter.
Referenced by BeginLoadingWorkspace(), GetTree(), and RebuildTree().
|
inlinevirtual |
Implements cbProjectManagerUI.
Definition at line 23 of file projectmanagerui.h.
References m_pNotebook.
|
inlinevirtual |
Retrieve a pointer to the project manager's tree (GUI).
Implements cbProjectManagerUI.
Definition at line 28 of file projectmanagerui.h.
References AskForBuildTargetIndex(), AskForMultiBuildTargetIndex(), BeginLoadingWorkspace(), BuildProjectTree(), BuildTree(), CheckForExternallyModifiedProjects(), CloseWorkspace(), ConfigureProjectDependencies(), CreateMenu(), CreateMenuTreeProps(), DoOpenFile(), DoOpenSelectedFile(), FinishLoadingProject(), FinishLoadingWorkspace(), FreezeTree(), GetTreeSelection(), InitPane(), ListNodes(), m_pTree, MoveProjectDown(), MoveProjectUp(), OnAddFilesToProjectRecursively(), OnAddFileToProject(), OnAddVirtualFolder(), OnBeginEditNode(), OnCloseFile(), OnCloseProject(), OnCloseWorkspace(), OnDeleteVirtualFolder(), OnEndEditNode(), OnExecParameters(), OnFileOptions(), OnFindFile(), OnGotoFile(), OnIdle(), OnKeyDown(), OnNotes(), OnOpenFile(), OnOpenFolderFiles(), OnOpenWith(), OnProjectFileActivated(), OnProperties(), OnRemoveFileFromProject(), OnRenameFile(), OnRenameVirtualFolder(), OnRenameWorkspace(), OnRightClick(), OnSaveAsWorkspace(), OnSaveFile(), OnSaveProject(), OnSaveWorkspace(), OnSetActiveProject(), OnTabContextMenu(), OnTabPosition(), OnTreeBeginDrag(), OnTreeEndDrag(), OnTreeItemRightClick(), OnUpdateUI(), OnViewCategorize(), OnViewFileMasks(), OnViewHideFolderName(), OnViewUseFolders(), OpenFilesRecursively(), QueryCloseAllProjects(), QueryCloseProject(), QueryCloseWorkspace(), RebuildTree(), RemoveFilesRecursively(), RemoveProject(), ShowFileInTree(), ShowMenu(), SwitchToProjectsPage(), UnfreezeTree(), and UpdateActiveProject().
|
virtual |
Get the selection of the project manager's tree (GUI).
This must be used instead of tree->GetSelection() because the tree has the wxTR_MULTIPLE style. This usually returns the first item in the selection list, but if there is a right-click popup menu then the user may have selected several items and right-clicked on one, so return the right-click item instead. of the first
Implements cbProjectManagerUI.
Definition at line 406 of file projectmanagerui.cpp.
References wxTreeCtrl::GetSelections(), wxTreeItemId::IsOk(), m_pTree, and m_RightClickItem.
Referenced by DoOpenSelectedFile(), GetTree(), OnAddFilesToProjectRecursively(), OnAddFileToProject(), OnAddVirtualFolder(), OnCloseFile(), OnDeleteVirtualFolder(), OnFindFile(), OnOpenFolderFiles(), OnOpenWith(), OnProperties(), OnRemoveFileFromProject(), OnRenameFile(), OnRenameVirtualFolder(), OnSaveFile(), OnSaveProject(), and OnSetActiveProject().
|
private |
Definition at line 252 of file projectmanagerui.cpp.
References _(), cbAuiNotebook::AddPage(), BuildTree(), Manager::IsAppShuttingDown(), m_pNotebook, and m_pTree.
Referenced by GetTree().
|
private |
Definition at line 2084 of file projectmanagerui.cpp.
References wxArrayString::Add(), wxArrayString::GetCount(), wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemText(), wxTreeCtrl::GetNextChild(), wxTreeItemId::IsOk(), wxTreeCtrl::ItemHasChildren(), wxArrayString::Last(), m_pTree, and wxT.
Referenced by GetTree(), and OnFindFile().
|
private |
Move a project down in the project manager tree.
This effectively re-orders the projects build order.
project | The project to move down. |
warpAround | If true and the project is at the bottom of the list order, then it wraps and goes to the top of the list. |
Definition at line 2507 of file projectmanagerui.cpp.
References cbAssert, wxTreeCtrl::EnsureVisible(), Manager::Get(), Manager::GetProjectManager(), cbProject::GetProjectNode(), ProjectManager::GetProjects(), ProjectManager::GetWorkspace(), wxTreeItemId::IsOk(), m_pTree, RebuildTree(), wxTreeCtrl::SelectItem(), cbWorkspace::SetModified(), and wxNOT_FOUND.
Referenced by GetTree(), and OnSetActiveProject().
|
private |
Move a project up in the project manager tree.
This effectively re-orders the projects build order.
project | The project to move up. |
warpAround | If true and the project is at the top of the list order, then it wraps and goes to the bottom of the list. |
Definition at line 2476 of file projectmanagerui.cpp.
References cbAssert, wxTreeCtrl::EnsureVisible(), Manager::Get(), Manager::GetProjectManager(), cbProject::GetProjectNode(), ProjectManager::GetProjects(), ProjectManager::GetWorkspace(), wxTreeItemId::IsOk(), m_pTree, RebuildTree(), wxTreeCtrl::SelectItem(), cbWorkspace::SetModified(), and wxNOT_FOUND.
Referenced by GetTree(), and OnSetActiveProject().
|
private |
Definition at line 1263 of file projectmanagerui.cpp.
References _(), _T, ProjectManager::AddMultipleFilesToProject(), ChooseDirectory(), Manager::Get(), ProjectManager::GetActiveProject(), wxDir::GetAllFiles(), CompileTargetBase::GetBasePath(), cbProject::GetBuildTargetsCount(), wxArrayString::GetCount(), FilesGroupsAndMasks::GetFileMasks(), ProjectManager::GetFilesGroupsAndMasks(), FilesGroupsAndMasks::GetGroupsCount(), wxTreeCtrl::GetItemData(), Manager::GetProjectManager(), MultiSelectDlg::GetSelectedStrings(), GetTreeSelection(), wxString::IsEmpty(), wxTreeItemId::IsOk(), m_pTree, PlaceWindow(), RebuildTree(), wxArrayString::RemoveAt(), wxDialog::ShowModal(), wxDIR_DIRS, wxDIR_FILES, wxDirExists(), wxEmptyString, and wxID_OK.
Referenced by GetTree().
|
private |
Definition at line 1353 of file projectmanagerui.cpp.
References _(), wxArrayString::Add(), ProjectManager::AddMultipleFilesToProject(), FileTreeData::ftdkFile, FileTreeData::ftdkFolder, FileTreeData::ftdkProject, FileTreeData::ftdkUndefined, FileTreeData::ftdkVirtualFolder, FileTreeData::ftdkVirtualGroup, Manager::Get(), ProjectManager::GetActiveProject(), Manager::GetAppWindow(), CompileTargetBase::GetBasePath(), cbProject::GetBuildTargetsCount(), cbProject::GetFilesList(), FileFilters::GetFilterString(), wxTreeCtrl::GetFirstChild(), FileFilters::GetIndexForFilterAll(), wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), wxTreeCtrl::GetNextChild(), wxFileDialog::GetPaths(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), Manager::GetProjectManager(), GetTreeSelection(), wxTreeItemId::IsOk(), m_pTree, PlaceWindow(), RebuildTree(), ProjectFile::relativeFilename, wxFileDialog::SetFilterIndex(), wxFileDialog::ShowModal(), wxDirExists(), wxEmptyString, wxFD_FILE_MUST_EXIST, wxFD_MULTIPLE, wxFD_OPEN, and wxID_OK.
Referenced by GetTree().
|
private |
Definition at line 2243 of file projectmanagerui.cpp.
References _(), cbGetTextFromUser(), wxTreeCtrl::GetItemData(), FileTreeData::GetProject(), GetTreeSelection(), wxString::IsEmpty(), wxTreeItemId::IsOk(), and m_pTree.
Referenced by GetTree().
|
private |
Definition at line 2314 of file projectmanagerui.cpp.
References FileTreeData::ftdkVirtualFolder, wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), and m_pTree.
Referenced by GetTree().
|
private |
Definition at line 1615 of file projectmanagerui.cpp.
References EditorManager::Close(), Manager::Get(), Manager::GetEditorManager(), wxTreeCtrl::GetItemData(), GetTreeSelection(), wxTreeItemId::IsOk(), and m_pTree.
Referenced by GetTree().
|
private |
Definition at line 1562 of file projectmanagerui.cpp.
References ProjectManager::CloseProject(), FileTreeData::ftdkProject, Manager::Get(), ProjectManager::GetActiveProject(), Manager::GetAppWindow(), cbProject::GetCurrentlyCompilingTarget(), wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), FileTreeData::GetProject(), Manager::GetProjectManager(), ProjectManager::GetProjects(), wxTreeCtrl::GetSelections(), ProjectManager::IsLoadingProject(), m_pTree, ProjectManager::SetProject(), and wxBell().
Referenced by GetTree().
|
private |
Definition at line 1200 of file projectmanagerui.cpp.
References ProjectManager::CloseWorkspace(), Manager::Get(), Manager::GetProjectManager(), and ProjectManager::GetWorkspace().
Referenced by GetTree().
|
private |
Definition at line 2265 of file projectmanagerui.cpp.
References wxTreeCtrl::GetItemData(), FileTreeData::GetProject(), GetTreeSelection(), wxTreeItemId::IsOk(), m_pTree, and RebuildTree().
Referenced by GetTree().
|
private |
Definition at line 2337 of file projectmanagerui.cpp.
References wxTreeEvent::GetItem(), wxTreeCtrl::GetItemData(), FileTreeData::GetProject(), and m_pTree.
Referenced by GetTree().
|
private |
Definition at line 1082 of file projectmanagerui.cpp.
References Manager::Get(), ProjectManager::GetActiveProject(), Manager::GetProjectManager(), and cbProject::SelectTarget().
Referenced by GetTree().
|
private |
Definition at line 1813 of file projectmanagerui.cpp.
References applyFileOptionChange(), ProjectFile::compile, ProjectFile::link, m_pTree, and RebuildTree().
Referenced by GetTree().
|
private |
Definition at line 2104 of file projectmanagerui.cpp.
References _(), wxArrayString::Add(), GotoFile::AddControlBelowList(), DoOpenFile(), FileTreeData::ftdkProject, Manager::Get(), Manager::GetConfigManager(), CompileTargetBase::GetFilename(), wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetItemText(), FileTreeData::GetKind(), wxTreeCtrl::GetNextChild(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), Manager::GetProjectManager(), ProjectManager::GetProjects(), GotoFile::GetSelection(), CompileTargetBase::GetTitle(), GetTreeSelection(), ProjectManager::GetWorkspace(), wxCheckBox::IsChecked(), wxArrayString::IsEmpty(), wxTreeItemId::IsOk(), wxString::length(), wxString::Length(), ListNodes(), m_pTree, wxString::Mid(), PlaceWindow(), ConfigManager::ReadBool(), wxTreeCtrl::SelectItem(), ProjectManager::SetProject(), wxCheckBox::SetValue(), wxDialog::ShowModal(), wxString::StartsWith(), wxTreeCtrl::UnselectAll(), ConfigManager::Write(), wxID_ANY, wxID_OK, wxNOT_FOUND, and wxT.
Referenced by GetTree().
|
private |
Definition at line 1893 of file projectmanagerui.cpp.
References _(), LogManager::DebugLog(), DoOpenFile(), ProjectFile::file, Manager::Get(), ProjectManager::GetActiveProject(), cbProject::GetFilesList(), wxFileName::GetFullPath(), Manager::GetLogManager(), ProjectFile::GetParentProject(), Manager::GetProjectManager(), ProjectManager::GetProjects(), GotoFile::GetSelection(), CompileTargetBase::GetTitle(), wxString::length(), PlaceWindow(), ProjectFile::relativeFilename, wxDialog::ShowModal(), wxID_OK, and wxT.
Referenced by GetTree().
|
private |
Definition at line 2401 of file projectmanagerui.cpp.
Referenced by GetTree().
|
private |
Definition at line 2458 of file projectmanagerui.cpp.
References Manager::Get(), ProjectManager::GetActiveProject(), cbProject::GetCurrentlyCompilingTarget(), wxKeyEvent::GetKeyCode(), Manager::GetProjectManager(), m_DraggingSelection, OnRemoveFileFromProject(), WXK_DELETE, and WXK_NUMPAD_DELETE.
Referenced by GetTree().
|
private |
Definition at line 1692 of file projectmanagerui.cpp.
References Manager::Get(), and Manager::GetProjectManager().
Referenced by GetTree().
|
private |
Definition at line 1628 of file projectmanagerui.cpp.
References DoOpenSelectedFile().
Referenced by GetTree().
|
private |
Definition at line 1633 of file projectmanagerui.cpp.
References _(), cbMessageBox(), FileTreeData::ftdkFolder, FileTreeData::ftdkVirtualFolder, wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), GetTreeSelection(), m_pTree, OpenFilesRecursively(), wxICON_QUESTION, wxID_YES, wxNO_DEFAULT, and wxYES_NO.
Referenced by GetTree().
|
private |
Definition at line 1657 of file projectmanagerui.cpp.
References _(), wxString::c_str(), Manager::Get(), Manager::GetEditorManager(), wxTreeCtrl::GetItemData(), Manager::GetLogManager(), PluginManager::GetMimeOffers(), Manager::GetPluginManager(), FileTreeData::GetProjectFile(), GetTreeSelection(), wxTreeItemId::IsOk(), LogManager::LogError(), m_pTree, EditorManager::Open(), cbMimePlugin::OpenFile(), and wxString::Printf().
Referenced by GetTree().
|
private |
Definition at line 1056 of file projectmanagerui.cpp.
References wxTreeCtrl::Collapse(), DoOpenSelectedFile(), wxTreeCtrl::Expand(), FileTreeData::ftdkFolder, FileTreeData::ftdkProject, FileTreeData::ftdkVirtualFolder, FileTreeData::ftdkVirtualGroup, Manager::Get(), ProjectManager::GetActiveProject(), wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), FileTreeData::GetProject(), Manager::GetProjectManager(), ProjectManager::GetWorkspace(), wxTreeCtrl::IsExpanded(), m_pTree, m_TreeRoot, and ProjectManager::SetProject().
Referenced by GetTree().
|
private |
Definition at line 1698 of file projectmanagerui.cpp.
References _(), _T, wxString::EndsWith(), Manager::Get(), ProjectManager::GetActiveProject(), Manager::GetAppWindow(), EditorManager::GetBuiltinActiveEditor(), Manager::GetEditorManager(), FileTreeData::GetFileIndex(), wxTreeCtrl::GetItemData(), EditorManager::GetNotebook(), wxAuiNotebook::GetPageCount(), wxAuiNotebook::GetPageToolTip(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), Manager::GetProjectManager(), CompileTargetBase::GetTitle(), GetTreeSelection(), wxTreeItemId::IsOk(), m_pTree, PlaceWindow(), wxString::Replace(), wxAuiNotebook::SetPageToolTip(), and ProjectManager::SetProject().
Referenced by GetTree().
|
private |
Definition at line 1442 of file projectmanagerui.cpp.
References _(), _T, cbProject::BeginRemoveFiles(), wxString::c_str(), cbProject::CalculateCommonTopLevelPath(), cbMessageBox(), LogManager::DebugLog(), wxTreeCtrl::Delete(), cbProject::EndRemoveFiles(), F(), FileTreeData::ftdkFolder, FileTreeData::ftdkVirtualFolder, Manager::Get(), cbProject::GetCommonTopLevelPath(), cbProject::GetFileByFilename(), wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), Manager::GetLogManager(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), Manager::GetProjectManager(), MultiSelectDlg::GetSelectedIndices(), CompileTargetBase::GetTitle(), GetTreeSelection(), wxTreeItemId::IsOk(), m_pTree, PlaceWindow(), wxString::Printf(), RebuildTree(), ProjectManager::RemoveFileFromProject(), RemoveFilesRecursively(), wxDialog::ShowModal(), wxArrayString::Sort(), wxICON_QUESTION, wxICON_WARNING, wxID_OK, wxID_YES, wxNO_DEFAULT, and wxYES_NO.
Referenced by GetTree(), and OnKeyDown().
|
private |
Definition at line 2406 of file projectmanagerui.cpp.
References _(), ProjectFile::AutoGeneratedBy(), cbMessageBox(), ProjectFile::file, Manager::Get(), wxFileName::GetFullName(), wxTreeCtrl::GetItemData(), wxFileName::GetPath(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), GetTreeSelection(), wxTreeItemId::IsOk(), wxString::Lower(), m_pTree, PlaceWindow(), RebuildTree(), wxDialog::ShowModal(), wxBell(), wxCANCEL, wxCENTRE, wxID_OK, wxOK, and wxRenameFile().
Referenced by GetTree().
|
private |
Definition at line 2283 of file projectmanagerui.cpp.
References _(), _T, wxString::EndsWith(), Manager::Get(), FileTreeData::GetFolder(), wxTreeCtrl::GetItemData(), FileTreeData::GetProject(), GetTreeSelection(), wxTreeItemId::IsOk(), m_pTree, RebuildTree(), wxString::RemoveLast(), wxDialog::ShowModal(), wxCANCEL, wxCENTRE, wxID_OK, and wxOK.
Referenced by GetTree().
|
private |
Definition at line 1170 of file projectmanagerui.cpp.
References _(), cbGetTextFromUser(), Manager::Get(), Manager::GetProjectManager(), cbWorkspace::GetTitle(), ProjectManager::GetWorkspace(), wxString::IsEmpty(), m_pTree, m_TreeRoot, wxTreeCtrl::SetItemText(), and cbWorkspace::SetTitle().
Referenced by GetTree().
|
private |
Definition at line 1088 of file projectmanagerui.cpp.
References _(), wxMenu::Append(), wxMenu::AppendCheckItem(), wxMenu::AppendSeparator(), PluginManager::AskPluginsForModuleMenu(), wxMenu::Check(), wxMenu::Enable(), Manager::Get(), ProjectManager::GetActiveProject(), cbProject::GetCurrentlyCompilingTarget(), wxMenu::GetMenuItemCount(), Manager::GetPluginManager(), Manager::GetProjectManager(), ProjectManager::GetWorkspace(), m_pTree, m_TreeVisualState, mtProjectManager, ptvsCategorize, ptvsHideFolderName, ptvsUseFolders, and wxGetMousePosition().
Referenced by GetTree(), and ShowMenu().
|
private |
Definition at line 1193 of file projectmanagerui.cpp.
References _T, Manager::Get(), Manager::GetProjectManager(), ProjectManager::GetWorkspace(), and ProjectManager::SaveWorkspaceAs().
Referenced by GetTree().
|
private |
Definition at line 1602 of file projectmanagerui.cpp.
References Manager::Get(), Manager::GetEditorManager(), wxTreeCtrl::GetItemData(), GetTreeSelection(), wxTreeItemId::IsOk(), m_pTree, and EditorManager::Save().
Referenced by GetTree().
|
private |
Definition at line 1541 of file projectmanagerui.cpp.
References Manager::Get(), wxTreeCtrl::GetItemData(), Manager::GetProjectManager(), GetTreeSelection(), ProjectManager::IsLoadingProject(), wxTreeItemId::IsOk(), m_pTree, ProjectManager::SaveProject(), and wxBell().
Referenced by GetTree().
|
private |
Definition at line 1186 of file projectmanagerui.cpp.
References Manager::Get(), Manager::GetProjectManager(), ProjectManager::GetWorkspace(), and ProjectManager::SaveWorkspace().
Referenced by GetTree().
|
private |
Definition at line 1207 of file projectmanagerui.cpp.
References Manager::Get(), ProjectManager::GetActiveProject(), wxTreeCtrl::GetItemData(), FileTreeData::GetProject(), Manager::GetProjectManager(), ProjectManager::GetProjects(), GetTreeSelection(), wxTreeItemId::IsOk(), m_pTree, MoveProjectDown(), MoveProjectUp(), ProjectManager::SetProject(), and wxNOT_FOUND.
Referenced by GetTree().
|
private |
Definition at line 909 of file projectmanagerui.cpp.
References _(), _T, wxMenu::Append(), Manager::Get(), Manager::GetConfigManager(), and m_pNotebook.
Referenced by GetTree().
|
private |
Definition at line 920 of file projectmanagerui.cpp.
References _T, Manager::Get(), Manager::GetConfigManager(), m_pNotebook, and ConfigManager::Write().
Referenced by GetTree().
|
private |
Definition at line 933 of file projectmanagerui.cpp.
References _T, wxArrayString::Add(), wxDropSource::DoDragDrop(), ProjectFile::file, FileTreeData::ftdkFile, FileTreeData::ftdkProject, CompileTargetBase::GetFilename(), wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), wxFileName::GetLongPath(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), wxTreeCtrl::GetSelections(), GetStringFromArray(), wxArrayString::IsEmpty(), m_DraggingSelection, m_pTree, wxDropSource::SetData(), wxCURSOR_HAND, wxFindWindowAtPoint(), wxGetMousePosition(), wxGetMouseState(), wxMilliSleep(), wxNullCursor, and wxT.
Referenced by GetTree().
|
private |
Definition at line 1009 of file projectmanagerui.cpp.
References wxTreeCtrl::GetItemData(), FileTreeData::GetProject(), wxTreeItemId::IsOk(), m_DraggingSelection, m_pTree, and wxNullCursor.
Referenced by GetTree().
|
private |
Definition at line 1152 of file projectmanagerui.cpp.
References Manager::Get(), wxTreeEvent::GetItem(), Manager::GetProjectManager(), m_pTree, m_RightClickItem, wxTreeCtrl::SelectItem(), ShowMenu(), wxTreeItemId::Unset(), and wxBell().
Referenced by GetTree().
|
private |
Definition at line 2357 of file projectmanagerui.cpp.
References cbHasRunningCompilers(), g_StartHereTitle, Manager::Get(), EditorManager::GetActiveEditor(), ProjectManager::GetActiveProject(), EditorManager::GetEditor(), Manager::GetEditorManager(), ProjectManager::GetIsRunning(), and Manager::GetProjectManager().
Referenced by GetTree().
|
private |
Definition at line 2009 of file projectmanagerui.cpp.
References _T, Manager::Get(), Manager::GetAppFrame(), Manager::GetConfigManager(), m_TreeVisualState, ptvsCategorize, RebuildTree(), and ConfigManager::Write().
Referenced by GetTree().
|
private |
Definition at line 2072 of file projectmanagerui.cpp.
References Manager::Get(), ProjectManager::GetFilesGroupsAndMasks(), Manager::GetProjectManager(), PlaceWindow(), RebuildTree(), FilesGroupsAndMasks::Save(), wxDialog::ShowModal(), and wxID_OK.
Referenced by GetTree().
|
private |
Definition at line 2048 of file projectmanagerui.cpp.
References _T, Manager::Get(), Manager::GetAppFrame(), Manager::GetConfigManager(), m_TreeVisualState, ptvsHideFolderName, ptvsUseFolders, RebuildTree(), and ConfigManager::Write().
Referenced by GetTree().
|
private |
Definition at line 2024 of file projectmanagerui.cpp.
References _T, Manager::Get(), Manager::GetAppFrame(), Manager::GetConfigManager(), m_TreeVisualState, ptvsHideFolderName, ptvsUseFolders, RebuildTree(), and ConfigManager::Write().
Referenced by GetTree().
|
private |
Definition at line 870 of file projectmanagerui.cpp.
References DoOpenFile(), FileTreeData::ftdkFile, FileTreeData::ftdkFolder, FileTreeData::ftdkVirtualFolder, wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), FileTreeData::GetKind(), wxTreeCtrl::GetNextChild(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), wxTreeItemId::IsOk(), and m_pTree.
Referenced by GetTree(), and OnOpenFolderFiles().
|
virtual |
Checks whether all projects are saved.
If not, asks the user to save and saves accordingly.
Implements cbProjectManagerUI.
Definition at line 2539 of file projectmanagerui.cpp.
References Manager::Get(), Manager::GetProjectManager(), ProjectManager::GetProjects(), and QueryCloseProject().
Referenced by GetTree(), and QueryCloseWorkspace().
|
virtual |
Checks whether project is saved.
If not, asks the user to save and saves accordingly.
Implements cbProjectManagerUI.
Definition at line 2555 of file projectmanagerui.cpp.
References _(), wxString::c_str(), cbMessageBox(), cbProject::GetCurrentlyCompilingTarget(), cbProject::GetModified(), CompileTargetBase::GetTitle(), Manager::IsBatchBuild(), wxString::Printf(), cbProject::QueryCloseAllFiles(), cbProject::Save(), wxCANCEL, wxICON_QUESTION, wxID_CANCEL, wxID_NO, wxID_YES, and wxYES_NO.
Referenced by GetTree(), and QueryCloseAllProjects().
|
virtual |
Asks user to save the workspace, projects and files (Yes/No/cancel).
If user pressed Yes, it saves accordingly.
Implements cbProjectManagerUI.
Definition at line 2585 of file projectmanagerui.cpp.
References _(), _T, wxString::c_str(), cbMessageBox(), Manager::Get(), Manager::GetConfigManager(), cbWorkspace::GetModified(), Manager::GetProjectManager(), cbWorkspace::GetTitle(), ProjectManager::GetWorkspace(), cbWorkspace::IsDefault(), wxString::Printf(), QueryCloseAllProjects(), ConfigManager::ReadBool(), cbWorkspace::SaveLayout(), ProjectManager::SaveWorkspace(), wxCANCEL, wxICON_QUESTION, wxID_CANCEL, wxID_YES, and wxYES_NO.
Referenced by GetTree().
|
virtual |
Rebuild the project manager's tree.
Implements cbProjectManagerUI.
Definition at line 314 of file projectmanagerui.cpp.
References _(), wxFile::Access(), wxTreeCtrl::AddRoot(), BuildProjectTree(), wxString::c_str(), wxTreeCtrl::DeleteAllItems(), wxFile::Exists(), wxTreeCtrl::Expand(), FreezeTree(), Manager::Get(), ProjectManager::GetActiveProject(), cbWorkspace::GetFilename(), ProjectManager::GetFilesGroupsAndMasks(), Manager::GetProjectManager(), ProjectManager::GetProjects(), cbWorkspace::GetTitle(), ProjectManager::GetWorkspace(), Manager::IsAppShuttingDown(), wxString::IsEmpty(), m_pTree, m_TreeRoot, m_TreeVisualState, wxTreeCtrl::SetItemBold(), UnfreezeTree(), cbProjectTreeImages::WorkspaceIconIndex(), and wxFile::write.
Referenced by CloseWorkspace(), FinishLoadingProject(), FinishLoadingWorkspace(), GetTree(), MoveProjectDown(), MoveProjectUp(), OnAddFilesToProjectRecursively(), OnAddFileToProject(), OnDeleteVirtualFolder(), OnFileOptions(), OnRemoveFileFromProject(), OnRenameFile(), OnRenameVirtualFolder(), OnViewCategorize(), OnViewFileMasks(), OnViewHideFolderName(), OnViewUseFolders(), and UpdateActiveProject().
|
private |
Definition at line 835 of file projectmanagerui.cpp.
References FileTreeData::ftdkFile, FileTreeData::ftdkFolder, FileTreeData::ftdkVirtualFolder, Manager::Get(), wxTreeCtrl::GetFirstChild(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetNextChild(), Manager::GetProjectManager(), wxTreeItemId::IsOk(), m_pTree, and ProjectManager::RemoveFileFromProject().
Referenced by GetTree(), and OnRemoveFileFromProject().
|
virtual |
Implements cbProjectManagerUI.
Definition at line 401 of file projectmanagerui.cpp.
References wxTreeCtrl::Delete(), cbProject::GetProjectNode(), and m_pTree.
Referenced by GetTree().
|
virtual |
Implements cbProjectManagerUI.
Definition at line 476 of file projectmanagerui.cpp.
References wxTreeCtrl::EnsureVisible(), ProjectFile::GetTreeItemId(), wxTreeItemId::IsOk(), m_pTree, wxTreeCtrl::SelectItem(), and wxTreeCtrl::UnselectAll().
Referenced by GetTree().
|
private |
Definition at line 569 of file projectmanagerui.cpp.
References _(), wxMenu::Append(), wxMenu::AppendCheckItem(), wxMenu::AppendSeparator(), wxMenu::AppendSubMenu(), PluginManager::AskPluginsForModuleMenu(), wxString::c_str(), cbMimePlugin::CanHandleFile(), cbHasRunningCompilers(), wxMenu::Check(), CreateMenuTreeProps(), wxMenu::Enable(), wxMenuItem::Enable(), ProjectFile::file, wxString::Format(), FileTreeData::ftdkFile, FileTreeData::ftdkFolder, FileTreeData::ftdkProject, FileTreeData::ftdkVirtualFolder, FileTreeData::ftdkVirtualGroup, fvsNormal, Manager::Get(), EditorManager::GetActiveEditor(), ProjectManager::GetActiveProject(), cbProject::GetCommonTopLevelPath(), Manager::GetEditorManager(), ProjectFile::GetFileState(), FileTreeData::GetFolder(), wxFileName::GetFullPath(), wxTreeCtrl::GetItemData(), wxTreeCtrl::GetItemText(), FileTreeData::GetKind(), wxMenu::GetMenuItemCount(), PluginManager::GetMimeOffers(), PluginManager::GetPluginInfo(), Manager::GetPluginManager(), FileTreeData::GetProject(), FileTreeData::GetProjectFile(), Manager::GetProjectManager(), ProjectManager::GetProjects(), ProjectManager::GetWorkspace(), EditorManager::IsOpen(), m_pTree, wxFileName::MakeRelativeTo(), mtProjectManager, OnRightClick(), wxString::Printf(), PluginInfo::title, and wxID_ANY.
Referenced by GetTree(), and OnTreeItemRightClick().
|
privatevirtual |
Switches the management's notebook to the Projects tab.
Implements cbProjectManagerUI.
Definition at line 465 of file projectmanagerui.cpp.
References cbEVT_SHOW_DOCK_WINDOW, Manager::Get(), wxAuiNotebook::GetPageIndex(), m_pNotebook, m_pTree, Manager::ProcessEvent(), CodeBlocksDockEvent::pWindow, wxAuiNotebook::SetSelection(), and wxNOT_FOUND.
Referenced by GetTree().
|
virtual |
Le the tree control be updated again.
force | If true the tree control is forced to un-freeze. Else it depends on freeze-unfreeze balance (see note). |
Implements cbProjectManagerUI.
Definition at line 370 of file projectmanagerui.cpp.
References m_pTree, and m_TreeFreezeCounter.
Referenced by BeginLoadingWorkspace(), FinishLoadingWorkspace(), GetTree(), and RebuildTree().
|
virtual |
Implements cbProjectManagerUI.
Definition at line 382 of file projectmanagerui.cpp.
References wxTreeCtrl::EnsureVisible(), cbProject::GetProjectNode(), m_pTree, RebuildTree(), and wxTreeCtrl::SetItemBold().
Referenced by GetTree().
|
private |
Definition at line 145 of file projectmanagerui.h.
Referenced by OnKeyDown(), OnTreeBeginDrag(), and OnTreeEndDrag().
|
private |
Definition at line 147 of file projectmanagerui.h.
Referenced by CheckForExternallyModifiedProjects().
|
private |
Definition at line 142 of file projectmanagerui.h.
Referenced by BuildTree(), and ~ProjectManagerUI().
|
private |
Definition at line 139 of file projectmanagerui.h.
Referenced by BuildTree(), GetNotebook(), InitPane(), OnTabContextMenu(), OnTabPosition(), SwitchToProjectsPage(), and ~ProjectManagerUI().
|
private |
Definition at line 140 of file projectmanagerui.h.
Referenced by AskForBuildTargetIndex(), BeginLoadingWorkspace(), BuildTree(), CloseWorkspace(), DoOpenSelectedFile(), FinishLoadingProject(), FinishLoadingWorkspace(), FreezeTree(), GetTree(), GetTreeSelection(), InitPane(), ListNodes(), MoveProjectDown(), MoveProjectUp(), OnAddFilesToProjectRecursively(), OnAddFileToProject(), OnAddVirtualFolder(), OnBeginEditNode(), OnCloseFile(), OnCloseProject(), OnDeleteVirtualFolder(), OnEndEditNode(), OnFileOptions(), OnFindFile(), OnOpenFolderFiles(), OnOpenWith(), OnProjectFileActivated(), OnProperties(), OnRemoveFileFromProject(), OnRenameFile(), OnRenameVirtualFolder(), OnRenameWorkspace(), OnRightClick(), OnSaveFile(), OnSaveProject(), OnSetActiveProject(), OnTreeBeginDrag(), OnTreeEndDrag(), OnTreeItemRightClick(), OpenFilesRecursively(), RebuildTree(), RemoveFilesRecursively(), RemoveProject(), ShowFileInTree(), ShowMenu(), SwitchToProjectsPage(), UnfreezeTree(), and UpdateActiveProject().
|
private |
Definition at line 146 of file projectmanagerui.h.
Referenced by GetTreeSelection(), and OnTreeItemRightClick().
|
private |
Definition at line 144 of file projectmanagerui.h.
Referenced by FreezeTree(), and UnfreezeTree().
|
private |
Definition at line 141 of file projectmanagerui.h.
Referenced by CloseWorkspace(), FinishLoadingProject(), FinishLoadingWorkspace(), OnProjectFileActivated(), OnRenameWorkspace(), and RebuildTree().
|
private |
Definition at line 143 of file projectmanagerui.h.
Referenced by FinishLoadingProject(), OnRightClick(), OnViewCategorize(), OnViewHideFolderName(), OnViewUseFolders(), and RebuildTree().