Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

ProjectManager Class Reference

#include <projectmanager.h>

Inheritance diagram for ProjectManager:

List of all members.

Detailed Description

The entry point singleton for working with projects.

This is the project manager class. It handles all open projects and workspaces. It is through this class that you make requests about projects, like open a project, save it, set the active project (if more than one are opened), etc. To access a project, you must retrieve it from this class.

As all managers, this is a singleton class which you retrieve by asking the global Manager singleton. E.g. Manager::Get()->GetProjectManager()

Definition at line 48 of file projectmanager.h.

Public Member Functions

int AddFileToProject (const wxString &filename, cbProject *project, wxArrayInt &targets)
int AddFileToProject (const wxString &filename, cbProject *project=0L, int target=-1)
int AddMultipleFilesToProject (const wxArrayString &filelist, cbProject *project, wxArrayInt &targets)
int AddMultipleFilesToProject (const wxArrayString &filelist, cbProject *project, int target=-1)
bool AddProjectDependency (cbProject *base, cbProject *dependsOn)
 Adds a project as a dependency of another project. Projects inside workspaces allow you to set dependencies between them. When project A depends on project B, this means that before building project A, project B will be built because it obviously generates code that project A depends upon.
int AskForBuildTargetIndex (cbProject *project=0L)
wxArrayInt AskForMultiBuildTargetIndex (cbProject *project=0L)
bool BeginLoadingProject ()
bool BeginLoadingWorkspace ()
bool CausesCircularDependency (cbProject *base, cbProject *dependsOn)
void CheckForExternallyModifiedProjects ()
void ClearProjectDependencies (cbProject *base)
 Removes all dependencies from project base.
bool CloseActiveProject (bool dontsave=false)
bool CloseAllProjects (bool dontsave=false)
bool CloseProject (cbProject *project, bool dontsave=false, bool refresh=true)
bool CloseWorkspace ()
void ConfigureProjectDependencies (cbProject *base=0)
void EndLoadingProject (cbProject *project)
void EndLoadingWorkspace ()
int FolderIconIndex ()
void FreezeTree ()
cbProjectGetActiveProject ()
wxString GetDefaultPath ()
const ProjectsArray * GetDependenciesForProject (cbProject *base)
 Get the array of projects base depends on.
wxFlatNotebookGetNotebook ()
wxMenu * GetProjectMenu ()
ProjectsArray * GetProjects ()
EditorBaseGetTopEditor () const
wxTreeCtrl * GetTree ()
cbWorkspaceGetWorkspace ()
bool IsClosingProject ()
bool IsClosingWorkspace ()
bool IsLoading ()
bool IsLoadingOrClosing ()
bool IsLoadingProject ()
bool IsLoadingWorkspace ()
cbProjectIsOpen (const wxString &filename)
bool IsProjectStillOpen (cbProject *project)
cbProjectLoadProject (const wxString &filename, bool activateIt=true)
bool LoadWorkspace (const wxString &filename=DEFAULT_WORKSPACE)
void MoveProjectDown (cbProject *project, bool warpAround=false)
void MoveProjectUp (cbProject *project, bool warpAround=false)
cbProjectNewProject (const wxString &filename=wxEmptyString)
virtual void operator= (const ProjectManager &rhs)
int ProjectIconIndex (bool read_only=false)
 ProjectManager (const ProjectManager &rhs)
bool QueryCloseAllProjects ()
bool QueryCloseProject (cbProject *proj, bool dontsavefiles=false)
void RebuildTree ()
 Rebuild the project manager's tree.
void ReleaseMenu (wxMenuBar *menuBar)
 Application menu removal. Called by the application only.
void RemoveProjectDependency (cbProject *base, cbProject *doesNotDependOn)
 Removes a project dependency.
void RemoveProjectFromAllDependencies (cbProject *base)
 Removes the project base from being a dependency of any other project.
bool SaveActiveProject ()
bool SaveActiveProjectAs ()
bool SaveAllProjects ()
bool SaveProject (cbProject *project)
bool SaveProjectAs (cbProject *project)
bool SaveWorkspace ()
bool SaveWorkspaceAs (const wxString &filename)
void SetDefaultPath (const wxString &path)
void SetProject (cbProject *project, bool refresh=true)
void SetTopEditor (EditorBase *ed)
void UnfreezeTree (bool force=false)
int VirtualFolderIconIndex ()
void WorkspaceChanged ()
int WorkspaceIconIndex (bool read_only=false)

Static Public Member Functions

static bool CanShutdown ()
static void CreateMenu (wxMenuBar *menuBar)
 Application menu creation. Called by the application only.
static void Free ()
static MgrT * Get ()
static bool IsBusy ()
static bool Valid ()

Private Member Functions

void BuildTree ()
int DoAddFileToProject (const wxString &filename, cbProject *project, wxArrayInt &targets)
void DoOpenFile (ProjectFile *pf, const wxString &filename)
void DoOpenSelectedFile ()
wxTreeItemId FindItem (wxTreeItemId Node, const wxString &Search) const
void InitPane ()
void OnAddFilesToProjectRecursively (wxCommandEvent &event)
void OnAddFileToProject (wxCommandEvent &event)
void OnAddVirtualFolder (wxCommandEvent &event)
void OnAppDoneStartup (CodeBlocksEvent &event)
void OnBeginEditNode (wxTreeEvent &event)
void OnCloseFile (wxCommandEvent &event)
void OnCloseProject (wxCommandEvent &event)
void OnCloseWorkspace (wxCommandEvent &event)
void OnDeleteVirtualFolder (wxCommandEvent &event)
void OnEndEditNode (wxTreeEvent &event)
void OnExecParameters (wxCommandEvent &event)
void OnFindFile (wxCommandEvent &event)
void OnGotoFile (wxCommandEvent &event)
void OnIdle (wxIdleEvent &event)
void OnNotes (wxCommandEvent &event)
void OnOpenFile (wxCommandEvent &event)
void OnOpenWith (wxCommandEvent &event)
void OnProjectFileActivated (wxTreeEvent &event)
void OnProperties (wxCommandEvent &event)
void OnRemoveFileFromProject (wxCommandEvent &event)
void OnRenameFile (wxCommandEvent &event)
void OnRenameWorkspace (wxCommandEvent &event)
void OnRightClick (wxCommandEvent &event)
void OnSaveAsWorkspace (wxCommandEvent &event)
void OnSaveWorkspace (wxCommandEvent &event)
void OnSetActiveProject (wxCommandEvent &event)
void OnTabPosition (wxCommandEvent &event)
void OnTreeBeginDrag (wxTreeEvent &event)
void OnTreeEndDrag (wxTreeEvent &event)
void OnTreeItemRightClick (wxTreeEvent &event)
void OnUpdateUI (wxUpdateUIEvent &event)
void OnViewCategorize (wxCommandEvent &event)
void OnViewFileMasks (wxCommandEvent &event)
void OnViewUseFolders (wxCommandEvent &event)
bool QueryCloseWorkspace ()
void RemoveFilesRecursively (wxTreeItemId &sel_id)
void ShowMenu (wxTreeItemId id, const wxPoint &pt)

Private Attributes

bool m_CanSendWorkspaceChanged
wxTreeItemId m_DraggingItem
wxString m_InitialDir
bool m_isCheckingForExternallyModifiedProjects
bool m_IsClosingProject
bool m_IsClosingWorkspace
bool m_IsLoadingProject
bool m_IsLoadingWorkspace
FilesGroupsAndMasks * m_pFileGroups
wxImageList * m_pImages
ProjectsArray * m_pProjects
DepsMap m_ProjectDeps
wxTreeCtrl * m_pTree
bool m_TreeCategorize
int m_TreeFreezeCounter
wxTreeItemId m_TreeRoot
bool m_TreeUseFolders

Static Private Attributes

static bool s_CanShutdown = true


class Manager
class Mgr< ProjectManager >

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

Generated by  Doxygen 1.6.0   Back to index