Difference between revisions of "Scripting commands"

From Code::Blocks
(Added XML and script extension constants)
 
(113 intermediate revisions by 8 users not shown)
Line 10: Line 10:
  
 
''NOTE: Please keep in mind that if a function has default parameters in C++ (which can be ommitted), you still have to type them for scripts (for e.g. exposed wxWidgets functionality). This means you *have* to use e.g. wxFileName.GetFullPath(wxPATH_NATIVE) instead of e.g only wxFileName.GetFullPath().
 
''NOTE: Please keep in mind that if a function has default parameters in C++ (which can be ommitted), you still have to type them for scripts (for e.g. exposed wxWidgets functionality). This means you *have* to use e.g. wxFileName.GetFullPath(wxPATH_NATIVE) instead of e.g only wxFileName.GetFullPath().
 +
 +
''NOTE: Updated to '''12.11'''
  
 
== Application object ==
 
== Application object ==
Line 63: Line 65:
  
 
|-
 
|-
| wxString || ReplaceMacros || wxString,bool ||
+
| wxString || ReplaceMacros || wxString || Does [[Variable_expansion|variable expansion]] on the input wxString
 
|-
 
|-
  
Line 91: Line 93:
  
 
|-
 
|-
| wxString || GetFolder || int || see API docs for ConfigManager::GetFolder()
+
| wxArrayString || GetArrayFromString || wxString,wxString,bool ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || LocateDataFile|| wxString, int || see API docs for ConfigManager::LocateDataFile()
+
| wxString || GetStringFromArray || wxArrayString,wxString,bool ||
 
|-
 
|-
  
 
|-
 
|-
| bool || InstallPlugin || wxString,bool, bool || Install a binary plugin
+
| wxString || EscapeSpaces || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| void || Include || wxString || similar to C/C++ ''<tt>#include "name"</tt>''
+
| wxString || UnixFilename || wxString, int || arg1=filename, arg2=wxPATH_NATIVE, wxPATH_WIN, ...
 
|-
 
|-
  
 
|-
 
|-
| bool || IsNull || void* ||
+
| FileType || FileTypeOf || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || _T || const char* || basically this is the wxString constructor
+
| wxString || URLEncode || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| bool || wxLaunchDefaultBrowser || wxString ||
+
| void || NotifyMissingFile || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| wxColour || wxGetColourFromUser || [wxColour] ||
+
| int || GetPlatformsFromString || wxString  ||
 
|-
 
|-
  
 
|-
 
|-
| long || wxGetNumberFromUser || wxString,wxString,wxString ||
+
| wxString  || GetStringFromPlatforms || int,bool||
 
|-
 
|-
  
 
|-
 
|-
| wxString || wxGetPasswordFromUser || wxString,wxString,wxString ||
+
| void|| InfoWindow || wxString,wxString,int,int || pop-up box in the lower right, see infowindow.h
 
|-
 
|-
  
 
|-
 
|-
| wxString || wxGetTextFromUser || wxString,wxString,wxString ||
+
| wxString || GetFolder || int || see API docs for ConfigManager::GetFolder()
 
|-
 
|-
  
|}
+
|-
 +
| wxString || LocateDataFile|| wxString, int || see API docs for ConfigManager::LocateDataFile()
 +
|-
  
== ScriptingManager ==
+
|-
 +
| bool || InstallPlugin || wxString,bool, bool || Install a binary plugin
 +
|-
  
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
+
|-
|- style="background: #ececec; border: 0px solid gray"
+
| int || ExecuteToolPlugin || wxString || Execute a tool plugin (found in Plugins menu)
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| bool || RegisterScriptMenu || wxString, wxString || registers the script file (arg1) under a menu item (arg2).
+
| int || ConfigureToolPlugin || wxString || Configure a tool plugin (found in Plugins menu)
e.g. <tt>GetScriptingManager().RegisterScriptMenu(_T("sample.script"), _T("Scripts/Sample script"))</tt>;
 
 
|-
 
|-
  
|}
+
|-
 +
| void || CallMenu || wxString || Call a menu entry describing its path using slashes (e.g. "/Valgrind/Run Valgrind::MemCheck")
 +
|-
  
Notes about the <tt>RegisterScriptMenu</tt> function:<br/>
+
|-
* The second argument (menu item) is a string containing the full menu path to create the menu item. The path separator is a slash (/). For example, the string "Settings/Sample menu/Sample item" would create the menu path "Settings->Sample menu->Sample item".
+
| void || Include || wxString || similar to C/C++ ''<tt>#include "name"</tt>''
* When each part of the path is evaluated, it is checked whether it starts with a number followed by a colon (:). If so then this is considered to be a menu index in the parent menu and the menu is inserted at that index instead of being appended to the menu. The number and colon are removed from the string.
 
* If the menu item starts with a dash (-), then a separator line is prepended in the menu before the menu item (e.g. "Scripts/'''-'''Sample script").
 
* For your convenience, all menu items created using this function have one extra functionality: if you keep the SHIFT key pressed while clicking on any of these "script menu items", instead of running the attached script, Code::Blocks will open it in the editor for you to view/edit :).
 
* Have a look at the [[Startup script#Example|startup script example]].
 
 
 
 
 
 
 
== ConfigManager ==
 
 
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
|- style="background: #ececec; border: 0px solid gray"
 
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| int || Read || int,int ||
+
| int || Require || wxString ||arg=script_filename, return 0 if ok
 
|-
 
|-
  
 
|-
 
|-
| bool || Read || bool,bool ||
+
| bool || IsNull || void* ||
 
|-
 
|-
  
 
|-
 
|-
| float || Read || float,float ||
+
| bool || wxLaunchDefaultBrowser || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || Read || wxString,wxString ||
+
| wxColour || wxGetColourFromUser || [wxColour] ||
 
|-
 
|-
  
 
|-
 
|-
| void || Write || int,int ||
+
| long || wxGetNumberFromUser || wxString,wxString,wxString ||
 
|-
 
|-
  
 
|-
 
|-
| void || Write || bool,bool ||
+
| wxString || wxGetPasswordFromUser || wxString,wxString,wxString ||
 
|-
 
|-
  
 
|-
 
|-
| void || Write || float,float ||
+
| wxString || wxGetTextFromUser || wxString,wxString,wxString ||
 
|-
 
|-
  
 
|-
 
|-
| void || Write || wxString,wxString[,bool] ||
+
| long || wxString_ToLong || wxString const ||
 
|-
 
|-
  
 
|}
 
|}
  
 
+
== ScriptingManager ==
 
 
== ProjectManager ==
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
Line 219: Line 205:
  
 
|-
 
|-
| wxString || GetDefaultPath || ||
+
| bool || RegisterScriptMenu || wxString, wxString || registers the script file (arg1) under a menu item (arg2).
 +
e.g. <tt>GetScriptingManager().RegisterScriptMenu(_T("sample.script"), _T("Scripts/Sample script"))</tt>;
 
|-
 
|-
  
|-
+
|}
| void || SetDefaultPath || wxString ||
 
|-
 
  
|-
+
Notes about the <tt>RegisterScriptMenu</tt> function:<br/>
| cbProject* || GetActiveProject ||  ||
+
* The second argument (menu item) is a string containing the full menu path to create the menu item. The path separator is a slash (/). For example, the string "Settings/Sample menu/Sample item" would create the menu path "Settings->Sample menu->Sample item".
|-
+
* When each part of the path is evaluated, it is checked whether it starts with a number followed by a colon (:). If so then this is considered to be a menu index in the parent menu and the menu is inserted at that index instead of being appended to the menu. The number and colon are removed from the string.
 +
* If the menu item starts with a dash (-), then a separator line is prepended in the menu before the menu item (e.g. "Scripts/'''-'''Sample script").
 +
* For your convenience, all menu items created using this function have one extra functionality: if you keep the SHIFT key pressed while clicking on any of these "script menu items", instead of running the attached script, Code::Blocks will open it in the editor for you to view/edit :).
 +
* Have a look at the [[Startup script#Example|startup script example]].
  
|-
 
| void || SetProject || cbProject* ||
 
|-
 
  
|-
 
| bool || LoadWorkspace || wxString ||
 
|-
 
  
|-
+
== ConfigManager ==
| bool || SaveWorkspace ||  ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| bool || SaveWorkspaceAs || wxString ||
+
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseWorkspace || ||
+
| int || Read || const wxString, int || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || IsOpen || wxString ||
+
| bool || Read || const wxString, bool || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || LoadProject || wxString,bool ||
+
| float || Read || const wxString, float || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveProject || cbProject* ||
+
| wxString || Read || const wxString, const wxString || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveProjectAs || cbProject* ||
+
| void || Write || const wxString, int || arg1=key, arg2=value
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActiveProject || ||
+
| void || Write || const wxString, bool || arg1=key, arg2=value
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActiveProjectAs || ||
+
| void || Write || const wxString, float || arg1=key, arg2=value
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAllProjects || ||
+
| void || Write || const wxString, const wxString, bool ||arg1=key, arg2=value, arg3=ignore_value_empty
 
|-
 
|-
  
|-
+
|}
| bool || CloseProject || cbProject*,bool,bool ||
+
 
|-
+
== ProjectManager ==
 +
see API docs for 'ProjectManager::...' in 'include\projectmanager.h'
 +
 
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments in Prototype
 +
!Remarks
 +
|-
  
 
|-
 
|-
| bool || CloseActiveProject || bool ||
+
| wxString || GetDefaultPath || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseAllProjects || bool ||
+
| void || SetDefaultPath || (const wxString& path) ||  
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || NewProject || wxString ||
+
| cbProject* || GetActiveProject || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| int || AddFileToProject || wxString,cbProject*,int ||
+
| int || GetProjectCount || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| int || AskForBuildTargetIndex || cbProject* ||
+
| cbProject* || GetProject || (int) ||  
 
|-
 
|-
  
 
|-
 
|-
| void || RebuildTree || ||
+
| void || SetProject || (cbProject* project, bool refresh = true) ||
 
|-
 
|-
  
|}
+
|-
 +
| bool || LoadWorkspace || (const wxString& filename = DEFAULT_WORKSPACE)||
 +
|-
  
 +
|-
 +
| bool || SaveWorkspace || ( )  ||
 +
|-
  
 +
|-
 +
| bool || SaveWorkspaceAs || (const wxString& filename) ||
 +
|-
  
== EditorManager ==
+
|-
 +
| bool || CloseWorkspace || ( ) ||
 +
|-
  
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
+
|-
|- style="background: #ececec; border: 0px solid gray"
+
| cbProject* || IsOpen || (const wxString& filename) ||
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| void || Configure || ||
+
| cbProject* || LoadProject || (const wxString& filename, bool activateIt = true) ||  
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || New || wxString ||
+
| bool || SaveProject || (cbProject* project) ||  
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || Open || wxString ||
+
| bool || SaveProjectAs || (cbProject* project) ||
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || IsBuiltinOpen || wxString ||
+
| bool || SaveActiveProject || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || GetBuiltinEditor || wxString|int ||
+
| bool || SaveActiveProjectAs || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || GetBuiltinActiveEditor || ||
+
| bool || SaveAllProjects || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| EditorBase* || GetActiveEditor || ||
+
| bool || CloseProject || (cbProject* project, bool dontsave = false, bool refresh = true) ||  
 
|-
 
|-
  
 
|-
 
|-
| void || ActivateNext || ||
+
| bool || CloseActiveProject || (bool dontsave = false) ||
 
|-
 
|-
  
 
|-
 
|-
| void || ActivatePrevious || ||
+
| bool || CloseAllProjects || (bool dontsave = false) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SwapActiveHeaderSource || ||
+
| cbProject* || NewProject || (const wxString& filename = wxEmptyString) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseActive || bool ||
+
| int || AddFileToProject || (const wxString& filename, cbProject* project = 0L, int target = -1) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || Close || wxString|int,bool ||
+
| int || AskForBuildTargetIndex || (cbProject* project = 0L) ||  
|-
 
  
 
|-
 
|-
| bool || CloseAll || bool ||
+
| void || RebuildTree || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || Save || wxString|int ||
+
| bool || AddProjectDependency || (cbProject* base, cbProject* dependsOn) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActive || ||
+
| void || RemoveProjectDependency || (cbProject* base, cbProject* doesNotDependOn) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAs || int ||
+
| void || ClearProjectDependencies || (cbProject* base) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActiveAs || ||
+
| void || RemoveProjectFromAllDependencies || (cbProject* base) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAll || ||
+
| ProjectsArray* || GetDependenciesForProject || (cbProject* base) ||  
 
|-
 
|-
  
 
|-
 
|-
| int || ShowFindDialog || bool,bool ||
+
| void || ConfigureProjectDependencies || (cbProject* base = 0) ||  
 
|-
 
|-
 
 
|}
 
|}
  
 
+
== EditorManager ==
 
 
== UserVariableManager ==
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
Line 406: Line 401:
 
!Return value
 
!Return value
 
!Name
 
!Name
!Arguments
+
!Arguments in Prototype
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || Exists || wxString ||
+
| void || Configure || ( ) ||
 +
|-
 +
 
 +
|-
 +
| cbEditor* || New || (const wxString& newFileName = wxEmptyString) ||
 
|-
 
|-
  
|}
+
|-
 +
| cbEditor* || Open || (const wxString& filename) ||
 +
|-
  
 +
|-
 +
| cbEditor* || IsBuiltinOpen || (const wxString& filename) ||
 +
|-
  
 +
|-
 +
| cbEditor* || GetBuiltinEditor || (const wxString& filename)|(int index) ||
 +
|-
  
== IO namespace ==
+
|-
 +
| cbEditor* || GetBuiltinActiveEditor || ( ) ||
 +
|-
  
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
+
|-
|- style="background: #ececec; border: 0px solid gray"
+
| EditorBase* || GetActiveEditor || ( ) ||
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| bool || DirectoryExists || wxString ||
+
| void || ActivateNext || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || SelectDirectory || wxString,wxString,bool ||
+
| void || ActivatePrevious || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || '''CreateDirectory''' || wxString,int || arg1=dir, arg2=permissions
+
| bool || SwapActiveHeaderSource || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || '''RemoveDirectory''' || wxString ||
+
| bool || CloseActive || (bool dontsave = false) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || '''CopyFile''' || wxString,wxString,bool || src,dest,overwrite
+
| bool || Close || (const wxString& filename,bool dontsave = false)|(int index,bool dontsave = false),(EditorBase* editor,bool dontsave = false) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || '''RenameFile''' || wxString,wxString || old,new
+
| bool || CloseAll || (bool dontsave=false) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || '''RemoveFile''' || wxString ||
+
| bool || Save || (const wxString& filename)|(int index)||
 
|-
 
|-
  
 
|-
 
|-
| bool || FileExists || wxString ||
+
| bool || SaveActive || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || SelectFile || wxString,wxString,wxString ||
+
| bool || SaveAs || (int index) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || '''WriteFileContents''' || wxString,wxString || filename,contents
+
| bool || SaveActiveAs || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| int || '''Execute''' || wxString ||
+
| bool || SaveAll || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || '''ExecuteAndGetOutput''' || wxString ||
+
| int || ShowFindDialog || (bool replace,  bool explicitly_find_in_files = false) ||
 
|-
 
|-
  
 
|}
 
|}
  
 
+
== UserVariableManager ==
'''Notes:'''
 
The namespaces are accesses by prepending it's name (e.g. "IO.") to the scripting function, e.g. "IO.DirectoryExists(...)". "::" is only used when declaring the members of the namespace.
 
The functions in bold are going through the scripts security layer so there is no guarantee calling them will succeed. You should always examine the return value...
 
There exists one constant too, named ''allowInsecureScripts'', which allow you to test whether Code::Blocks was compiled with the functions going through the security layer.
 
 
 
 
 
 
 
== CompilerFactory ==
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
Line 492: Line 489:
 
!Return value
 
!Return value
 
!Name
 
!Name
!Arguments
+
!Arguments in Prototype
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || IsValidCompilerID || wxString ||
+
| bool || Exists || (const wxString& variable) ||
|-
 
 
 
|-
 
| int || GetCompilerIndex || wxString ||
 
|-
 
 
 
|-
 
| wxString || GetDefaultCompilerID ||  ||
 
|-
 
 
 
|-
 
| bool || CompilerInheritsFrom ||  ||
 
 
|-
 
|-
  
 
|}
 
|}
  
 
+
== IO namespace ==
 
 
== wxString ==
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
Line 522: Line 505:
 
!Return value
 
!Return value
 
!Name
 
!Name
!Arguments
+
!Arguments in Prototype
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || operator+ || ||
+
| bool || DirectoryExists || (const wxString& dir) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| bool || operator< || ||
+
| wxString || SelectDirectory || (const wxString& message, const wxString& initialPath, bool showCreateDirButton) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || operator<= || ||
+
| bool || '''CreateDirectory''' || (const wxString& full_path, int perms) || arg1=dir, arg2=permissions '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| bool || operator>= || ||
+
| bool || '''RemoveDirectory''' || (const wxString& src) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| bool || operator> || ||
+
| bool || '''CopyFile''' ||(const wxString& src, const wxString& dst, bool overwrite) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| int || Find || wxString ||
+
| bool || '''RenameFile''' || (const wxString& src, const wxString& dst) || old,new  '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| bool || Matches || wxString ||
+
| bool || '''RemoveFile''' || (const wxString& src) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| void || AddChar || char ||
+
| bool || FileExists || (const wxString& file) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| char || GetChar || int ||
+
| wxString || SelectFile || (const wxString& title, const wxString& defaultFile, const wxString& filter) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || IsEmpty || ||
+
| wxString || ReadFileContents || (const wxString& filename) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| int || Length || ||
+
| bool || '''WriteFileContents''' || (const wxString& filename, const wxString& contents) || filename,contents '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| int || length || || same as Length()
+
| int || '''Execute''' || (const wxString& command) ||
 
|-
 
|-
  
 
|-
 
|-
| int || len || || same as Length()
+
| wxString || '''ExecuteAndGetOutput''' || (const wxString& command) ||
 
|-
 
|-
  
 
|-
 
|-
| int || size || || same as Length()
+
| wxString || '''ExecuteAndGetOutputAndError''' || (const wxString& command, bool prepend_error) ||if 'prepend_error' is true gives an error string
 
|-
 
|-
  
 
|-
 
|-
| wxString || Lower ||  ||
+
| wxString || GetCwd || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || LowerCase || || same as Lower()
+
| void || SetCwd || (const wxString& dir) || directory (currently working directory)
 
|-
 
|-
  
|-
+
|}
| void || MakeLower ||  ||
 
|-
 
  
|-
 
| wxString || Upper ||  ||
 
|-
 
  
|-
+
'''Notes:'''
| wxString || UpperCase ||  || same as Upper()
+
The namespaces are accesses by prepending it's name (e.g. "IO.") to the scripting function, e.g. "IO.DirectoryExists(...)". "::" is only used when declaring the members of the namespace.
|-
+
The functions in bold are going through the scripts security layer so there is no guarantee calling them will succeed. You should always examine the return value...
 +
There exists one constant too, named ''allowInsecureScripts'', which allow you to test whether Code::Blocks was compiled with the functions going through the security layer.
  
|-
+
'''NOTE: 1)''' All paths/filenames are expanded via the ReplaceMacros function prior the function is called. So it is possible to copy the project output file with
| void || MakeUpper ||  ||
+
<source lang="c">
|-
+
IO.CopyFile(_T("$(TARGET_OUTPUT_FILE)"),_T("output_directory/output_file"),true);
 +
</source>
  
|-
+
== CompilerFactory ==
| wxString || Mid || int,int ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| void || Remove || int,int ||
+
|- style="background: #ececec; border: 0px solid gray"
|-
+
!Return value
 
+
!Name
|-
+
!Arguments in Prototype
| void || RemoveLast ||  ||
+
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| int || Replace || wxString,wxString[,bool] ||
+
| bool || IsValidCompilerID || (const wxString& id) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || Right || int ||
+
| int || GetCompilerIndex || (const wxString& id) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || AfterFirst || char ||
+
| wxString || GetDefaultCompilerID || ( )  ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || AfterLast || char ||
+
| wxString || GetCompilerVersionString || (const wxString& Id) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || BeforeFirst || char ||
+
| bool || CompilerInheritsFrom || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || BeforeLast || char ||
+
| wxString || GetCompilerIDByName || (const wxString &name ) || Makes it possible to find the compiler id by its name. Available since rev 9823.
 
|-
 
|-
 
|}
 
|}
''NOTE: Is instantiated in a script using: local my_wxstring = ::wxString();
 
  
 
+
== wxString ==
== wxArrayString ==
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
Line 654: Line 630:
 
!Remarks
 
!Remarks
 
|-
 
|-
 +
  
 
|-
 
|-
| void || Add || wxString, size_t || arg1=string, arg2=number of copies to add
+
| wxString || _T || const char* || basically this is the wxString constructor
 
|-
 
|-
  
 
|-
 
|-
| void || Clear || ||
+
| wxString || _ || const char* || the same as _T, but should be used for translatable strings
 
|-
 
|-
  
 
|-
 
|-
| int || GetCount || ||
+
| wxString || operator= || const wxString ||
 
|-
 
|-
 +
  
 
|-
 
|-
| wxString || Item || int ||
+
| wxString || operator+ || const wxString ||
 
|-
 
|-
  
|}
+
|-
''NOTE: Is instantiated in a script using: local my_wxarraystring = ::wxArrayString();
+
| wxString || operator+ || const int ||
 
 
== wxColour ==
 
 
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
|- style="background: #ececec; border: 0px solid gray"
 
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| byte || Red || ||
+
| wxString || operator+= || const wxString ||
 
|-
 
|-
  
 
|-
 
|-
| byte || Green || ||
+
| wxString || operator+= || const int ||
 
|-
 
|-
  
 
|-
 
|-
| byte || Blue || ||
+
| bool || operator< || const wxString || _T("abc") <  _T("cba") -> true
 
|-
 
|-
  
 
|-
 
|-
| void || Set || byte,byte,byte ||
+
| bool || operator<= || const wxString ||
 
|-
 
|-
  
|}
+
|-
''NOTE: Is instantiated in a script using: local my_wxcolour = ::wxColour();
+
| bool || operator>= || const wxString ||
 
 
 
 
== ProjectFile ==
 
 
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
|- style="background: #ececec; border: 0px solid gray"
 
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| void || AddBuildTarget || wxString ||  
+
| bool || operator> || const wxString ||
 
|-
 
|-
  
 
|-
 
|-
| void || RenameBuildTarget || wxString,wxString ||  
+
| int || Find || wxString || -1 if not found
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveBuildTarget || wxString ||  
+
| bool || Matches || wxString || not use '==' !!, returns true if the string contents matches a mask containing '*' and '?'
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetBaseName || ||
+
| void || AddChar || char ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetObjName || ||
+
| char || GetChar || int || arg1=position
 
|-
 
|-
  
 
|-
 
|-
| void || SetObjName || wxString ||  
+
| bool || IsEmpty || ||
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || GetParentProject ||  ||
+
| int || Length ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxFileName || file || || (variable)
+
| int || length || || same as Length()
 
|-
 
|-
  
 
|-
 
|-
| wxString || relativeFilename || || (variable)
+
| int || len || || same as Length()
 
|-
 
|-
  
 
|-
 
|-
| wxString || relativeToCommonTopLevelPath || || (variable)
+
| int || size || || same as Length()
 
|-
 
|-
  
 
|-
 
|-
| bool || compile || || (variable)
+
| wxString || Lower || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || link || || (variable)
+
| wxString || LowerCase || || same as Lower()
 
|-
 
|-
  
 
|-
 
|-
| int || weight || || (variable)
+
| void || MakeLower || ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || compilerVar || || (variable)
+
| wxString || Upper || ||
 
|-
 
|-
  
|}
 
 
 
 
== CompileOptionsBase ==
 
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
|- style="background: #ececec; border: 0px solid gray"
 
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
 
+
| wxString || UpperCase || || same as Upper()
|-
 
| void || SetLinkerOptions || wxArrayString ||
 
 
|-
 
|-
  
 
|-
 
|-
| void || SetLinkLibs || wxArrayString ||
+
| void || MakeUpper || ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetCompilerOptions || wxArrayString ||
+
| wxString || Mid || int, int || arg1=position, arg2=long
 
|-
 
|-
  
 
|-
 
|-
| void || SetIncludeDirs || wxArrayString ||
+
| wxString || Remove || int, int || arg1=position, arg2=long
 
|-
 
|-
  
 
|-
 
|-
| void || SetResourceIncludeDirs || wxArrayString ||
+
| void || RemoveLast || int  || remove the last characters
 
|-
 
|-
  
 
|-
 
|-
| void || SetLibDirs || wxArrayString ||
+
| int || Replace || wxString, wxString,bool || arg3=true -> all occurrences else the first
 
|-
 
|-
  
 
|-
 
|-
| void || SetCommandsBeforeBuild || wxArrayString ||
+
| wxString || Right || int x || return the x last characters
 
|-
 
|-
  
 
|-
 
|-
| void || SetCommandsAfterBuild || wxArrayString ||
+
| wxString || AfterFirst || char || not found -> _T("")
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetLinkerOptions || ||
+
| wxString || AfterLast || char || not found -> all the character string
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetLinkLibs || ||
+
| wxString || BeforeFirst || char || not found -> all the character string
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetCompilerOptions || ||
+
| wxString || BeforeLast || char || not found -> _T("")
 
|-
 
|-
 +
|}
 +
''NOTE: Is instantiated in a script using: local my_wxstring = ::wxString();
  
|-
+
== wxArrayString ==
| wxArrayString || GetIncludeDirs ||  ||
+
 
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetResourceIncludeDirs || ||
+
| void || Add || wxString, size_t || arg1=string, arg2=number of copies to add
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetLibDirs ||  ||
+
| void || Clear ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetCommandsBeforeBuild ||  ||
+
| int || GetCount ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetCommandsAfterBuild || ||
+
| int || Index || wxString || -1 If not found
 
|-
 
|-
  
 
|-
 
|-
| bool || GetModified || ||
+
| wxString || Item || int || not work with wx 2.9.x ?!
 
|-
 
|-
  
|-
+
|}
| void || SetModified || bool ||
+
''NOTE: Is instantiated in a script using: local my_wxarraystring = ::wxArrayString();
 +
 
 +
== wxColour ==
 +
 
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| void || AddLinkerOption || wxString ||
+
| byte || Red || ||
 
|-
 
|-
  
 
|-
 
|-
| void || AddLinkLib || wxString ||
+
| byte || Green || ||
 
|-
 
|-
  
 
|-
 
|-
| void || AddCompilerOption || wxString ||
+
| byte || Blue || ||
 
|-
 
|-
  
 
|-
 
|-
| void || AddIncludeDir || wxString ||
+
| bool || IsOk || || ONLY if (wxVERSION_NUMBER < 2900)
 
|-
 
|-
  
 
|-
 
|-
| void || AddResourceIncludeDir || wxString ||
+
| void || Set || byte, byte, byte, byte || red, green, blue, alpha : into [0..255]
 
|-
 
|-
  
|-
+
|}
| void || AddLibDir || wxString ||
+
''NOTE: Is instantiated in a script using: local my_wxcolour = ::wxColour();
 +
 
 +
''EXAMPLE: local my_wxcolour = ::wxColour(); my_wxcolour.Set(0xFF, 0x00, 0x00, 0x55); ::print(my_wxcolour) -> [r=255, g=0, b=0]
 +
 
 +
== wxFileName ==
 +
'''UNDER VERIFICATION'''
 +
 
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| void || AddCommandsBeforeBuild || wxString ||
+
| void || Assign || const wxFileName || creates the file name from an other wxFileName
 
|-
 
|-
  
 
|-
 
|-
| void || AddCommandsAfterBuild || wxString ||
+
| void || Assign || const wxString, wxPathFormat || arg1=full_path, arg2=wformat=xPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveLinkerOption || wxString ||
+
| void || AssignCwd || const wxString || arg1=volume
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveLinkLib || wxString ||
+
| void || AssignDir|| const wxString, wxPathFormat || arg1=name_dir, arg2=format=wxPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveCompilerOption || wxString ||
+
| void || AssignHomeDir || || sets this file name object to the home directory
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveIncludeDir || wxString ||
+
| void || Clear || || reset all components to default, uninitialized state
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveResourceIncludeDir || wxString ||
+
| void || ClearExt || || removes the extension from the file name resulting in a file name with no trailing dot
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveLibDir || wxString ||
+
| int || GetDirCount || || returns the number of directories in the file name.
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveCommandsBeforeBuild || wxString ||
+
| wxArrayString || GetDirs || || returns the directories in string array form
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveCommandsAfterBuild || wxString ||
+
| wxString || GetExt || || returns the file name extension.
 +
 
 
|-
 
|-
  
 
|-
 
|-
| bool || GetAlwaysRunPostBuildSteps ||  ||
+
| wxString || GetFullName ||  || returns the full name (including extension but excluding directories).
 
|-
 
|-
  
 
|-
 
|-
| void || SetAlwaysRunPostBuildSteps || bool ||
+
| wxString || GetFullPath || wxPathFormat || arg=format=wxPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| bool || SetVar || wxString,wxString,bool ||
+
| wxString || GetLongPath || || return the long form of the path (returns identity on non-Windows platforms)
 +
 
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetVar || wxString ||
+
| wxString || GetName || || returns the name part of the filename (without extension)
 
|-
 
|-
  
 
|-
 
|-
| bool || UnsetVar || wxString ||
+
| wxString || GetPath || int, wxPathFormat || arg1=flags=wxPATH_GET_VOLUME..., arg2=format=wxPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| void || UnsetAllVars ||  ||
+
| wxString || GetShortPath ||  || return the short form of the path (returns identity on non-Windows platforms).
|-
 
  
|}
 
 
 
 
== CompileTargetBase ==
 
Extends CompileOptionsBase.
 
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
|- style="background: #ececec; border: 0px solid gray"
 
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetFilename ||  ||
+
| wxString || GetVolume ||  || returns the string containing the volume for this file name
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetTitle ||  ||
+
| bool || HasExt ||  || returns true if an extension is present.
 
|-
 
|-
  
 
|-
 
|-
| void || SetTitle || wxString ||
+
| bool || HasName || || returns true if a name is present
 
|-
 
|-
  
 
|-
 
|-
| void || SetOutputFilename || wxString ||
+
| bool || HasVolume || || returns true if a volume specifier is present
 
|-
 
|-
  
 
|-
 
|-
| void || SetWorkingDir || wxString ||
+
| void || InsertDir||int, const wxString || arg1=before_dir, arg2=name_dir
 
|-
 
|-
  
 
|-
 
|-
| void || SetObjectOutput || wxString ||
+
| bool || IsAbsolute || wxPathFormat ||arg=format=wxPATH_NATIVE...
 
|-
 
|-
  
 
|-
 
|-
| void || SetDepsOutput || wxString ||
+
| bool || IsOk || || returns true if the filename is valid
 
|-
 
|-
  
 
|-
 
|-
| OptionsRelation || GetOptionRelation || OptionsRelationType ||
+
| bool || IsRelative || wxPathFormat ||arg=format=wxPATH_NATIVE...
 
|-
 
|-
  
 
|-
 
|-
| void || SetOptionRelation || OptionsRelationType,OptionsRelation ||
+
| bool || IsDir || || returns true if this object represents a directory
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetWorkingDir || ||
+
| bool || MakeAbsolute ||const wxString, wxPathFormat|| arg1=cwd=_T("") or ..., arg2=format=wxPATH_NATIVE or ...
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetObjectOutput || ||
+
| bool || MakeRelativeTo ||const wxString, wxPathFormat|| arg1=path_base, arg2=format=wxPATH_NATIVE or ...
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetDepsOutput || ||
+
| bool || Normalize ||int, const wxString, wxPathFormat||arg1=flags=wxPATH_NORM_ALL, arg2=cwd=_T(""),arg3=format=wxPATH_NATIVE or ...
|-
+
|
  
 
|-
 
|-
| wxString || GetOutputFilename || ||
+
| void || PrependDir || const wxString ||arg=dir
 
|-
 
|-
  
 
|-
 
|-
| wxString || SuggestOutputFilename || ||
+
| void || RemoveDir || int ||arg=pos RemoveLastDir
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetExecutableFilename || ||
+
| void || RemoveLastDir || || removes last directory component from the path
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetDynamicLibFilename || ||
+
| bool || SameAs || const wxFileName, wxPathFormat || arg1=filepath, arg2=format=wxPATH_NATIVE
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetDynamicLibDefFilename ||  ||
+
| bool || SetCwd||  || changes the current working directory
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetStaticLibFilename || ||
+
| void || SetExt ||const wxString ||arg=extension
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetBasePath ||  ||
+
| void || SetEmptyExt ||  || sets the extension of the file name to be an empty extension
 
|-
 
|-
  
 
|-
 
|-
| void || SetTargetType || TargetType ||
+
| void || SetFullName || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| TargetType || GetTargetType || ||
+
| void || SetName || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetExecutionParameters || ||
+
| void || SetVolume || wxString ||
 
|-
 
|-
 +
 +
|}
 +
''NOTE: Is instantiated in a script using: local my_filename = ::wxFileName()
 +
 +
== wxPoint ==
 +
'''UNDER CONSTRUCTION'''
 +
 +
'' Instantiate integer points 2D
 +
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 +
|-
  
 
|-
 
|-
| void || SetExecutionParameters || wxString ||
+
| wxPoint || operator= || const wxPoint|| default assignment operator is ok
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetHostApplication || ||
+
| bool || operator== ||const wxPoint||
 
|-
 
|-
  
 
|-
 
|-
| void || SetHostApplication || wxString ||
+
| bool || operator!= || const wxPoint||
 
|-
 
|-
  
 
|-
 
|-
| void || SetCompilerID || wxString ||
+
| int || x || ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetCompilerID || ||
+
| int || y || ||
 
|-
 
|-
  
 
|}
 
|}
 +
''NOTE: Is instantiated in a script using: local my_wxpoint = ::wxPoint();
  
 +
''EXAMPLE: local my_wxpoint = ::wxPoint(); my_wxpoint.x = 5;  my_wxpoint.y = 12; // not use ::print(my_wxpoint)
  
 +
== wxSize ==
 +
'''UNDER CONSTRUCTION'''
  
== ProjectBuildTarget ==
+
'' Instantiate integers values (X, Y)
Extends CompileTargetBase.
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
Line 1,080: Line 1,061:
 
!Arguments
 
!Arguments
 
!Remarks
 
!Remarks
|-
+
|-  
  
 
|-
 
|-
| cbProject* || GetParentProject || ||
+
| wxSize || operator= || const wwSize|| default assignment operator is ok
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetFullTitle || ||
+
| bool || operator== ||const wxSize||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetExternalDeps || ||
+
| bool || operator!= || const wxSize||
 
|-
 
|-
  
 
|-
 
|-
| void || SetExternalDeps || wxString ||
+
| int || GetWidth || || return X
 
|-
 
|-
  
 
|-
 
|-
| void || SetAdditionalOutputFiles || wxString ||
+
| int || GetHeight || || return Y
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetAdditionalOutputFiles || ||
+
| void || SetWidth || int w|| X=w
 
|-
 
|-
  
 
|-
 
|-
| bool || GetIncludeInTargetAll || ||
+
| void || SetHeight || int h|| Y=h
 
|-
 
|-
  
 
|-
 
|-
| void || SetIncludeInTargetAll || bool ||
+
| void || Set || int w, int h|| X=w, Y=h
 
|-
 
|-
  
|-
 
| bool || GetCreateDefFile ||  ||
 
|-
 
 
|-
 
| void || SetCreateDefFile || bool ||
 
|-
 
 
|-
 
| bool || GetCreateStaticLib ||  ||
 
|-
 
 
|-
 
| void || SetCreateStaticLib || bool ||
 
|-
 
 
|-
 
| bool || GetUseConsoleRunner ||  ||
 
|-
 
 
|-
 
| void || SetUseConsoleRunner || bool ||
 
|-
 
  
 
|}
 
|}
 +
''NOTE: Is instantiated in a script using: local my_wxsize = ::wxSize();
  
 +
''EXAMPLE: local my_wxsize = ::wxSize(); my_wxsize.SetWidth(5);  my_wxsize.SetHeight(12); // not use ::print(my_wxsize)
  
 
+
== ProjectFile ==
== cbProject ==
 
Extends CompileTargetBase.
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
Line 1,149: Line 1,107:
 
!Return value
 
!Return value
 
!Name
 
!Name
!Arguments
+
!Arguments in Prototype
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || GetModified || ||
+
| void || AddBuildTarget || const wxString& targetName ||  
 
|-
 
|-
  
 
|-
 
|-
| void || SetModified || bool ||
+
| void || RenameBuildTarget || const wxString& oldTargetName, const wxString& newTargetName ||  
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetMakefile || ||
+
| void || RemoveBuildTarget || const wxString& targetName ||  
 
|-
 
|-
  
 
|-
 
|-
| void || SetMakefile || wxString ||
+
| const wxArrayString& || GetBuildTargets || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || IsMakefileCustom || ||
+
| wxString || GetBaseName || ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetMakefileCustom || bool ||
+
| wxString || GetObjName || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseAllFiles || bool ||
+
| void || SetObjName || const wxString& targetName ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAllFiles || ||
+
| cbProject* || GetParentProject || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || Save || ||
+
| wxString|| GetCustomBuildCommand|| const wxString& compilerId ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveLayout || ||
+
| void  || SetCustomBuildCommand || const wxString& compilerId, const wxString& newBuildCommand ||
 
|-
 
|-
  
 
|-
 
|-
| bool || LoadLayout || ||
+
| bool || GetUseCustomBuildCommand|| const wxString& compilerId ||
 
|-
 
|-
  
 
|-
 
|-
| bool || ShowOptions || ||
+
| void  || SetUseCustomBuildCommand || const wxString& compilerId, bool useCustomBuildCommand ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetCommonTopLevelPath ||  ||
+
| wxFileName || file ||  || (variable)
 
|-
 
|-
  
 
|-
 
|-
| int || GetFilesCount ||  ||
+
| wxString || relativeFilename ||  || (variable)
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || GetFile || int ||
+
| wxString || relativeToCommonTopLevelPath || || (variable)
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || GetFileByFilename || wxString,bool,bool ||
+
| bool || compile || || (variable)
 
|-
 
|-
  
 
|-
 
|-
| bool || RemoveFile || int ||
+
| bool || link || || (variable)
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || AddFile || wxString|int,wxString,bool,bool,int ||
+
| int || weight || || (variable)
 
|-
 
|-
  
 
|-
 
|-
| int || GetBuildTargetsCount ||  ||
+
| wxString || compilerVar ||  || (variable)
 
|-
 
|-
  
 
|-
 
|-
| ProjectBuildTarget* || GetBuildTarget || wxString|int ||
+
| wxArrayString || buildTargets || || (variable)
 
|-
 
|-
  
|-
+
|}
| ProjectBuildTarget* || AddBuildTarget || wxString ||
 
|-
 
  
|-
+
== CompileOptionsBase ==
| bool || RenameBuildTarget || wxString|int,wxString ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| ProjectBuildTarget* || DuplicateBuildTarget || wxString|int,wxString ||
+
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments in Prototype
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || RemoveBuildTarget || wxString|int ||
+
| void || AddPlatform || int platform || windows,unix,mac
 
|-
 
|-
  
 
|-
 
|-
| bool || ExportTargetAsProject || wxString|int ||
+
| void || RemovePlatform || int platform ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetActiveBuildTarget || int ||
+
| void || SetPlatforms || int platform ||
 
|-
 
|-
  
 
|-
 
|-
| int || GetActiveBuildTarget || ||
+
| int || GetPlatforms || ||
 
|-
 
|-
  
 
|-
 
|-
| int || SelectTarget || int,bool ||
+
| bool || SupportsCurrentPlatform || ||
 
|-
 
|-
  
 
|-
 
|-
| ProjectBuildTarget* || GetCurrentlyCompilingTarget || ||
+
| void || SetLinkerOptions || const wxArrayString& linkerOpts ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetCurrentlyCompilingTarget || ProjectBuildTarget* ||
+
| void || SetLinkLibs || const wxArrayString& linkLibs ||
 
|-
 
|-
  
 
|-
 
|-
| PCHMode || GetModeForPCH || ||
+
| void || SetLinkerExecutable || LinkerExecutableOption option ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetModeForPCH || PCHMode ||
+
| LinkerExecutableOption || GetLinkerExecutable || ||
 
|-
 
|-
  
|}
+
|-
 
+
| void || SetCompilerOptions || const wxArrayString& compilerOpts ||
 
 
 
 
== EditorBase ==
 
 
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
|- style="background: #ececec; border: 0px solid gray"
 
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetFilename || ||
+
| void || SetResourceCompilerOptions || const wxArrayString& resourceCompilerOpts ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetFilename || wxString ||
+
| void || SetIncludeDirs || const wxArrayString& includeDirs ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetShortName || ||
+
| void || SetResourceIncludeDirs || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || GetModified || ||
+
| void || SetLibDirs || const wxArrayString& libDirs ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetModified || bool ||
+
| void || SetCommandsBeforeBuild || const wxArrayString& commands ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetTitle || ||
+
| void || SetCommandsAfterBuild || const wxArrayString& commands ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetTitle || wxString ||
+
| wxArrayString || GetLinkerOptions || ||
 
|-
 
|-
  
 
|-
 
|-
| void || Activate ||  ||
+
| wxArrayString || GetLinkLibs ||  ||
 
|-
 
|-
  
 
|-
 
|-
| bool || Close ||  ||
+
| wxArrayString || GetCompilerOptions ||  ||
 
|-
 
|-
  
 
|-
 
|-
| bool || Save ||  ||
+
| wxArrayString || GetResourceCompilerOptions ||  ||
 
|-
 
|-
  
 
|-
 
|-
| bool || IsBuiltinEditor ||  ||
+
| wxArrayString || GetIncludeDirs ||  ||
 
|-
 
|-
  
 
|-
 
|-
| bool || ThereAreOthers ||  ||
+
| wxArrayString || GetResourceIncludeDirs ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoLine || int,bool ||
+
| wxArrayString || GetLibDirs || ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleBreakpoint || int,bool ||
+
| wxArrayString || GetCommandsBeforeBuild || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || HasBreakpoint || int ||
+
| wxArrayString || GetCommandsAfterBuild || ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoNextBreakpoint ||  ||
+
| bool || GetModified ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoPreviousBreakpoint || ||
+
| void || SetModified || bool modified ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleBookmark || int,bool ||
+
| void || AddLinkerOption || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || HasBookmark || int ||
+
| void || AddLinkLib || const wxString& lib ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoNextBookmark || ||
+
| void || AddCompilerOption || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoPreviousBookmark || ||
+
| void || AddResourceCompilerOption || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || Undo || ||
+
| void || AddIncludeDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || Redo || ||
+
| void || AddResourceIncludeDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || Cut || ||
+
| void || AddLibDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || Copy || ||
+
| void || AddCommandsBeforeBuild || const wxString& command ||
 
|-
 
|-
  
 
|-
 
|-
| void || Paste || ||
+
| void || AddCommandsAfterBuild || const wxString& command ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CanUndo || ||
+
| void || ReplaceLinkerOption || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CanRedo || ||
+
| void || ReplaceLinkLib || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CanPaste || ||
+
| void || ReplaceCompilerOption || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || HasSelection || ||
+
| void || ReplaceResourceCompilerOption || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
|}
+
|-
 +
| void || ReplaceIncludeDir || const wxString& option, const wxString& new_option ||
 +
|-
  
 
+
|-
 
+
| void || ReplaceResourceIncludeDir || const wxString& option, const wxString& new_option ||
== cbEditor ==
 
Extends EditorBase.
 
 
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
|- style="background: #ececec; border: 0px solid gray"
 
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| void || SetEditorTitle || wxString ||
+
| void || ReplaceLibDir || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || GetProjectFile || ||
+
| void || RemoveLinkerOption || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAs || ||
+
| void || RemoveLinkLib || const wxString& lib ||
 
|-
 
|-
  
 
|-
 
|-
| void || FoldAll || ||
+
| void || RemoveCompilerOption || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || UnfoldAll || ||
+
| void || RemoveIncludeDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleAllFolds || ||
+
| void || RemoveResourceCompilerOption || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || FoldBlockFromLine || int ||
+
| void || RemoveResourceIncludeDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || UnfoldBlockFromLine || int ||
+
| void || RemoveLibDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleFoldBlockFromLine || int ||
+
| void || RemoveCommandsBeforeBuild || const wxString& command ||
 
|-
 
|-
  
 
|-
 
|-
| int || GetLineIndentInSpaces || int ||
+
| void || RemoveCommandsAfterBuild || const wxString& command ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetLineIndentString || int ||
+
| bool || GetAlwaysRunPostBuildSteps || ||
 
|-
 
|-
  
 
|-
 
|-
| void || Touch || ||
+
| void || SetAlwaysRunPostBuildSteps || bool always ||
 
|-
 
|-
  
 
|-
 
|-
| bool || Reload || bool ||
+
| void || SetBuildScripts || const wxArrayString& scripts ||
 
|-
 
|-
  
 
|-
 
|-
| void || Print || bool,PrintColourMode,bool ||
+
| wxArrayString || GetBuildScripts || ||
 
|-
 
|-
  
 
|-
 
|-
| void || AutoComplete || ||
+
| void || AddBuildScript || const wxString& script ||
 
|-
 
|-
  
 
|-
 
|-
| bool || AddBreakpoint || int,bool ||
+
| void || RemoveBuildScript || const wxString& script ||
 
|-
 
|-
  
 
|-
 
|-
| bool || RemoveBreakpoint || int,bool ||
+
| bool || SetVar || const wxString& key, const wxString& value, bool onlyIfExists = false ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetText || wxString || this is not present in cbEditor; included to help scripts edit text
+
| wxString || GetVar || const wxString& key ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetText || || this is not present in cbEditor; included to help scripts edit text
+
| bool || UnsetVar || const wxString& key ||
 +
|-
 +
 
 +
|-
 +
| void || UnsetAllVars || ||
 
|-
 
|-
  
 
|}
 
|}
  
 
+
== CompileTargetBase ==
 
+
Extends CompileOptionsBase.
== Constants ==
 
  
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 
 
|- style="background: #ececec; border: 0px solid gray"
 
|- style="background: #ececec; border: 0px solid gray"
!Constant
+
!Return value
!Type
+
!Name
 +
!Arguments
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM || int || this defines the platform Code::Blocks is currently running on. It is equal to only one of the following PLATFORM_* constants
+
| void || SetTargetFilenameGenerationPolicy || TargetFilenameGenerationPolicy prefix, TargetFilenameGenerationPolicy extension|| tgfpPlatformDefault -> Generate filename based on running platform defaults.   tgfpNone -> No automatic generation; let the user specify the full filename.
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_MSW || int || All Windows platforms
+
| wxString || GetFilename || || The full project name (*.cbp)
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_GTK || int || All GTK platforms (Linux, BSD, Solaris, Darwin, etc.)
+
| wxString || GetTitle || || Target name
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_MAC || int || All Mac platforms
+
| void || SetTitle || wxString title||
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_OS2 || int || OS/2 platform
+
| void || SetOutputFilename || wxString filename||
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_X11 || int || All X11 platforms
+
| void || SetWorkingDir || wxString dirname||
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_UNKNOWN || int || Unknown platform. Please inform us if PLATFORM == PLATFORM_UNKNOWN so we can make this platform known too ;)
+
| void || SetObjectOutput || wxString dirname||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''Message dialog flags'''
+
| void || SetDepsOutput || wxString dirname||
 
|-
 
|-
  
 
|-
 
|-
| wxOK || int || Flag for Message() 's third argument (flags).
+
| OptionsRelation || GetOptionRelation || OptionsRelationType type||
 
|-
 
|-
  
 
|-
 
|-
| wxYES_NO || int || -"-
+
| void || SetOptionRelation || OptionsRelationType type, OptionsRelation rel ||
 
|-
 
|-
  
 
|-
 
|-
| wxCANCEL || int || -"-
+
| wxString || GetWorkingDir ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxICON_QUESTION || int || -"-
+
| wxString || GetObjectOutput ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxICON_INFORMATION || int || -"-
+
| wxString || GetDepsOutput ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxICON_WARNING || int || -"-
+
| wxString || GetOutputFilename ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxICON_ERROR || int || -"-
+
| wxString || SuggestOutputFilename ||  ||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''Message dialog return values'''
+
| wxString || GetExecutableFilename ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxID_OK || int ||
+
| wxString || GetDynamicLibFilename ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxID_YES || int ||
+
| wxString || GetDynamicLibDefFilename ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxID_NO || int ||
+
| wxString || GetStaticLibFilename ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxID_CANCEL || int ||
+
| wxString || GetBasePath ||  ||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum OptionsRelationType'''
+
| void || SetTargetType || TargetType pt||
 
|-
 
|-
  
 
|-
 
|-
| ortCompilerOptions || enum ||
+
| TargetType || GetTargetType ||  ||
 
|-
 
|-
  
 
|-
 
|-
| ortLinkerOptions || enum ||
+
| wxString || GetExecutionParameters ||  ||
 
|-
 
|-
  
 
|-
 
|-
| ortIncludeDirs || enum ||
+
| void || SetExecutionParameters || wxString params||
 
|-
 
|-
  
 
|-
 
|-
| ortLibDirs || enum ||
+
| wxString || GetHostApplication ||  ||
 
|-
 
|-
  
 
|-
 
|-
| ortResDirs || enum ||
+
| void || SetHostApplication || wxString app||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum OptionsRelation'''
+
| void || SetCompilerID || wxString id||
 
|-
 
|-
  
 
|-
 
|-
| orUseParentOptionsOnly || enum ||
+
| wxString || GetCompilerID ||  ||
 
|-
 
|-
  
 
|-
 
|-
| orUseTargetOptionsOnly || enum ||
+
| wxString || GetMakeCommandFor || MakeCommand cmd ||
 
|-
 
|-
  
 
|-
 
|-
| orPrependToParentOptions || enum ||
+
| void || SetMakeCommandFor || MakeCommand cmd, wxString make ||
 
|-
 
|-
  
 
|-
 
|-
| orAppendToParentOptions || enum ||
+
| bool || MakeCommandsModified ||  ||
 
|-
 
|-
  
|-
+
|}
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum TargetType'''
+
 
|-
+
== ProjectBuildTarget ==
 +
Extends CompileTargetBase.
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| ttExecutable || enum ||
+
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| ttConsoleOnly || enum ||
+
| cbProject* || GetParentProject ||  ||
 
|-
 
|-
  
 
|-
 
|-
| ttStaticLib || enum ||
+
| wxString || GetFullTitle || ||The full title, i.e. "projectname - targetname"
 
|-
 
|-
  
 
|-
 
|-
| ttDynamicLib || enum ||
+
| wxString || GetExternalDeps || ||Returns a list of files whose target depends (separated by ';')
 
|-
 
|-
  
 
|-
 
|-
| ttCommandsOnly || enum ||
+
| void || SetExternalDeps || wxString deps||Sets the list of files whose target depends (separated by ';')
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum MakeCommand'''
+
| void || SetAdditionalOutputFiles || wxString files||Sets the list of additional output files (separated by ';')
 
|-
 
|-
  
 
|-
 
|-
| mcClean || enum ||
+
| wxString || GetAdditionalOutputFiles || ||Returns a list of additional output files (separated by ';')
 
|-
 
|-
  
 
|-
 
|-
| mcDistClean || enum ||
+
| bool || GetIncludeInTargetAll || || Deprecated, do not use at 'All'
 
|-
 
|-
  
 
|-
 
|-
| mcBuild || enum ||
+
| void || SetIncludeInTargetAll || bool || Deprecated, do not use at 'All'
 
|-
 
|-
  
 
|-
 
|-
| mcCompileFile || enum ||
+
| bool || GetCreateDefFile || || True if the target creates a DEF imports file. (valid for dynamic library targets only)
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum PCHMode'''
+
| void || SetCreateDefFile || bool createIt|| Set if the target creates a DEF imports file
 
|-
 
|-
  
 
|-
 
|-
| pchSourceDir || enum ||
+
| bool || GetCreateStaticLib || || Return true if an import library will be created, false if not (valid for dynamic library targets only)
 
|-
 
|-
  
 
|-
 
|-
| pchObjectDir || enum ||
+
| void || SetCreateStaticLib || bool ||Set if an import library should be created (valid for dynamic library targets only)
 
|-
 
|-
  
 
|-
 
|-
| pchSourceFile || enum ||
+
| bool || GetUseConsoleRunner || || Valid only for targets generating a console executable
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum PrintScope'''
+
| void || SetUseConsoleRunner || bool useIt||Valid only for targets generating a console executable
 
|-
 
|-
  
 
|-
 
|-
| psSelection || enum ||
+
| ProjectFile* || GetFile || int index|| Returns a file from the target
 
|-
 
|-
  
 
|-
 
|-
| psActiveEditor || enum ||
+
| int || GetFilesCount || || Returns number of files for the target
 
|-
 
|-
  
|-
+
|}
| psAllOpenEditors || enum ||
+
 
 +
== cbProject ==
 +
Extends CompileTargetBase.
 +
 
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum PrintColourMode'''
+
| bool || GetModified ||  || Return true if the project is modified in any way
 
|-
 
|-
  
 
|-
 
|-
| pcmBlackAndWhite || enum ||
+
| void || SetModified || bool modified|| Mark the project as modified or not
 
|-
 
|-
  
 
|-
 
|-
| pcmColourOnWhite || enum ||
+
| wxString || GetMakefile || || Returns file name for the Makefile
 
|-
 
|-
  
 
|-
 
|-
| pcmInvertColours || enum ||
+
| void || SetMakefile || wxString makefile || Set Makefile name when using a custom Makefile to build the project
 
|-
 
|-
  
 
|-
 
|-
| pcmAsIs || enum ||
+
| bool || IsMakefileCustom || || True if the project is using a custom Makefile for compilation, false if not
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum TemplateOutputType'''
+
| void || SetMakefileCustom || bool custom || Mark if the project should use a custom Makefile for compilation
 
|-
 
|-
  
 
|-
 
|-
| wizProject || enum || TemplateOutputType::totProject
+
| bool || CloseAllFiles || bool dontsave || Close all project files. If dontsave is true no file would be saved even if modified
 
|-
 
|-
  
 
|-
 
|-
| wizTarget || enum || TemplateOutputType::totTarget
+
| bool || SaveAllFiles || || Save all project files
 
|-
 
|-
  
 
|-
 
|-
| wizFiles || enum || TemplateOutputType::totFiles
+
| bool || Save || || Save the project
 
|-
 
|-
  
 
|-
 
|-
| wizCustom || enum || TemplateOutputType::totCustom
+
| bool || SaveLayout || || Save the project's layout. Layout is the list of open project files, which one is active, where the cursor is located on each one of those, etc
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''Other constants'''
+
| bool || LoadLayout ||  || Load the project's layout
 
|-
 
|-
  
 
|-
 
|-
| wxFILE_SEP_PATH || wxString || Path separator. "\" for windows, "/" for all other platforms
+
| wxString || GetCommonTopLevelPath || || Returns the top-level path common to all project files
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''File extensions (e.g. "cbp")'''
+
| int || GetFilesCount ||  || Returns number of files in the project
 
|-
 
|-
  
 
|-
 
|-
| EXT_WORKSPACE || wxString ||
+
| ProjectFile* || GetFile || int index || Access a file of the project. Index is between 0 and GetFilesCount()
 
|-
 
|-
  
 
|-
 
|-
| EXT_CODEBLOCKS || wxString ||
+
| ProjectFile* || GetFileByFilename || wxString filename, bool isRelative, bool isUnixFilename || Access a file of the project.
 
|-
 
|-
  
 
|-
 
|-
| EXT_DEVCPP || wxString ||
+
| bool || RemoveFile || ProjectFile *file || Remove a file from the project
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC6 || wxString ||
+
| ProjectFile* || AddFile || const wxString &targetName, const wxString &fileaname, bool compile, bool link, int weight || See API docs for cbProject::AddFile
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC6_WORKSPACE || wxString ||
+
| ProjectFile* || AddFile || int targetIndex, const wxString &fileaname, bool compile, bool link, int weight || See API docs for cbProject::AddFile
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC7 || wxString ||
+
| int || GetBuildTargetsCount || || Returns the number of targets
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC7_WORKSPACE || wxString ||
+
| ProjectBuildTarget* || GetBuildTarget || int index|| Access a build target by index. Index is from 0 to GetBuildTargetsCount
 
|-
 
|-
  
 
|-
 
|-
| EXT_D || wxString ||
+
| ProjectBuildTarget* || GetBuildTarget || const wxString &targetName || Access a build target by name
 
|-
 
|-
  
 
|-
 
|-
| EXT_F || wxString ||
+
| ProjectBuildTarget* || AddBuildTarget || cont wxString &targetName || Add a new build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_F77 || wxString ||
+
| bool || RenameBuildTarget || int index, const wxString &targetName || Rename a build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_F95 || wxString ||
+
| bool || RenameBuildTarget || const wxString &oldTargetName, const wxString &newTargetName || Rename a build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_CPP || wxString ||
+
| ProjectBuildTarget* || DuplicateBuildTarget || int index, const wxString &newName || Duplicate a build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_C || wxString ||
+
| ProjectBuildTarget* || DuplicateBuildTarget || const wxString &targetName, const wxString &newName || Duplicate a build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_CC || wxString ||
+
| bool || RemoveBuildTarget || int index || Remove a build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_CXX || wxString ||
+
| bool || RemoveBuildTarget || const wxString &targetName || Remove a build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_HPP || wxString ||
+
| bool || ExportTargetAsProject || int index || Export a target as a new project. In other words, save a copy of the project containing only the specified target. The user will be prompted with a dialog to select the new project name.
 
|-
 
|-
  
 
|-
 
|-
| EXT_H || wxString ||
+
| bool || ExportTargetAsProject || wxString targetName || Export a target as new project
 
|-
 
|-
  
 
|-
 
|-
| EXT_HH || wxString ||
+
| bool || BuildTargetValid || const wxString &name, bool virtualsToo || Is there a build target (virtual or real) by name?
 
|-
 
|-
  
 
|-
 
|-
| EXT_HXX || wxString ||
+
| wxString || GetFirstValidBuildTargetName || bool virtualsToo || Returns the first valid (virtual or real) build target
 
|-
 
|-
  
 
|-
 
|-
| EXT_OBJECT || wxString ||
+
| void || SetDefaultExecuteTarget || const wxString &name || Set the build target name which will be pre-selected when the "Select target" dialog appears when running the project
 
|-
 
|-
  
 
|-
 
|-
| EXT_XRCRESOURCE || wxString ||
+
| wxString || GetDefaultExecuteTarget || || Returns the name of the build target which will be pre-selected when the "Select target" dialog appears when running the project
 
|-
 
|-
  
 
|-
 
|-
| EXT_STATICLIB || wxString ||
+
| bool || SetActiveBuildTarget || const wxString &name || Set the active build target. If name does not exist, then the first virtual target is set or the first real target, depending which is valid.
 
|-
 
|-
  
 
|-
 
|-
| EXT_DYNAMICLIB || wxString ||
+
| wxString || GetActiveBuildTarget || || The active build target name. Note that this might be a virtual target ||
 
|-
 
|-
  
 
|-
 
|-
| EXT_EXECUTABLE || wxString ||
+
| int || SelectTarget || int initial, bool evenIfOne || Displays a target selection dialog. When invoked, a selection dialog is presented to the user so that he/she can select one target from the list of this project's targets.
 
|-
 
|-
  
 
|-
 
|-
| EXT_RESOURCE || wxString ||
+
| PCHMode || GetModeForPCH ||  ||
 
|-
 
|-
  
 
|-
 
|-
| EXT_RESOURCEBIN || wxString ||
+
| void || SetModeForPCH || PCHMode mode ||
 
|-
 
|-
  
 
|-
 
|-
| EXT_XML || wxString ||
+
| void || SetExtendedObjectNamesGeneration || bool ext || Sets object names generation to extended/normal mode. In normal mode (the default), the file foo.cpp generates the foo.o object file. In extended mode, the file foo.cpp generates the foo.cpp.o object file
 
|-
 
|-
  
 
|-
 
|-
| EXT_SCRIPT || wxString ||
+
| bool || GetExtendedObjectNamesGeneration || || Returns true for extended mode, false for normal mode
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''File extensions with leading dot (e.g. ".cbp")'''
+
| void || SetNotes || const wxString &notes || Set notes on the project
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_WORKSPACE || wxString ||
+
| wxString  || GetNotes || || Returns the notes on the project
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CODEBLOCKS || wxString ||
+
| void || SetShowNotesOnLoad || bool show || Set if to show project notes on load automatically
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_DEVCPP || wxString ||
+
| bool || GetShowNotesOnLoad || || Returns true if project notes would be shown automatically during load
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC6 || wxString ||
+
| void || ShowNotes || bool nonEmptyOnly, bool editable || Show project notes now
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC6_WORKSPACE || wxString ||
+
| void || AddToExtensions || wxString || Deprecated since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC7 || wxString ||
+
| wxArrayString || ExtensionListNodes || const wxString &extension || Returns a list of child nodes to the given extension node. The elements of the list could be passed as extension parameters to all the Extension* methods. Available since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC7_WORKSPACE || wxString ||
+
| wxArrayString || ExtensionListNodeAttributes || const wxString &extension || Returns a list of with the names of the attributes on the given extension node. Available since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_D || wxString ||
+
| wxString || ExtensionGetNodeAttribute || const wxString &extension, const wxString &attributeName || Returns the value of the given attribute on the given extension node. If the attribute is not found it will return an empty string. Available since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_F || wxString ||
+
| void || ExtensionSetNodeAttribute || const wxString &extension, const wxString &attributeName, const wxString &attributeValue || Set the value of the given attribute on the given extension node. Available since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_F77 || wxString ||
+
| void || ExtensionRemoveNodeAttribute || const wxString &extension, const wxString &attributeName || Remove the given attribute on the given extension node. Available since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_F95 || wxString ||
+
| wxString || ExtensionAddNode || const wxString &extension, const wxString &nodeName || Add a child node to the given extension node. Return the extension string for the new node. Available since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CPP || wxString ||
+
| void || ExtensionRemoveNode || const wxString &extension || Remove the given extension node. Available since rev 11857
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_C || wxString ||
+
| bool || DefineVirtualBuildTarget || const wxString &alias, const wxArrayString &targets || Define a new virtual build target. A virtual build target is not really a build target itself but it is an alias for a group of other build targets, real or virtual
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CC || wxString ||
+
| bool || HasVirtualBuildTarget|| const wxSring &alias || Does a virtual build target exist?
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CXX || wxString ||
+
| bool || RemoveVirtualBuildTarget|| const wxString &alias || Remove a virtual build target. Return true if removed
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_HPP || wxString ||
+
| wxArrayString || GetVirtualBuildTargets|| ||Get a list of all defined virtual build targets.
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_H || wxString ||
+
| wxArrayString || GetVirtualBuildTargetGroup || const wxString &alias || Access a virtual build target's group of build targets. Returns the list of all build targets under the alias
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_HH || wxString ||
+
| wxArrayString || GetExpandedVirtualBuildTargetGroup|| const wxString &alias || Access a virtual build target's expanded group of build targets. The difference from GetVirtualBuildTargetGroup() lies in that this function returns the full list of real build targets in this group (by recursively expanding virtual build targets in the group)
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_HXX || wxString ||
+
| bool || CanAddToVirtualBuildTarget || const wxSring &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.
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_OBJECT || wxString ||
+
| void || SetTitle || const wxString &title || Changes project title. This method overrides CompileTargetBase::SetTitle. It sends additional notification event to plugins and than calls base method.
 
|-
 
|-
 +
|}
  
|-
+
NOTE: Extension* methods take an extension parameter. This could be used to describe a way to access nodes in the extension xml element in the project file. The extension could be a path separated by '/' characters where every element of the path could be a node name, node name followed by an index or node name followed by attribute match.
| DOT_EXT_XRCRESOURCE || wxString ||
 
|-
 
  
|-
+
Examples:
| DOT_EXT_STATICLIB || wxString ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| DOT_EXT_DYNAMICLIB || wxString ||
+
|- style="background: #ececec; border: 0px solid gray"
|-
 
  
 
|-
 
|-
| DOT_EXT_EXECUTABLE || wxString ||
+
| _T("debugger") || Finds the first debugger node
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_RESOURCE || wxString ||
+
| _T("debugger/remote_debugging") || Finds the first child named 'remote_debugging' of the first 'debugger' node
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_RESOURCEBIN || wxString ||
+
| _T("debugger/remote_debugging[1]") || Finds the second child named 'remote_debugging' of the first 'debugger' node
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_XML || wxString ||
+
| _T("debugger/remote_debugging(target=Debug)") || Finds the first child named 'remote_debugging' which has an attribute named target and which has a value 'Debug'
 
|-
 
|-
 +
|}
  
|-
+
== EditorBase ==
| DOT_EXT_SCRIPT || wxString ||
+
 
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 +
|-
 +
 
 +
|-
 +
| wxString || GetFilename ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetFilename || wxString ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetShortName ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || GetModified ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetModified || bool ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetTitle ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetTitle || wxString ||
 +
|-
 +
 
 +
|-
 +
| void || Activate ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || Close ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || Save ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || IsBuiltinEditor ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || ThereAreOthers ||  ||
 +
|-
 +
 
 +
|-
 +
| void || GotoLine || int,bool ||
 +
|-
 +
 
 +
|-
 +
| void || ToggleBreakpoint || int,bool ||
 +
|-
 +
 
 +
|-
 +
| bool || HasBreakpoint || int ||
 +
|-
 +
 
 +
|-
 +
| void || GotoNextBreakpoint ||  ||
 +
|-
 +
 
 +
|-
 +
| void || GotoPreviousBreakpoint ||  ||
 +
|-
 +
 
 +
|-
 +
| void || ToggleBookmark || int,bool ||
 +
|-
 +
 
 +
|-
 +
| bool || HasBookmark || int ||
 +
|-
 +
 
 +
|-
 +
| void || GotoNextBookmark ||  ||
 +
|-
 +
 
 +
|-
 +
| void || GotoPreviousBookmark ||  ||
 +
|-
 +
 
 +
|-
 +
| void || Undo ||  ||
 +
|-
 +
 
 +
|-
 +
| void || Redo ||  ||
 +
|-
 +
 
 +
|-
 +
| void || Cut ||  ||
 +
|-
 +
 
 +
|-
 +
| void || Copy ||  ||
 +
|-
 +
 
 +
|-
 +
| void || Paste ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || CanUndo ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || CanRedo ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || CanPaste ||  ||
 +
|-
 +
 
 +
|-
 +
| bool || HasSelection ||  ||
 
|-
 
|-
  
 
|}
 
|}
 +
 +
 +
 +
== cbEditor ==
 +
Extends EditorBase.
 +
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 +
|-
 +
 +
|-
 +
| void || SetEditorTitle || wxString ||
 +
|-
 +
 +
|-
 +
| ProjectFile* || GetProjectFile ||  ||
 +
|-
 +
 +
|-
 +
| bool || Save ||  ||
 +
|-
 +
 +
|-
 +
| bool || SaveAs ||  ||
 +
|-
 +
 +
|-
 +
| void || FoldAll ||  ||
 +
|-
 +
 +
|-
 +
| void || UnfoldAll ||  ||
 +
|-
 +
 +
|-
 +
| void || ToggleAllFolds ||  ||
 +
|-
 +
 +
|-
 +
| void || FoldBlockFromLine || int ||
 +
|-
 +
 +
|-
 +
| void || UnfoldBlockFromLine || int ||
 +
|-
 +
 +
|-
 +
| void || ToggleFoldBlockFromLine || int ||
 +
|-
 +
 +
|-
 +
| int || GetLineIndentInSpaces || int ||
 +
|-
 +
 +
|-
 +
| wxString || GetLineIndentString || int ||
 +
|-
 +
 +
|-
 +
| void || Touch ||  ||
 +
|-
 +
 +
|-
 +
| bool || Reload || bool ||
 +
|-
 +
 +
|-
 +
| void || Print || bool,PrintColourMode,bool ||
 +
|-
 +
 +
|-
 +
| void || AutoComplete ||  ||
 +
|-
 +
 +
|-
 +
| bool || AddBreakpoint || int,bool ||
 +
|-
 +
 +
|-
 +
| bool || RemoveBreakpoint || int,bool ||
 +
|-
 +
 +
|-
 +
| void || SetText || wxString || this is not present in cbEditor; included to help scripts edit text
 +
|-
 +
 +
|-
 +
| wxString || GetText ||  || this is not present in cbEditor; included to help scripts edit text
 +
|-
 +
 +
|}
 +
 +
== Constants ==
 +
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
 +
|- style="background: #ececec; border: 0px solid gray"
 +
!Constant
 +
!Type
 +
!Remarks
 +
|-
 +
 +
|-
 +
| PLATFORM || int || this defines the platform Code::Blocks is currently running on. It is equal to only one of the following PLATFORM_* constants
 +
|-
 +
 +
|-
 +
| PLATFORM_MSW || int || All Windows platforms
 +
|-
 +
 +
|-
 +
| PLATFORM_GTK || int || All GTK platforms (Linux, BSD, Solaris, Darwin, etc