44 int paramCount = sa.GetParamCount();
47 wxString key = *SqPlus::GetInstance<wxString,false>(v, 2);
48 if (sa.GetType(3) == OT_INTEGER)
50 else if (sa.GetType(3) == OT_BOOL)
52 else if (sa.GetType(3) == OT_FLOAT)
56 wxString val = *SqPlus::GetInstance<wxString,false>(v, 3);
58 return SqPlus::ReturnCopy(v, ret);
61 return sa.ThrowError(
"Invalid arguments to \"ConfigManager::Read\"");
66 int paramCount = sa.GetParamCount();
69 wxString key = *SqPlus::GetInstance<wxString,false>(v, 2);
70 if (sa.GetType(3) == OT_INTEGER)
75 else if (sa.GetType(3) == OT_BOOL)
80 else if (sa.GetType(3) == OT_FLOAT)
91 else if (paramCount == 4)
93 wxString key = *SqPlus::GetInstance<wxString,false>(v, 2);
94 wxString val = *SqPlus::GetInstance<wxString,false>(v, 3);
95 if (sa.GetType(4) == OT_BOOL)
101 return sa.ThrowError(
"Invalid arguments to \"ConfigManager::Write\"");
106 int paramCount = sa.GetParamCount();
110 if (sa.GetType(2) == OT_INTEGER)
117 return sa.ThrowError(
"Invalid arguments to \"EditorManager::GetBuiltinEditor\"");
122 int paramCount = sa.GetParamCount();
129 return sa.ThrowError(
"Invalid arguments to \"EditorManager::Open\"");
134 int paramCount = sa.GetParamCount();
137 if (sa.GetType(2) == OT_INTEGER)
140 return sa.Return(
Manager::Get()->GetEditorManager()->Close(*SqPlus::GetInstance<wxString,false>(v, 2)));
142 return sa.ThrowError(
"Invalid arguments to \"EditorManager::Close\"");
147 int paramCount = sa.GetParamCount();
150 if (sa.GetType(2) == OT_INTEGER)
153 return sa.Return(
Manager::Get()->GetEditorManager()->Save(*SqPlus::GetInstance<wxString,false>(v, 2)));
155 return sa.ThrowError(
"Invalid arguments to \"EditorManager::Save\"");
160 int paramCount = sa.GetParamCount();
163 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 1);
164 if (sa.GetType(2) == OT_INTEGER)
165 return sa.ThrowError(
"Invalid arguments to \"cbProject::RemoveFile\"");
167 return sa.Return(prj->
RemoveFile(SqPlus::GetInstance<ProjectFile,false>(v, 2)));
169 return sa.ThrowError(
"Invalid arguments to \"cbProject::RemoveFile\"");
174 int paramCount = sa.GetParamCount();
177 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 1);
178 wxString str = *SqPlus::GetInstance<wxString,false>(v, 3);
179 bool b1 = paramCount >= 4 ? sa.GetBool(4) :
true;
180 bool b2 = paramCount >= 5 ? sa.GetBool(5) :
true;
181 int i = paramCount == 6 ? sa.GetInt(6) : 50;
183 if (sa.GetType(2) == OT_INTEGER)
184 pf = prj->
AddFile(sa.GetInt(2), str,
b1, b2, i);
186 pf = prj->
AddFile(*SqPlus::GetInstance<wxString,false>(v, 2), str, b1, b2, i);
190 return sa.ThrowError(
"Invalid arguments to \"cbProject::AddFile\"");
195 int paramCount = sa.GetParamCount();
198 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 1);
200 if (sa.GetType(2) == OT_INTEGER)
203 bt = prj->
GetBuildTarget(*SqPlus::GetInstance<wxString,false>(v, 2));
207 return sa.ThrowError(
"Invalid arguments to \"cbProject::GetBuildTarget\"");
212 int paramCount = sa.GetParamCount();
215 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 1);
216 if (sa.GetType(2) == OT_INTEGER)
217 return sa.Return(prj->
RenameBuildTarget(sa.GetInt(2), *SqPlus::GetInstance<wxString,false>(v, 3)));
219 return sa.Return(prj->
RenameBuildTarget(*SqPlus::GetInstance<wxString,false>(v, 2), *SqPlus::GetInstance<wxString,false>(v, 3)));
221 return sa.ThrowError(
"Invalid arguments to \"cbProject::RenameBuildTarget\"");
226 int paramCount = sa.GetParamCount();
229 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 1);
231 if (sa.GetType(2) == OT_INTEGER)
234 bt = prj->
DuplicateBuildTarget(*SqPlus::GetInstance<wxString,false>(v, 2), *SqPlus::GetInstance<wxString,false>(v, 3));
238 return sa.ThrowError(
"Invalid arguments to \"cbProject::DuplicateBuildTarget\"");
243 int paramCount = sa.GetParamCount();
246 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 1);
247 if (sa.GetType(2) == OT_INTEGER)
250 return sa.Return(prj->
RemoveBuildTarget(*SqPlus::GetInstance<wxString,false>(v, 2)));
252 return sa.ThrowError(
"Invalid arguments to \"cbProject::RemoveBuildTarget\"");
257 int paramCount = sa.GetParamCount();
260 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 1);
261 if (sa.GetType(2) == OT_INTEGER)
266 return sa.ThrowError(
"Invalid arguments to \"cbProject::ExportTargetAsProject\"");
271 int paramCount = sa.GetParamCount();
274 if (sa.GetType(4) == OT_INTEGER)
276 wxString fname = *SqPlus::GetInstance<wxString,false>(v, 2);
277 cbProject* prj = SqPlus::GetInstance<cbProject,false>(v, 3);
278 int idx = sa.GetInt(4);
279 return sa.Return((SQInteger)
Manager::Get()->GetProjectManager()->AddFileToProject(fname, prj, idx));
282 return sa.ThrowError(
"Invalid arguments to \"ProjectManager::AddFileToProject\"");
288 int count = sa.GetParamCount();
290 return sa.ThrowError(
"Invalid arguments to \"ProjectManager::GetProjectCount\"");
293 ProjectManager *manager = SqPlus::GetInstance<ProjectManager, false>(v, 1);
294 int project_count = manager->
GetProjects()->GetCount();
295 return sa.Return((SQInteger)project_count);
302 int count = sa.GetParamCount();
304 return sa.ThrowError(
"Invalid arguments to \"ProjectManager::GetProject\"");
307 ProjectManager *manager = SqPlus::GetInstance<ProjectManager, false>(v, 1);
308 int index = sa.GetInt(2);
309 int project_count = manager->
GetProjects()->GetCount();
310 if(index >= project_count)
311 return sa.ThrowError(
"Index out of bounds in \"ProjectManager::GetProject\"");
315 SqPlus::Push(v, project);
323 int paramCount = sa.GetParamCount();
326 ProjectManager *manager = SqPlus::GetInstance<ProjectManager, false>(v, 1);
332 return sa.ThrowError(
"'this' is NULL!?! (type of ProjectManager*)");
334 return sa.ThrowError(
"Invalid arguments to \"ProjectManager::RebuildTree\"");
340 int paramCount = sa.GetParamCount();
343 cbEditor*
self = SqPlus::GetInstance<cbEditor,false>(v, 1);
349 return sa.ThrowError(
"'this' is NULL!?! (type of cbEditor*)");
351 return sa.ThrowError(
"Invalid arguments to \"cbEditor::SetText\"");
356 int paramCount = sa.GetParamCount();
359 cbEditor*
self = SqPlus::GetInstance<cbEditor,false>(v, 1);
362 wxString str =
self->GetControl()->GetText();
363 return SqPlus::ReturnCopy(v, str);
365 return sa.ThrowError(
"'this' is NULL!?! (type of cbEditor*)");
367 return sa.ThrowError(
"Invalid arguments to \"cbEditor::GetText\"");
372 int paramCount = sa.GetParamCount();
375 return sa.ThrowError(
"Invalid arguments to \"CompilerFactory::GetCompilerIndex\"");
386 if (!SquirrelVM::GetVMPtr())
387 cbThrow(
_T(
"Scripting engine not initialized!?"));
397 SqPlus::SQClassDef<ConfigManager>(
"ConfigManager").
401 SqPlus::SQClassDef<ProjectFile>(
"ProjectFile").
423 SqPlus::SQClassDef<CompileOptionsBase>(
"CompileOptionsBase").
485 SqPlus::SQClassDef<CompileTargetBase>(
"CompileTargetBase",
"CompileOptionsBase").
519 SqPlus::SQClassDef<ProjectBuildTarget>(
"ProjectBuildTarget",
"CompileTargetBase").
537 SqPlus::SQClassDef<cbProject>(
"cbProject",
"CompileTargetBase").
595 SqPlus::SQClassDef<ProjectManager>(
"ProjectManager").
627 SqPlus::SQClassDef<EditorBase>(
"EditorBase").
652 SqPlus::SQClassDef<cbEditor>(
"cbEditor",
"EditorBase").
686 SqPlus::SQClassDef<EditorManager>(
"EditorManager").
706 SqPlus::SQClassDef<UserVariableManager>(
"UserVariableManager").
709 SqPlus::SQClassDef<ScriptingManager>(
"ScriptingManager").
712 typedef bool(*CF_INHERITSFROM)(
const wxString&,
const wxString&);
714 SqPlus::SQClassDef<CompilerFactory>(
"CompilerFactory").
722 SqPlus::SQClassDef<PluginInfo>(
"PluginInfo").
734 SqPlus::SQClassDef<FileTreeData>(
"FileTreeData").
virtual void GotoPreviousBookmark()
Go to previous bookmark.
ProjectFile * GetFileByFilename(const wxString &filename, bool isRelative=true, bool isUnixFilename=false)
Access a file of the project.
SQInteger EditorManager_GetBuiltinEditor(HSQUIRRELVM v)
bool CloseAll(bool dontsave=false)
Closes all opened editors.
SQInteger ConfigManager_Read(HSQUIRRELVM v)
void SetDefaultPath(const wxString &path)
Set the default path for new projects.
ProjectBuildTarget * DuplicateBuildTarget(int index, const wxString &newName=wxEmptyString)
Duplicate a build target.
cbEditor * IsBuiltinOpen(const wxString &filename)
virtual void SetOptionRelation(OptionsRelationType type, OptionsRelation rel)
Set the target's options relation for type to rel.
virtual const wxString & GetShortName() const
Returns the editor's short name.
SQInteger ConfigManager_Write(HSQUIRRELVM v)
wxString relativeToCommonTopLevelPath
The relative filename to the common top-level path.
bool Exists(const wxString &variable) const
SQInteger cbProject_RemoveFile(HSQUIRRELVM v)
void SetMakefileCustom(bool custom)
Mark if the project should use a custom Makefile for compilation.
SQInteger cbProject_RenameBuildTarget(HSQUIRRELVM v)
virtual void SetMakeCommandFor(MakeCommand cmd, const wxString &make)
Set the "make" command used for cmd.
virtual bool UnsetVar(const wxString &key)
virtual bool CanPaste() const
Is there something to paste?
const wxString & GetFolder() const
unsigned short int weight
The weight.
static bool IsValidCompilerID(const wxString &id)
bool GetUseCustomBuildCommand(const wxString &compilerId)
Read 'Use custom command to build this file' for a compilerId.
virtual void SetTitle(const wxString &title)
Set the target's title.
void SetModeForPCH(PCHMode mode)
Set the mode to handle precompiled headers.
virtual bool GetCreateDefFile() const
Valid only for targets generating dynamic libraries (DLLs or SOs).
cbEditor * New(const wxString &newFileName=wxEmptyString)
bool SaveActiveProject()
Save the active project to disk.
wxString relativeFilename
The relative (to the project) filename of this file.
virtual bool HasSelection() const
Is there a selection?
virtual bool GetUseConsoleRunner() const
Valid only for targets generating a console executable.
virtual void SetResourceCompilerOptions(const wxArrayString &resourceCompilerOpts)
virtual const wxString & GetAdditionalOutputFiles() const
virtual void SetObjectOutput(const wxString &dirname)
Set the target's objects output dir.
cbProject * IsOpen(const wxString &filename)
Check if a project is open based on the project's filename.
void SetDefaultExecuteTarget(const wxString &name)
Set the build target index which will be pre-selected when the "Select target" dialog appears when ru...
ConfigManager * GetConfigManager(const wxString &name_space) const
SQInteger ProjectManager_RebuildTree(HSQUIRRELVM v)
virtual const wxString & GetTitle()
The editor's title.
int ReadInt(const wxString &name, int defaultVal=0)
virtual wxString GetDepsOutput() const
Read the target's dependencies output dir.
virtual void RebuildTree()=0
Rebuild the project manager's tree.
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
bool DefineVirtualBuildTarget(const wxString &alias, const wxArrayString &targets)
Define a new virtual build target.
virtual void AddCommandsAfterBuild(const wxString &command)
void Register_ProgressDialog()
SQInteger ProjectManager_AddFileToProject(HSQUIRRELVM v)
virtual const wxString & GetExecutionParameters() const
Read the target's execution parameters.
virtual void SetCreateDefFile(bool createIt)
Set if the target creates a DEF imports file.
bool SaveWorkspaceAs(const wxString &filename)
Save the open workspace under a different filename.
void RemoveProjectFromAllDependencies(cbProject *base)
Removes the project base from being a dependency of any other project.
virtual const wxString & GetHostApplication() const
Read the target's host application.
SQInteger ProjectManager_GetProject(HSQUIRRELVM v)
void SetShowNotesOnLoad(bool show)
Set show project notes on load automatically.
SQInteger EditorManager_Save(HSQUIRRELVM v)
bool Reload(bool detectEncoding=true)
Reloads the file from disk.
const wxString & GetObjName()
wxFileName file
The full filename of this file.
virtual void SetLibDirs(const wxArrayString &libDirs)
wxString GetCustomBuildCommand(const wxString &compilerId)
Read customBuild command for a compilerId.
virtual bool IsReadOnly() const
Is the editor read-only?
virtual void Redo()
Redo changes.
virtual void ReplaceLinkLib(const wxString &option, const wxString &new_option)
virtual const wxString & GetExternalDeps() const
bool compile
Compile flag.
bool ReadBool(const wxString &name, bool defaultVal=false)
void UnfoldAll()
Unfold all editor folds (shows blocks of code).
void SetModified(bool modified=true) override
Mark the project as modified or not.
void SetCurrentlyCompilingTarget(ProjectBuildTarget *bt)
Set the currently compiling target.
virtual void RemoveCompilerOption(const wxString &option)
PCHMode GetModeForPCH() const
void Print(bool selectionOnly, PrintColourMode pcm, bool line_numbers)
Print the file.
virtual void Paste()
Paste selected text/object from clipboard.
bool GetCheckForExternallyModifiedFiles() const
Get check for externally modified files.
wxString GetDefaultPath()
Retrieve the default path for new projects.
SQInteger cbEditor_SetText(HSQUIRRELVM v)
virtual void RemoveIncludeDir(const wxString &option)
virtual void AddBuildScript(const wxString &script)
SQInteger EditorManager_Close(HSQUIRRELVM v)
virtual const wxArrayString & GetCompilerOptions() const
virtual void Activate()
Activate this editor.
void SetText(const wxString &text)
Replace the contents of the document with the argument text.
static int GetCompilerIndex(const wxString &id)
bool CanAddToVirtualBuildTarget(const wxString &alias, const wxString &target)
Checks if a build target (virtual or real) can be added to a virtual build target, without causing a circular-reference.
virtual void AddIncludeDir(const wxString &option)
static const wxString & GetDefaultCompilerID()
virtual bool CanRedo() const
Is there something to redo?
bool Close(const wxString &filename, bool dontsave=false)
void SetProject(cbProject *project)
cbProjectManagerUI & GetUI()
virtual bool HasBookmark(int line) const
Does line has bookmark?
virtual void SetIncludeInTargetAll(bool buildIt)
Deprecated, do not use at all! Set if this target should be built when the virtual target "All" is se...
virtual void SetTargetFilenameGenerationPolicy(TargetFilenameGenerationPolicy prefix, TargetFilenameGenerationPolicy extension)
A target's filename can either be auto-generated based on the running platform, or completely specifi...
virtual void RemoveLibDir(const wxString &option)
virtual void SetExecutionParameters(const wxString ¶ms)
Set the target's execution parameters to params.
SQInteger CompilerFactory_GetCompilerIndex(HSQUIRRELVM v)
ProjectFile * GetProjectFile() const
virtual void SetLinkLibs(const wxArrayString &linkLibs)
virtual void SetUseConsoleRunner(bool useIt)
Set if ConsoleRunner should be used.
virtual void AddToExtensions(const wxString &stringDesc)
Convenience function (mainly for scripts) to add nodes/attributes under the <Extensions> node...
virtual const wxArrayString & GetBuildScripts() const
virtual bool MakeCommandsModified() const
True if any of the "make" commands is modified.
Represents a file in a Code::Blocks project.
ProjectBuildTarget * GetCurrentlyCompilingTarget()
Get a pointer to the currently compiling target.
virtual void ReplaceLinkerOption(const wxString &option, const wxString &new_option)
virtual wxString GetOutputFilename()
Read the target's output filename.
bool RemoveFile(ProjectFile *pf)
Remove a file from the project.
virtual bool GetCreateStaticLib()
Valid only for targets generating dynamic libraries (DLLs or SOs).
virtual cbProject * GetParentProject()
virtual void SetCompilerID(const wxString &id)
! Set the flag if the host app should be run in terminal
virtual wxString SuggestOutputFilename()
Suggest a filename based on the target's type.
virtual wxString GetStaticLibFilename()
Read the target's static library filename (produced if target type is ttStaticLib) ...
virtual wxString GetFullTitle() const
virtual bool ThereAreOthers() const
Are there other editors besides this?
virtual void RemoveLinkLib(const wxString &option)
void SetFolder(const wxString &folder)
virtual void Copy()
Copy selected text/object to clipboard.
EditorManager * GetEditorManager() const
SQInteger cbProject_RemoveBuildTarget(HSQUIRRELVM v)
virtual TargetType GetTargetType() const
Read the target's type.
bool CloseAllFiles(bool dontsave=false)
Close all project files.
ProjectFile * GetFile(int index)
Access a file of the target.
virtual void SetModified(bool=true)
Set the modification status.
virtual void SetCompilerOptions(const wxArrayString &compilerOpts)
const wxString & GetMakefile()
const wxString & GetID() const
Get this compiler's unique ID.
bool CloseActiveProject(bool dontsave=false)
Close the active project.
virtual void AddResourceIncludeDir(const wxString &option)
virtual OptionsRelation GetOptionRelation(OptionsRelationType type) const
Read the target's options relation for type.
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
virtual bool Close()
Close this editor.
virtual void SetHostApplication(const wxString &app)
Set the target's host application to app.
virtual const wxString & GetFilename() const
Get the editor's filename (if applicable).
virtual void ReplaceResourceCompilerOption(const wxString &option, const wxString &new_option)
virtual const wxArrayString & GetResourceIncludeDirs() const
Represents a Code::Blocks project.
const wxString & GetActiveBuildTarget() const
virtual const wxArrayString & GetLinkerOptions() const
bool SaveAs() override
Save editor contents under a different filename.
cbProject * NewProject(const wxString &filename=wxEmptyString)
Create a new empty project.
virtual void AddLinkLib(const wxString &option)
virtual const wxString & GetFilename() const
int GetLineIndentInSpaces(int line=-1) const
Returns the specified line's (0-based) indentation (whitespace) in spaces.
void RenameBuildTarget(const wxString &oldTargetName, const wxString &newTargetName)
Rename a build target this file belongs in.
bool SaveActiveProjectAs()
Save the active project to disk, asking for a filename.
EditorBase * GetActiveEditor()
virtual void AddCommandsBeforeBuild(const wxString &command)
virtual const wxArrayString & GetLinkLibs() const
cbStyledTextCtrl * GetControl() const
Returns a pointer to the underlying cbStyledTextCtrl object (which itself is the wxWindows implementa...
virtual bool HasBreakpoint(int line) const
Does line has debugger breakpoint? If line is -1, use current line.
virtual void AddCompilerOption(const wxString &option)
cbProject * LoadProject(const wxString &filename, bool activateIt=true)
Load a project from disk.
virtual void SetOutputFilename(const wxString &filename)
Set the target's output filename.
virtual wxString GetMakeCommandFor(MakeCommand cmd) const
Get the "make" command used for cmd.
virtual const wxString & GetTitle() const
Read the target's title.
bool CloseActive(bool dontsave=false)
static wxString GetCompilerVersionString(const wxString &Id)
get the version number as string for the compiler with the specified index
virtual void AddLibDir(const wxString &option)
void RemoveBuildTarget(const wxString &targetName)
Remove this file from the specified build target.
void Register_Constants()
virtual const wxArrayString & GetResourceCompilerOptions() const
bool AddBreakpoint(int line=-1, bool notifyDebugger=true)
Add debugger breakpoint at specified line.
virtual void SetModified(bool modified)
cbEditor * GetBuiltinActiveEditor()
bool CloseProject(cbProject *project, bool dontsave=false, bool refresh=true)
Close a project.
void SetCheckForExternallyModifiedFiles(bool check)
Set check for externally modified files.
bool BuildTargetValid(const wxString &name, bool virtuals_too=true) const
Is there a build target (virtual or real) by name?
void ShowNotes(bool nonEmptyOnly, bool editable=false)
Show project notes now.
virtual void ToggleBookmark(int line=-1)
Toggle bookmark at specified line.
virtual void ClearAllBookmarks()
Clear all bookmarks.
virtual void SetFilename(const wxString &filename)
Sets the editor's filename.
cbProject * GetActiveProject()
Retrieve the active project.
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
void RemoveProjectDependency(cbProject *base, cbProject *doesNotDependOn)
Removes a project dependency.
virtual void SetIncludeDirs(const wxArrayString &includeDirs)
virtual wxString GetBasePath() const
Read the target's base path, e.g. if GetFilename() returns "/usr/local/bin/xxx", base path will retur...
virtual void SetCommandsBeforeBuild(const wxArrayString &commands)
virtual const wxArrayString & GetCommandsAfterBuild() const
virtual wxString GetWorkingDir()
Read the target's working dir for execution (valid only for executable targets)
virtual void SetExternalDeps(const wxString &deps)
Set a list of all the external files this targets depends on.
virtual void SetWorkingDir(const wxString &dirname)
Set the target's working dir on execution (valid only for executable targets)
virtual void AddResourceCompilerOption(const wxString &option)
bool AddProjectDependency(cbProject *base, cbProject *dependsOn)
Adds a project as a dependency of another project.
bool Save(const wxString &filename)
virtual bool IsBuiltinEditor() const
Is this a built-in editor?
const wxArrayString & GetVirtualBuildTargetGroup(const wxString &alias) const
Access a virtual build target's group of build targets.
virtual void SetAlwaysRunPostBuildSteps(bool always)
SQInteger cbProject_DuplicateBuildTarget(HSQUIRRELVM v)
virtual wxString GetDynamicLibFilename()
Read the target's dynamic library filename (produced if target type is ttDynamicLib) ...
virtual void Undo()
Undo changes.
bool SaveAllFiles()
Save all project files.
const wxString & GetNotes() const
Get notes on the project.
ProjectFile * AddFile(const wxString &targetName, const wxString &filename, bool compile=true, bool link=true, unsigned short int weight=50)
Add a file to the project.
virtual void SetCreateStaticLib(bool createIt)
Set if an import library should be created.
void SetCustomBuildCommand(const wxString &compilerId, const wxString &newBuildCommand)
Modify customBuild command for a compilerId.
cbEditor * Open(const wxString &filename, int pos=0, ProjectFile *data=nullptr)
bool SaveProjectAs(cbProject *project)
Save a project to disk, asking for a filename.
bool SaveProject(cbProject *project)
Save a project to disk.
virtual void RemoveLinkerOption(const wxString &option)
cbEditor * GetBuiltinEditor(EditorBase *eb)
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...
static bool CompilerInheritsFrom(const wxString &id, const wxString &from_id)
virtual const wxArrayString & GetIncludeDirs() const
ProjectFile * GetFile(int index)
Access a file of the project.
virtual wxString GetExecutableFilename() const
Read the target's executable filename (produced if target type is ttExecutable)
virtual bool GetModified() const
Is it modified?
wxString compilerVar
The compiler variable used for this file (e.g CPP, CC, etc).
SQInteger cbProject_GetBuildTarget(HSQUIRRELVM v)
wxArrayString GetVirtualBuildTargets() const
Get a list of all defined virtual build targets.
void UnfoldBlockFromLine(int line=-1)
Unfolds the block containing line.
virtual void SetDepsOutput(const wxString &dirname)
Set the target's dependencies output dir.
wxArrayString GetExpandedVirtualBuildTargetGroup(const wxString &alias) const
Access a virtual build target's expanded group of build targets.
ProjectBuildTarget * GetBuildTarget(int index)
Access a build target.
Abstract base class for compilers.
virtual void ReplaceIncludeDir(const wxString &option, const wxString &new_option)
const wxString & GetDefaultExecuteTarget() const
bool GetExtendedObjectNamesGeneration() const
Gets object names generation mode (extended/normal).
void Touch()
Sets the last modification time for the file to 'now'.
virtual void SetLinkerOptions(const wxArrayString &linkerOpts)
virtual void ReplaceLibDir(const wxString &option, const wxString &new_option)
void SetProject(cbProject *project, bool refresh=true)
Set the active project.
virtual void RemoveBuildScript(const wxString &script)
virtual bool GetAlwaysRunPostBuildSteps() const
virtual const wxArrayString & GetLibDirs() const
void FoldAll()
Fold all editor folds (hides blocks of code).
wxString GetBaseName() const
virtual void SetTitle(const wxString &newTitle)
Set the editor's title.
cbProject * GetProject() const
The entry point singleton for working with projects.
void FoldBlockFromLine(int line=-1)
Folds the block containing line.
virtual const wxString & GetCompilerID() const
Read the target's compiler.
bool CloseAllProjects(bool dontsave=false)
Close all projects.
virtual bool SetVar(const wxString &key, const wxString &value, bool onlyIfExists=false)
bool GetShowNotesOnLoad() const
Get show project notes on load automatically.
bool LoadLayout()
Load the project's layout.
wxString GetLineIndentString(int line=-1) const
Returns the specified line's (0-based) indentation (whitespace) string.
virtual void RemoveResourceIncludeDir(const wxString &option)
FileTreeDataKind GetKind() const
bool CloseWorkspace()
Close the workspace.
SQInteger cbProject_ExportTargetAsProject(HSQUIRRELVM v)
void Register_UtilDialogs()
wxString GetCommonTopLevelPath() const
bool GetModified() const override
SQInteger ProjectManager_GetProjectCount(HSQUIRRELVM v)
virtual void SetResourceIncludeDirs(const wxArrayString &resIncludeDirs)
virtual void ReplaceCompilerOption(const wxString &option, const wxString &new_option)
cbProject * GetParentProject()
bool Save() override
Save editor contents.
bool HasVirtualBuildTarget(const wxString &alias) const
Does a virtual build target exist?
virtual void ToggleBreakpoint(int line=-1, bool notifyDebugger=true)
Toggle debugger breakpoint at specified line.
void SetKind(FileTreeDataKind kind)
virtual void GotoNextBreakpoint()
Go to next debugger breakpoint.
void SetTitle(const wxString &title) override
Changes project title.
virtual void GotoLine(int, bool=true)
Move the caret at the specified line.
Represents a Code::Blocks project build target.
void SetExtendedObjectNamesGeneration(bool ext)
Sets object names generation to extended/normal mode.
virtual void GotoPreviousBreakpoint()
Go to previous debugger breakpoint.
void Register_ScriptPlugin()
virtual void RemoveCommandsAfterBuild(const wxString &command)
void SetProjectFile(ProjectFile *file)
void AutoComplete()
This method is obsolete, use the abbreviations plugin instead.
ProjectFile * GetProjectFile() const
Read the ProjectFile pointer associated with this editor.
void SetUseCustomBuildCommand(const wxString &compilerId, bool useCustomBuildCommand)
Modify 'Use custom command to build this file' for a compilerId.
bool RemoveVirtualBuildTarget(const wxString &alias)
Remove a virtual build target.
virtual void SetTargetType(TargetType pt)
Set the target's type to pt.
ProjectsArray * GetProjects()
Retrieve an array of all the opened projects.
virtual const wxString & GetVar(const wxString &key) const
void ToggleFoldBlockFromLine(int line=-1)
Toggles folding of the block containing line.
bool SaveAllProjects()
Saves all projects to disk.
void SetNotes(const wxString ¬es)
Set notes on the project.
void SetEditorTitle(const wxString &title)
Sets the editor title.
static Compiler * GetCompilerByName(const wxString &title)
bool LoadWorkspace(const wxString &filename=DEFAULT_WORKSPACE)
Load a workspace.
ProjectBuildTarget * AddBuildTarget(const wxString &targetName)
Add a new build target.
virtual void AddLinkerOption(const wxString &option)
virtual void Cut()
Cut selected text/object to clipboard.
wxString CompilerFactory_GetCompilerIDByName(const wxString &name)
const wxArrayString & GetBuildTargets() const
SQInteger cbProject_AddFile(HSQUIRRELVM v)
void AddBuildTarget(const wxString &targetName)
Make this file belong to an additional build target.
SQInteger EditorManager_Open(HSQUIRRELVM v)
SQInteger cbEditor_GetText(HSQUIRRELVM v)
virtual void RemoveCommandsBeforeBuild(const wxString &command)
virtual wxString GetObjectOutput() const
Read the target's objects output dir.
virtual bool CanUndo() const
Is there something to undo?
bool Save()
Save the project.
virtual void ReplaceResourceIncludeDir(const wxString &option, const wxString &new_option)
int SelectTarget(int initial=-1, bool evenIfOne=false)
Displays a target selection dialog.
virtual bool GetModified() const
bool RemoveBuildTarget(int index)
Remove a build target.
virtual bool Save()
Save contents.
void SetFileIndex(int index)
virtual wxString GetDynamicLibDefFilename()
Read the target's dynamic library definition file filename (produced if target type is ttDynamicLib) ...
virtual void SetBuildScripts(const wxArrayString &scripts)
virtual void UnsetAllVars()
virtual void SetCommandsAfterBuild(const wxArrayString &commands)
virtual bool GetIncludeInTargetAll() const
Deprecated, do not use at all!
virtual void SetAdditionalOutputFiles(const wxString &files)
Set a list of all additional output files this targets creates, besides its main output.
bool SaveWorkspace()
Save the open workspace.
virtual void RemoveResourceCompilerOption(const wxString &option)
void ToggleAllFolds()
Toggle all editor folds (inverts the show/hide state of blocks of code).
double ReadDouble(const wxString &name, double defaultVal=0.0f)
bool SetActiveBuildTarget(const wxString &name)
Set the active build target.
const ProjectsArray * GetDependenciesForProject(cbProject *base)
Get the array of projects base depends on.
bool SaveLayout()
Save the project's layout.
bool RemoveBreakpoint(int line=-1, bool notifyDebugger=true)
Remove debugger breakpoint at specified line.
bool RenameBuildTarget(int index, const wxString &targetName)
Rename a build target.
void SetObjName(const wxString &name)
Set the generated object filename.
wxArrayString buildTargets
An array of strings, containing the names of all the build targets this file belongs to...
wxString GetFirstValidBuildTargetName(bool virtuals_too=true) const
bool ExportTargetAsProject(int index)
Export a target as a new project.
virtual void GotoNextBookmark()
Go to next bookmark.
void ClearProjectDependencies(cbProject *base)
Removes all dependencies from project base.
virtual const wxArrayString & GetCommandsBeforeBuild() const