Code::Blocks  SVN r11506
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ProjectManagerUI Class Reference

#include <projectmanagerui.h>

Inheritance diagram for ProjectManagerUI:
Collaboration diagram for ProjectManagerUI:

Public Member Functions

 ProjectManagerUI ()
 
 ~ProjectManagerUI ()
 
cbAuiNotebookGetNotebook ()
 
cbTreeCtrlGetTree ()
 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 Member Functions

void InitPane ()
 
void BuildTree ()
 
void SwitchToProjectsPage ()
 Switches the management's notebook to the Projects tab. More...
 
void ShowMenu (wxTreeItemId id, const wxPoint &pt)
 
void CreateMenuTreeProps (wxMenu *menu, bool popup)
 
void DoOpenFile (ProjectFile *pf, const wxString &filename)
 
void DoOpenSelectedFile ()
 
void RemoveFilesRecursively (wxTreeItemId &sel_id)
 
void OpenFilesRecursively (wxTreeItemId &sel_id)
 
void OnTabContextMenu (wxAuiNotebookEvent &event)
 
void OnTabPosition (wxCommandEvent &event)
 
void OnProjectFileActivated (wxTreeEvent &event)
 
void OnExecParameters (wxCommandEvent &event)
 
void OnTreeItemRightClick (wxTreeEvent &event)
 
void OnTreeBeginDrag (wxTreeEvent &event)
 
void OnTreeEndDrag (wxTreeEvent &event)
 
void OnRightClick (wxCommandEvent &event)
 
void OnRenameWorkspace (wxCommandEvent &event)
 
void OnSaveWorkspace (wxCommandEvent &event)
 
void OnSaveAsWorkspace (wxCommandEvent &event)
 
void OnCloseWorkspace (wxCommandEvent &event)
 
void OnSetActiveProject (wxCommandEvent &event)
 
void OnAddFilesToProjectRecursively (wxCommandEvent &event)
 
void OnAddFileToProject (wxCommandEvent &event)
 
void OnRemoveFileFromProject (wxCommandEvent &event)
 
void OnRenameFile (wxCommandEvent &event)
 
void OnSaveProject (wxCommandEvent &event)
 
void OnCloseProject (wxCommandEvent &event)
 
void OnSaveFile (wxCommandEvent &event)
 
void OnCloseFile (wxCommandEvent &event)
 
void OnOpenFile (wxCommandEvent &event)
 
void OnOpenFolderFiles (wxCommandEvent &event)
 
void OnOpenWith (wxCommandEvent &event)
 
void OnProperties (wxCommandEvent &event)
 
void OnFileOptions (wxCommandEvent &event)
 
void OnNotes (wxCommandEvent &event)
 
void OnGotoFile (wxCommandEvent &event)
 
void OnViewCategorize (wxCommandEvent &event)
 
void OnViewUseFolders (wxCommandEvent &event)
 
void OnViewHideFolderName (wxCommandEvent &event)
 
void OnViewFileMasks (wxCommandEvent &event)
 
void OnFindFile (wxCommandEvent &event)
 
wxArrayString ListNodes (wxTreeItemId node) const
 
void OnBeginEditNode (wxTreeEvent &event)
 
void OnEndEditNode (wxTreeEvent &event)
 
void OnAddVirtualFolder (wxCommandEvent &event)
 
void OnDeleteVirtualFolder (wxCommandEvent &event)
 
void OnRenameVirtualFolder (wxCommandEvent &event)
 
void OnUpdateUI (wxUpdateUIEvent &event)
 
void OnIdle (wxIdleEvent &event)
 
void OnKeyDown (wxTreeEvent &event)
 
void MoveProjectUp (cbProject *project, bool warpAround=false)
 Move a project up in the project manager tree. More...
 
void MoveProjectDown (cbProject *project, bool warpAround=false)
 Move a project down in the project manager tree. More...
 
void BuildProjectTree (cbProject *project, cbTreeCtrl *tree, const wxTreeItemId &root, int ptvs, FilesGroupsAndMasks *fgam)
 (Re)build the project tree. More...
 

Private Attributes

cbAuiNotebookm_pNotebook
 
cbTreeCtrlm_pTree
 
wxTreeItemId m_TreeRoot
 
wxImageListm_pImages
 
int m_TreeVisualState
 
int m_TreeFreezeCounter
 
wxArrayTreeItemIds m_DraggingSelection
 
wxTreeItemId m_RightClickItem
 
bool m_isCheckingForExternallyModifiedProjects
 

Detailed Description

Definition at line 17 of file projectmanagerui.h.

Constructor & Destructor Documentation

◆ ProjectManagerUI()

ProjectManagerUI::ProjectManagerUI ( )

◆ ~ProjectManagerUI()

ProjectManagerUI::~ProjectManagerUI ( )

Definition at line 245 of file projectmanagerui.cpp.

References m_pImages, and m_pNotebook.

Member Function Documentation

◆ AskForBuildTargetIndex()

int ProjectManagerUI::AskForBuildTargetIndex ( cbProject project)
virtual

Utility function.

Displays a single selection list of a project's build targets to choose from.

Parameters
projectThe project to use. If NULL, the active project is used.
Returns
The selected build target's index, or -1 if no build target was selected.

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().

◆ AskForMultiBuildTargetIndex()

wxArrayInt ProjectManagerUI::AskForMultiBuildTargetIndex ( cbProject project)
virtual

Utility function.

Displays a multiple selection list of a project's build targets to choose from.

Parameters
projectThe project to use. If NULL, the active project is used.
Returns
An integer array containing the selected build targets indices. This array will be empty if no build targets were selected.

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().

◆ BeginLoadingWorkspace()

void ProjectManagerUI::BeginLoadingWorkspace ( )
virtual

◆ BuildProjectTree()

void ProjectManagerUI::BuildProjectTree ( cbProject project,
cbTreeCtrl tree,
const wxTreeItemId root,
int  ptvs,
FilesGroupsAndMasks fgam 
)
private

(Re)build the project tree.

Parameters
treeThe wxTreeCtrl to use.
rootThe tree item to use as root. The project is built as a child of this item.
ptvsThe visual style of the project tree
fgamIf 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().

◆ BuildTree()

void ProjectManagerUI::BuildTree ( )
private

◆ CheckForExternallyModifiedProjects()

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().

◆ CloseWorkspace()

void ProjectManagerUI::CloseWorkspace ( )
virtual

◆ ConfigureProjectDependencies()

void ProjectManagerUI::ConfigureProjectDependencies ( cbProject base)
virtual

Displays a dialog to setup project dependencies.

Parameters
baseThe 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().

◆ CreateMenu()

void ProjectManagerUI::CreateMenu ( wxMenuBar menuBar)

◆ CreateMenuTreeProps()

void ProjectManagerUI::CreateMenuTreeProps ( wxMenu menu,
bool  popup 
)
private

◆ DoOpenFile()

void ProjectManagerUI::DoOpenFile ( ProjectFile pf,
const wxString filename 
)
private

◆ DoOpenSelectedFile()

void ProjectManagerUI::DoOpenSelectedFile ( )
private

◆ FinishLoadingProject()

void ProjectManagerUI::FinishLoadingProject ( cbProject project,
bool  newAddition,
cb_unused FilesGroupsAndMasks fgam 
)

◆ FinishLoadingWorkspace()

void ProjectManagerUI::FinishLoadingWorkspace ( cbProject activeProject,
const wxString workspaceTitle 
)
virtual

◆ FreezeTree()

void ProjectManagerUI::FreezeTree ( )
virtual

Stop the tree control from updating.

Note
This operation is accumulative. This means you have to call UnfreezeTree() as many times as you 've called FreezeTree() for the tree control to un-freeze (except if you call UnfreezeTree(true)).

Implements cbProjectManagerUI.

Definition at line 361 of file projectmanagerui.cpp.

References m_pTree, and m_TreeFreezeCounter.

Referenced by BeginLoadingWorkspace(), GetTree(), and RebuildTree().

◆ GetNotebook()

cbAuiNotebook* ProjectManagerUI::GetNotebook ( )
inlinevirtual

Implements cbProjectManagerUI.

Definition at line 23 of file projectmanagerui.h.

References m_pNotebook.

◆ GetTree()

cbTreeCtrl* ProjectManagerUI::GetTree ( )
inlinevirtual

Retrieve a pointer to the project manager's tree (GUI).

Returns
A pointer to a wxTreeCtrl window.

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().

◆ GetTreeSelection()

wxTreeItemId ProjectManagerUI::GetTreeSelection ( )
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

Returns
A wxTreeItemId of the selected tree item.

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().

◆ InitPane()

void ProjectManagerUI::InitPane ( )
private

◆ ListNodes()

wxArrayString ProjectManagerUI::ListNodes ( wxTreeItemId  node) const
private

◆ MoveProjectDown()

void ProjectManagerUI::MoveProjectDown ( cbProject project,
bool  warpAround = false 
)
private

Move a project down in the project manager tree.

This effectively re-orders the projects build order.

Parameters
projectThe project to move down.
warpAroundIf 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().

◆ MoveProjectUp()

void ProjectManagerUI::MoveProjectUp ( cbProject project,
bool  warpAround = false 
)
private

Move a project up in the project manager tree.

This effectively re-orders the projects build order.

Parameters
projectThe project to move up.
warpAroundIf 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().

◆ OnAddFilesToProjectRecursively()

void ProjectManagerUI::OnAddFilesToProjectRecursively ( wxCommandEvent event)
private

◆ OnAddFileToProject()

void ProjectManagerUI::OnAddFileToProject ( wxCommandEvent event)
private

◆ OnAddVirtualFolder()

void ProjectManagerUI::OnAddVirtualFolder ( wxCommandEvent event)
private

◆ OnBeginEditNode()

void ProjectManagerUI::OnBeginEditNode ( wxTreeEvent event)
private

◆ OnCloseFile()

void ProjectManagerUI::OnCloseFile ( wxCommandEvent event)
private

◆ OnCloseProject()

void ProjectManagerUI::OnCloseProject ( wxCommandEvent event)
private

◆ OnCloseWorkspace()

void ProjectManagerUI::OnCloseWorkspace ( wxCommandEvent event)
private

◆ OnDeleteVirtualFolder()

void ProjectManagerUI::OnDeleteVirtualFolder ( wxCommandEvent event)
private

◆ OnEndEditNode()

void ProjectManagerUI::OnEndEditNode ( wxTreeEvent event)
private

◆ OnExecParameters()

void ProjectManagerUI::OnExecParameters ( wxCommandEvent event)
private

◆ OnFileOptions()

void ProjectManagerUI::OnFileOptions ( wxCommandEvent event)
private

◆ OnFindFile()

void ProjectManagerUI::OnFindFile ( wxCommandEvent event)
private

◆ OnGotoFile()

void ProjectManagerUI::OnGotoFile ( wxCommandEvent event)
private

◆ OnIdle()

void ProjectManagerUI::OnIdle ( wxIdleEvent event)
private

Definition at line 2401 of file projectmanagerui.cpp.

Referenced by GetTree().

◆ OnKeyDown()

void ProjectManagerUI::OnKeyDown ( wxTreeEvent event)
private

◆ OnNotes()

void ProjectManagerUI::OnNotes ( wxCommandEvent event)
private

Definition at line 1692 of file projectmanagerui.cpp.

References Manager::Get(), and Manager::GetProjectManager().

Referenced by GetTree().

◆ OnOpenFile()

void ProjectManagerUI::OnOpenFile ( wxCommandEvent event)
private

Definition at line 1628 of file projectmanagerui.cpp.

References DoOpenSelectedFile().

Referenced by GetTree().

◆ OnOpenFolderFiles()

void ProjectManagerUI::OnOpenFolderFiles ( wxCommandEvent event)
private

◆ OnOpenWith()

void ProjectManagerUI::OnOpenWith ( wxCommandEvent event)
private

◆ OnProjectFileActivated()

void ProjectManagerUI::OnProjectFileActivated ( wxTreeEvent event)
private

◆ OnProperties()

void ProjectManagerUI::OnProperties ( wxCommandEvent event)
private

◆ OnRemoveFileFromProject()

void ProjectManagerUI::OnRemoveFileFromProject ( wxCommandEvent event)
private

◆ OnRenameFile()

void ProjectManagerUI::OnRenameFile ( wxCommandEvent event)
private

◆ OnRenameVirtualFolder()

void ProjectManagerUI::OnRenameVirtualFolder ( wxCommandEvent event)
private

◆ OnRenameWorkspace()

void ProjectManagerUI::OnRenameWorkspace ( wxCommandEvent event)
private

◆ OnRightClick()

void ProjectManagerUI::OnRightClick ( wxCommandEvent event)
private

◆ OnSaveAsWorkspace()

void ProjectManagerUI::OnSaveAsWorkspace ( wxCommandEvent event)
private

◆ OnSaveFile()

void ProjectManagerUI::OnSaveFile ( wxCommandEvent event)
private

◆ OnSaveProject()

void ProjectManagerUI::OnSaveProject ( wxCommandEvent event)
private

◆ OnSaveWorkspace()

void ProjectManagerUI::OnSaveWorkspace ( wxCommandEvent event)
private

◆ OnSetActiveProject()

void ProjectManagerUI::OnSetActiveProject ( wxCommandEvent event)
private

◆ OnTabContextMenu()

void ProjectManagerUI::OnTabContextMenu ( wxAuiNotebookEvent event)
private

Definition at line 909 of file projectmanagerui.cpp.

References _(), _T, wxMenu::Append(), Manager::Get(), Manager::GetConfigManager(), and m_pNotebook.

Referenced by GetTree().

◆ OnTabPosition()

void ProjectManagerUI::OnTabPosition ( wxCommandEvent event)
private

Definition at line 920 of file projectmanagerui.cpp.

References _T, Manager::Get(), Manager::GetConfigManager(), m_pNotebook, and ConfigManager::Write().

Referenced by GetTree().

◆ OnTreeBeginDrag()

void ProjectManagerUI::OnTreeBeginDrag ( wxTreeEvent event)
private

◆ OnTreeEndDrag()

void ProjectManagerUI::OnTreeEndDrag ( wxTreeEvent event)
private

◆ OnTreeItemRightClick()

void ProjectManagerUI::OnTreeItemRightClick ( wxTreeEvent event)
private

◆ OnUpdateUI()

void ProjectManagerUI::OnUpdateUI ( wxUpdateUIEvent event)
private

◆ OnViewCategorize()

void ProjectManagerUI::OnViewCategorize ( wxCommandEvent event)
private

◆ OnViewFileMasks()

void ProjectManagerUI::OnViewFileMasks ( wxCommandEvent event)
private

◆ OnViewHideFolderName()

void ProjectManagerUI::OnViewHideFolderName ( wxCommandEvent event)
private

◆ OnViewUseFolders()

void ProjectManagerUI::OnViewUseFolders ( wxCommandEvent event)
private

◆ OpenFilesRecursively()

void ProjectManagerUI::OpenFilesRecursively ( wxTreeItemId sel_id)
private

◆ QueryCloseAllProjects()

bool ProjectManagerUI::QueryCloseAllProjects ( )
virtual

Checks whether all projects are saved.

If not, asks the user to save and saves accordingly.

Returns
False if the user pressed cancel. Note: calls QueryCloseProject for all projects.

Implements cbProjectManagerUI.

Definition at line 2539 of file projectmanagerui.cpp.

References Manager::Get(), Manager::GetProjectManager(), ProjectManager::GetProjects(), and QueryCloseProject().

Referenced by GetTree(), and QueryCloseWorkspace().

◆ QueryCloseProject()

bool ProjectManagerUI::QueryCloseProject ( cbProject proj,
bool  dontsavefiles 
)
virtual

Checks whether project is saved.

If not, asks the user to save and saves accordingly.

Returns
False if the user pressed cancel. Note: By default this asks the user if he should save any unmodified files in the project.

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().

◆ QueryCloseWorkspace()

bool ProjectManagerUI::QueryCloseWorkspace ( )
virtual

Asks user to save the workspace, projects and files (Yes/No/cancel).

If user pressed Yes, it saves accordingly.

Returns
False if the user pressed cancel; true otherwise. After this function is called and returns true, it is safe to close the workspace, all files and projects without asking the user later.

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().

◆ RebuildTree()

void ProjectManagerUI::RebuildTree ( )
virtual

◆ RemoveFilesRecursively()

void ProjectManagerUI::RemoveFilesRecursively ( wxTreeItemId sel_id)
private

◆ RemoveProject()

void ProjectManagerUI::RemoveProject ( cbProject project)
virtual

Implements cbProjectManagerUI.

Definition at line 401 of file projectmanagerui.cpp.

References wxTreeCtrl::Delete(), cbProject::GetProjectNode(), and m_pTree.

Referenced by GetTree().

◆ ShowFileInTree()

void ProjectManagerUI::ShowFileInTree ( ProjectFile projectFile)
virtual

◆ ShowMenu()

void ProjectManagerUI::ShowMenu ( wxTreeItemId  id,
const wxPoint pt 
)
private

◆ SwitchToProjectsPage()

void ProjectManagerUI::SwitchToProjectsPage ( )
privatevirtual

◆ UnfreezeTree()

void ProjectManagerUI::UnfreezeTree ( bool  force = false)
virtual

Le the tree control be updated again.

Parameters
forceIf true the tree control is forced to un-freeze. Else it depends on freeze-unfreeze balance (see note).
Note
This operation is accumulative. This means you have to call UnfreezeTree() as many times as you 've called FreezeTree() for the tree control to un-freeze (except if you call UnfreezeTree(true)).

Implements cbProjectManagerUI.

Definition at line 370 of file projectmanagerui.cpp.

References m_pTree, and m_TreeFreezeCounter.

Referenced by BeginLoadingWorkspace(), FinishLoadingWorkspace(), GetTree(), and RebuildTree().

◆ UpdateActiveProject()

void ProjectManagerUI::UpdateActiveProject ( cbProject oldProject,
cbProject newProject,
bool  refresh 
)
virtual

Member Data Documentation

◆ m_DraggingSelection

wxArrayTreeItemIds ProjectManagerUI::m_DraggingSelection
private

Definition at line 145 of file projectmanagerui.h.

Referenced by OnKeyDown(), OnTreeBeginDrag(), and OnTreeEndDrag().

◆ m_isCheckingForExternallyModifiedProjects

bool ProjectManagerUI::m_isCheckingForExternallyModifiedProjects
private

Definition at line 147 of file projectmanagerui.h.

Referenced by CheckForExternallyModifiedProjects().

◆ m_pImages

wxImageList* ProjectManagerUI::m_pImages
private

Definition at line 142 of file projectmanagerui.h.

Referenced by BuildTree(), and ~ProjectManagerUI().

◆ m_pNotebook

cbAuiNotebook* ProjectManagerUI::m_pNotebook
private

◆ m_pTree

cbTreeCtrl* ProjectManagerUI::m_pTree
private

◆ m_RightClickItem

wxTreeItemId ProjectManagerUI::m_RightClickItem
private

Definition at line 146 of file projectmanagerui.h.

Referenced by GetTreeSelection(), and OnTreeItemRightClick().

◆ m_TreeFreezeCounter

int ProjectManagerUI::m_TreeFreezeCounter
private

Definition at line 144 of file projectmanagerui.h.

Referenced by FreezeTree(), and UnfreezeTree().

◆ m_TreeRoot

wxTreeItemId ProjectManagerUI::m_TreeRoot
private

◆ m_TreeVisualState

int ProjectManagerUI::m_TreeVisualState
private

The documentation for this class was generated from the following files: