6 #ifndef PROJECTMANAGER_H 7 #define PROJECTMANAGER_H 46 virtual void RebuildTree() = 0;
52 virtual void FreezeTree() = 0;
60 virtual void UnfreezeTree(
bool force =
false) = 0;
73 virtual void ShowFileInTree(
ProjectFile &projectFile) = 0;
75 virtual void UpdateActiveProject(
cbProject *oldProject,
cbProject *newProject,
bool refresh) = 0;
76 virtual void RemoveProject(
cbProject *project) = 0;
77 virtual void BeginLoadingWorkspace() = 0;
78 virtual void CloseWorkspace() = 0;
80 virtual void FinishLoadingWorkspace(
cbProject *activeProject,
const wxString &workspaceTitle) = 0;
87 virtual bool QueryCloseAllProjects() = 0;
95 virtual bool QueryCloseProject(
cbProject *proj,
bool dontsavefiles =
false) = 0;
104 virtual bool QueryCloseWorkspace() = 0;
111 virtual int AskForBuildTargetIndex(
cbProject* project =
nullptr) = 0;
124 virtual void ConfigureProjectDependencies(
cbProject* base =
nullptr) = 0;
127 virtual void SwitchToProjectsPage() = 0;
167 void SetDefaultPath(
const wxString& path);
172 bool IsProjectStillOpen(
cbProject* project);
194 void SetProject(
cbProject* project,
bool refresh =
true);
224 bool SaveActiveProject();
231 bool SaveActiveProjectAs();
235 bool SaveAllProjects();
242 bool CloseProject(
cbProject* project,
bool dontsave =
false,
bool refresh =
true);
246 bool CloseActiveProject(
bool dontsave =
false);
250 bool CloseAllProjects(
bool dontsave =
false);
271 int AddFileToProject(
const wxString& filename,
cbProject* project =
nullptr,
int target = -1);
325 bool SaveWorkspace();
330 bool SaveWorkspaceAs(
const wxString& filename);
335 bool CloseWorkspace();
340 bool IsLoadingProject();
344 bool IsLoadingWorkspace();
352 bool IsClosingProject();
356 bool IsClosingWorkspace();
360 bool IsLoadingOrClosing();
365 static bool IsBusy();
390 void ClearProjectDependencies(
cbProject* base);
395 void RemoveProjectFromAllDependencies(
cbProject* base);
400 const ProjectsArray* GetDependenciesForProject(
cbProject* base);
407 void WorkspaceChanged();
413 bool BeginLoadingProject();
419 void EndLoadingProject(
cbProject* project);
425 bool BeginLoadingWorkspace();
430 void EndLoadingWorkspace();
434 cbThrow(
_T(
"Can't assign a ProjectManager* !!!"));
441 void SetIsRunning(
cbPlugin *plugin);
448 bool isRelative,
bool isUnixFilename);
473 DECLARE_EVENT_TABLE()
476 #endif // PROJECTMANAGER_H
ProjectManager & operator=(cb_unused const ProjectManager &rhs)
cbPlugin * m_RunningPlugin
cbProjectManagerUI & GetUI()
bool m_CanSendWorkspaceChanged
const FilesGroupsAndMasks * GetFilesGroupsAndMasks() const
Represents a file in a Code::Blocks project.
A generic Code::Blocks event.
ProjectsArray * m_pProjects
FilesGroupsAndMasks * GetFilesGroupsAndMasks()
WX_DECLARE_HASH_MAP(cbProject *, ProjectsArray *, wxPointerHash, wxPointerEqual, DepsMap)
static bool CanShutdown()
Can the app shutdown? (actually: is ProjectManager busy at the moment?)
Represents a Code::Blocks project.
cbWorkspace * m_pWorkspace
virtual ~cbProjectManagerUI()
Base class that all "editors" should inherit from.
cbProject * GetActiveProject()
Retrieve the active project.
bool m_IsLoadingWorkspace
FilesGroupsAndMasks * m_pFileGroups
cbProject * m_pProjectToActivate
wxArray< int > wxArrayInt
The entry point singleton for working with projects.
A notebook class This class is derived from wxAuiNotebook, to enhance its abilities.
DLLIMPORT const wxString DEFAULT_WORKSPACE
cbProjectManagerUI * m_ui
WX_DEFINE_ARRAY(cbProject *, ProjectsArray)
ProjectsArray * GetProjects()
Retrieve an array of all the opened projects.
bool m_IsClosingWorkspace
cbProject * m_pActiveProject
static bool s_CanShutdown