108 void ClearAllProperties();
114 void CalculateCommonTopLevelPath();
117 wxString GetCommonTopLevelPath()
const;
139 ProjectFile* GetFileByFilename(
const wxString& filename,
bool isRelative =
true,
bool isUnixFilename =
false);
156 void SetMakefileCustom(
bool custom);
165 void SetMakefileExecutionDir(
const wxString& dir);
184 bool BuildTargetValid(
const wxString& name,
bool virtuals_too =
true)
const;
187 wxString GetFirstValidBuildTargetName(
bool virtuals_too =
true)
const;
191 const wxString& GetDefaultExecuteTarget()
const;
197 void SetDefaultExecuteTarget(
const wxString& name);
225 bool RenameBuildTarget(
int index,
const wxString& targetName);
232 bool RenameBuildTarget(
const wxString& oldTargetName,
const wxString& newTargetName);
258 bool ExportTargetAsProject(
int index);
267 bool ExportTargetAsProject(
const wxString& targetName);
273 bool RemoveBuildTarget(
int index);
279 bool RemoveBuildTarget(
const wxString& targetName);
295 bool SetActiveBuildTarget(
const wxString& name);
298 const wxString& GetActiveBuildTarget()
const;
320 bool QueryCloseAllFiles();
327 bool CloseAllFiles(
bool dontsave=
false);
366 void BeginAddFiles();
385 void BeginRemoveFiles();
394 void EndRemoveFiles();
405 ProjectFile* AddFile(
const wxString& targetName,
const wxString& filename,
bool compile =
true,
bool link =
true,
unsigned short int weight = 50);
416 ProjectFile* AddFile(
int targetIndex,
const wxString& filename,
bool compile =
true,
bool link =
true,
unsigned short int weight = 50);
429 Glob(
const wxString& path,
const wxString& wildCard,
bool recursive) : m_Path(path), m_WildCard(wildCard), m_Recursive(recursive) {}
435 void SetGlobs(
const std::vector<Glob>& globs);
440 std::vector<Glob> GetGlobs()
const;
472 int SelectTarget(
int initial = -1,
bool evenIfOne =
false);
510 bool HasVirtualBuildTarget(
const wxString& alias)
const;
517 bool RemoveVirtualBuildTarget(
const wxString& alias);
549 bool CanAddToVirtualBuildTarget(
const wxString& alias,
const wxString& target);
559 bool AppendUniqueVirtualFolder(
const wxString &folder);
562 void RemoveVirtualFolders(
const wxString &folder);
566 void ReplaceVirtualFolder(
const wxString &oldFolder,
const wxString &newFolder);
586 void SetExtendedObjectNamesGeneration(
bool ext);
592 bool GetExtendedObjectNamesGeneration()
const;
598 void SetNotes(
const wxString& notes);
610 void SetShowNotesOnLoad(
bool show);
616 bool GetShowNotesOnLoad()
const;
622 void SetCheckForExternallyModifiedFiles(
bool check);
628 bool GetCheckForExternallyModifiedFiles()
const;
637 void ShowNotes(
bool nonEmptyOnly,
bool editable =
false);
645 void SetTitle(
const wxString& title)
override;
655 virtual TiXmlNode* GetExtensionsNode();
675 virtual void AddToExtensions(
const wxString& stringDesc);
691 int IndexOfBuildTargetName(
const wxString& targetName)
const;
742 #endif // CBPROJECT_H wxTreeItemId GetProjectNode()
wxArrayString m_ExpandedNodes
FileTreeData(cbProject *project, FileTreeDataKind kind=ftdkUndefined)
const wxString & GetFolder() const
void SetModeForPCH(PCHMode mode)
Set the mode to handle precompiled headers.
ProjectBuildTarget * m_CurrentlyCompilingTarget
std::vector< Glob > m_Globs
FileTreeDataKind
The kind of tree node.
virtual FilesList & GetFilesList()
Provides an easy way to iterate all the files belonging in this target.
void SetProjectNode(wxTreeItemId node)
Sets the root item of this item, should not be called by user's code!
bool m_AutoShowNotesOnLoad
PCHMode GetModeForPCH() const
wxArrayString m_VirtualFolders
PCHMode
Precompiled headers mode.
void SetProject(cbProject *project)
ProjectFile * GetProjectFile() const
ProjectFiles m_ProjectFilesMap
Represents a file in a Code::Blocks project.
ProjectBuildTarget * GetCurrentlyCompilingTarget()
Get a pointer to the currently compiling target.
In the objects output dir, along with other object files.
virtual void SetCompilerID(const wxString &id)
! Set the flag if the host app should be run in terminal
Glob(const wxString &path, const wxString &wildCard, bool recursive)
void SetFolder(const wxString &folder)
Represents a Code::Blocks project.
DLLIMPORT wxString cbGetDynamicLinkerPathForTarget(cbProject *project, ProjectBuildTarget *target)
Returns a string valid to be used as LD_LIBRARY_PATH (or equivalent).
const wxArrayString & ExpandedNodes()
Convenience function for remembering the project's tree state when refreshing it. ...
TiXmlElement * m_pExtensionsElement
virtual void SetModified(bool modified)
WX_DECLARE_STRING_HASH_MAP(ProjectFile *, ProjectFiles)
VirtualBuildTargetsMap m_VirtualTargets
wxTreeItemId m_ProjectNode
std::map< wxString, wxArrayString > VirtualBuildTargetsMap
wxDateTime GetLastModificationTime() const
Returns the last modification time for the file.
wxString m_LastSavedActiveTarget
bool m_CheckForExternallyModifiedFiles
int GetBuildTargetsCount()
void SetMakefile(const wxString &makefile)
Set the Makefile filename used when exporting a Makefile for the project, or when using a custom Make...
bool m_ExtendedObjectNamesGeneration
In a dir (named by the PCH) on the same level as the source header (default).
DLLIMPORT void SaveTreeState(wxTreeCtrl *tree, const wxTreeItemId &parent, wxArrayString &nodePaths, wxArrayString &selectedItemPaths)
wxString m_MakefileExecutionDir
wxArrayString m_SelectedNodes
cbProject * GetProject() const
wxString m_CommonTopLevelPath
FileTreeDataKind GetKind() const
bool RemoveFile(const wxString &src)
ProjectFileArray m_FileArray
void AddExpandedNode(const wxString &path)
Convenience function for remembering the project's tree state when refreshing it. ...
void SetKind(FileTreeDataKind kind)
Represents a Code::Blocks project build target.
wxString m_DefaultExecuteTarget
void SetProjectFile(ProjectFile *file)
wxDateTime m_LastModified
DLLIMPORT void RestoreTreeState(wxTreeCtrl *tree, const wxTreeItemId &parent, wxArrayString &nodePaths, wxArrayString &selectedItemPaths)
virtual bool GetModified() const
DLLIMPORT wxString cbMergeLibPaths(const wxString &oldPath, const wxString &newPath)
Merges to LD_LIBRARY_PATH/PATH strings together to form a new valid string.
void SetFileIndex(int index)
Base class for build target classes Each Code::Blocks project consists of at least one target...