Difference between revisions of "Scripting commands"

From Code::Blocks
m (Fix naming and add constructor arguments for TinyXml binding)
 
(134 intermediate revisions by 12 users not shown)
Line 1: Line 1:
Scripting is no good if all you can do is use the scripting language's builtin commands only. The host application (Code::Blocks) needs to expose parts of its internals to scripts, so scripts can use and control the host.
+
[[Category:Scripting Code::Blocks]]
 +
Scripting is no good if all you can do is use the scripting language's built-in commands only. The host application (Code::Blocks) needs to expose parts of its internals to scripts, so scripts can use and control the host.
  
 
Code::Blocks has exposed a very large chunk of its SDK to scripts. This makes scripting in Code::Blocks nearly as powerful as native code (C++).
 
Code::Blocks has exposed a very large chunk of its SDK to scripts. This makes scripting in Code::Blocks nearly as powerful as native code (C++).
Line 6: Line 7:
  
  
''NOTE: please remember that [http://www.squirrel-lang.org Squirrel] is typeless. Data types mentioned below are only used for documentation purposes.''
+
''NOTE: Please remember that [http://www.squirrel-lang.org Squirrel] is typeless. Data types mentioned below are only used for documentation purposes.''
 +
 
 +
''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 ==
 +
The application object is accessed through the variable named '''<tt>App</tt>'''. Currently it has no bound functions...
 +
 
  
  
Line 20: Line 29:
  
 
|-
 
|-
| void || Log || wxString || logs to debug log
+
| void || Log || wxString || logs to the application log
 +
|-
 +
 
 +
|-
 +
| void || LogDebug || wxString || logs to the debug log
 
|-
 
|-
  
 
|-
 
|-
| int || Message || wxString,wxString,int ||
+
| void || LogWarning || wxString || logs a warning
 +
|-
 +
 
 +
|-
 +
| void || LogError || wxString || logs an error
 +
|-
 +
 
 +
|-
 +
| int || Message || wxString,wxString,int || arg1=msg, arg2=caption, arg3=buttons; see API docs for cbMessageBox()
 
|-
 
|-
  
Line 44: Line 65:
  
 
|-
 
|-
| wxString || ReplaceMacros || wxString,bool ||
+
| wxString || ReplaceMacros || wxString || Does [[Variable_expansion|variable expansion]] on the input wxString
 +
|-
 +
 
 +
|-
 +
| ScriptingManager* || GetScriptingManager ||  ||
 
|-
 
|-
  
Line 68: Line 93:
  
 
|-
 
|-
| bool || IsNull || void* ||
+
| wxArrayString || GetArrayFromString || wxString,wxString,bool ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || _T || const char* || basically this is the wxString constructor
+
| wxString || GetStringFromArray || wxArrayString,wxString,bool ||
 
|-
 
|-
  
|}
+
|-
 
+
| wxString || EscapeSpaces ||  wxString ||
== 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 ||
+
| wxString || UnixFilename || wxString, int || arg1=filename, arg2=wxPATH_NATIVE, wxPATH_WIN, ...
 
|-
 
|-
  
 
|-
 
|-
| bool || Read || bool,bool ||
+
| FileType || FileTypeOf || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| float || Read || float,float ||
+
| wxString || URLEncode || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || Read || wxString,wxString ||
+
| void || NotifyMissingFile || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| void || Write || int,int ||
+
| int || GetPlatformsFromString || wxString  ||
 
|-
 
|-
  
 
|-
 
|-
| void || Write || bool,bool ||
+
| wxString  || GetStringFromPlatforms || int,bool||
 
|-
 
|-
  
 
|-
 
|-
| void || Write || float,float ||
+
| void|| InfoWindow || wxString,wxString,int,int || pop-up box in the lower right, see infowindow.h
 
|-
 
|-
  
 
|-
 
|-
| void || Write || wxString,wxString[,bool] ||
+
| wxString || GetFolder || int || see API docs for ConfigManager::GetFolder()
 
|-
 
|-
  
|}
 
 
 
 
== ProjectManager ==
 
 
{| 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 || LocateDataFile|| wxString, int || see API docs for ConfigManager::LocateDataFile()
|-
 
| wxString || GetDefaultPath || ||
 
 
|-
 
|-
  
 
|-
 
|-
| void || SetDefaultPath || wxString ||
+
| bool || InstallPlugin || wxString,bool, bool || Install a binary plugin
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || GetActiveProject || ||
+
| int || ExecuteToolPlugin || wxString || Execute a tool plugin (found in Plugins menu)
 
|-
 
|-
  
 
|-
 
|-
| void || SetProject || cbProject* ||
+
| int || ConfigureToolPlugin || wxString || Configure a tool plugin (found in Plugins menu)
 
|-
 
|-
  
 
|-
 
|-
| bool || LoadWorkspace || wxString ||
+
| void || CallMenu || wxString || Call a menu entry describing its path using slashes (e.g. "/Valgrind/Run Valgrind::MemCheck")
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveWorkspace || ||
+
| void || Include || wxString || similar to C/C++ ''<tt>#include "name"</tt>''
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveWorkspaceAs || wxString ||
+
| int || Require || wxString ||arg=script_filename, return 0 if ok
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseWorkspace || ||
+
| bool || IsNull || void* ||
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || IsOpen || wxString ||
+
| bool || wxLaunchDefaultBrowser || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || LoadProject || wxString,bool ||
+
| wxColour || wxGetColourFromUser || [wxColour] ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveProject || cbProject* ||
+
| long || wxGetNumberFromUser || wxString,wxString,wxString ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveProjectAs || cbProject* ||
+
| wxString || wxGetPasswordFromUser || wxString,wxString,wxString ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActiveProject || ||
+
| wxString || wxGetTextFromUser || wxString,wxString,wxString ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActiveProjectAs || ||
+
| long || wxString_ToLong || wxString const ||
 
|-
 
|-
  
|-
+
|}
| bool || SaveAllProjects ||  ||
 
|-
 
  
|-
+
== ScriptingManager ==
| bool || CloseProject || cbProject*,bool,bool ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| bool || CloseActiveProject || bool ||
+
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseAllProjects || bool ||
+
| 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>;
 
|-
 
|-
  
|-
+
|}
| cbProject* || NewProject || wxString ||
 
|-
 
  
|-
+
Notes about the <tt>RegisterScriptMenu</tt> function:<br/>
| int || AddFileToProject || wxString,cbProject*,int ||
+
* 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]].
  
|-
 
| int || AskForBuildTargetIndex || cbProject* ||
 
|-
 
  
|-
 
| void || RebuildTree ||  ||
 
|-
 
  
|}
+
== ConfigManager ==
 
 
 
 
 
 
== EditorManager ==
 
  
 
{| 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 236: Line 231:
  
 
|-
 
|-
| void || Configure || ||
+
| int || Read || const wxString, int || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || New || wxString ||
+
| bool || Read || const wxString, bool || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || Open || wxString ||
+
| float || Read || const wxString, float || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || IsBuiltinOpen || wxString ||
+
| wxString || Read || const wxString, const wxString || arg1=key, arg2=default_val
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || GetBuiltinEditor || wxString|int ||
+
| void || Write || const wxString, int || arg1=key, arg2=value
 
|-
 
|-
  
 
|-
 
|-
| cbEditor* || GetBuiltinActiveEditor || ||
+
| void || Write || const wxString, bool || arg1=key, arg2=value
 
|-
 
|-
  
 
|-
 
|-
| EditorBase* || GetActiveEditor || ||
+
| void || Write || const wxString, float || arg1=key, arg2=value
 
|-
 
|-
  
 
|-
 
|-
| void || ActivateNext || ||
+
| void || Write || const wxString, const wxString, bool ||arg1=key, arg2=value, arg3=ignore_value_empty
 +
|-
 +
 
 +
|}
 +
 
 +
== 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
 
|-
 
|-
  
 
|-
 
|-
| void || ActivatePrevious || ||
+
| wxString || GetDefaultPath || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SwapActiveHeaderSource || ||
+
| void || SetDefaultPath || (const wxString& path) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseActive || bool ||
+
| cbProject* || GetActiveProject || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || Close || wxString|int,bool ||
+
| int || GetProjectCount || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || CloseAll || bool ||
+
| cbProject* || GetProject || (int) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || Save || wxString|int ||
+
| void || SetProject || (cbProject* project, bool refresh = true) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActive || ||
+
| bool || LoadWorkspace || (const wxString& filename = DEFAULT_WORKSPACE)||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAs || int ||
+
| bool || SaveWorkspace || ( )  ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveActiveAs || ||
+
| bool || SaveWorkspaceAs || (const wxString& filename) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAll || ||
+
| bool || CloseWorkspace || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| int || ShowFindDialog || bool,bool ||
+
| cbProject* || IsOpen || (const wxString& filename) ||  
 
|-
 
|-
  
|}
+
|-
 +
| cbProject* || LoadProject || (const wxString& filename, bool activateIt = true) ||
 +
|-
  
 +
|-
 +
| bool || SaveProject || (cbProject* project) ||
 +
|-
  
 +
|-
 +
| bool || SaveProjectAs || (cbProject* project) ||
 +
|-
  
== UserVariableManager ==
+
|-
 +
| bool || SaveActiveProject || ( ) ||
 +
|-
 +
 
 +
|-
 +
| bool || SaveActiveProjectAs || ( ) ||
 +
|-
  
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
+
|-
|- style="background: #ececec; border: 0px solid gray"
+
| bool || SaveAllProjects || ( ) ||
!Return value
 
!Name
 
!Arguments
 
!Remarks
 
 
|-
 
|-
  
 
|-
 
|-
| bool || Exists || wxString ||
+
| bool || CloseProject || (cbProject* project, bool dontsave = false, bool refresh = true) ||  
 
|-
 
|-
  
|}
+
|-
 +
| bool || CloseActiveProject || (bool dontsave = false) ||
 +
|-
  
 +
|-
 +
| bool || CloseAllProjects || (bool dontsave = false) ||
 +
|-
  
 +
|-
 +
| cbProject* || NewProject || (const wxString& filename = wxEmptyString) ||
 +
|-
  
== IO namespace ==
+
|-
 +
| int || AddFileToProject || (const wxString& filename, cbProject* project = 0L, int target = -1) ||
 +
|-
  
{| 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 || AskForBuildTargetIndex || (cbProject* project = 0L) ||
  
 
|-
 
|-
| bool || DirectoryExists || wxString ||
+
| void || RebuildTree || ( ) ||  
 
|-
 
|-
  
 
|-
 
|-
| wxString || SelectDirectory || wxString,wxString,bool ||
+
| bool || AddProjectDependency || (cbProject* base, cbProject* dependsOn) ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || FileExists || wxString ||
+
| void || RemoveProjectDependency || (cbProject* base, cbProject* doesNotDependOn) ||  
 
|-
 
|-
  
 
|-
 
|-
| wxString || SelectFile || wxString,wxString,wxString ||
+
| void || ClearProjectDependencies || (cbProject* base) ||  
 
|-
 
|-
  
|}
+
|-
 +
| void || RemoveProjectFromAllDependencies || (cbProject* base) ||
 +
|-
  
 +
|-
 +
| ProjectsArray* || GetDependenciesForProject || (cbProject* base) ||
 +
|-
  
 +
|-
 +
| void || ConfigureProjectDependencies || (cbProject* base = 0) ||
 +
|-
 +
|}
  
== CompilerFactory ==
+
== EditorManager ==
  
 
{| 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 369: Line 401:
 
!Return value
 
!Return value
 
!Name
 
!Name
!Arguments
+
!Arguments in Prototype
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| bool || IsValidCompilerID || wxString ||
+
| void || Configure || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| int || GetCompilerIndex || wxString ||
+
| cbEditor* || New || (const wxString& newFileName = wxEmptyString) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetDefaultCompilerID || ||
+
| cbEditor* || Open || (const wxString& filename) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CompilerInheritsFrom || ||
+
| cbEditor* || IsBuiltinOpen || (const wxString& filename) ||
|-
 
 
 
|}
 
 
 
== 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
 
 
|-
 
|-
  
 
|-
 
|-
| bool || operator+ || ||
+
| cbEditor* || GetBuiltinEditor || (const wxString& filename)|(int index) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || operator< || ||
+
| cbEditor* || GetBuiltinActiveEditor || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || operator<= || ||
+
| EditorBase* || GetActiveEditor || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || operator>= || ||
+
| void || ActivateNext || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || operator> || ||
+
| void || ActivatePrevious || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| int || Find || wxString ||
+
| bool || SwapActiveHeaderSource || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || Matches || wxString ||
+
| bool || CloseActive || (bool dontsave = false) ||
 
|-
 
|-
  
 
|-
 
|-
| void || AddChar || char ||
+
| bool || Close || (const wxString& filename,bool dontsave = false)|(int index,bool dontsave = false),(EditorBase* editor,bool dontsave = false) ||
 
|-
 
|-
  
 
|-
 
|-
| char || GetChar || int ||
+
| bool || CloseAll || (bool dontsave=false) ||
 
|-
 
|-
  
 
|-
 
|-
| bool || IsEmpty || ||
+
| bool || Save || (const wxString& filename)|(int index)||
 
|-
 
|-
  
 
|-
 
|-
| int || Length || ||
+
| bool || SaveActive || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| int || length || || same as Length()
+
| bool || SaveAs || (int index) ||
 
|-
 
|-
  
 
|-
 
|-
| int || len || || same as Length()
+
| bool || SaveActiveAs || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| int || size || || same as Length()
+
| bool || SaveAll || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || Lower ||  ||
+
| int || ShowFindDialog || (bool replace, bool explicitly_find_in_files = false) ||
 
|-
 
|-
  
 +
|}
 +
 +
== UserVariableManager ==
 +
 +
{| 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
 
|-
 
|-
| wxString || LowerCase || || same as Lower()
+
 
 +
|-
 +
| bool || Exists || (const wxString& variable) ||
 +
|-
 +
 
 +
|}
 +
 
 +
== IO namespace ==
 +
 
 +
{| 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
 
|-
 
|-
  
 
|-
 
|-
| void || MakeLower || ||
+
| bool || DirectoryExists || (const wxString& dir) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| wxString || Upper || ||
+
| wxString || SelectDirectory || (const wxString& message, const wxString& initialPath, bool showCreateDirButton) ||  
 
|-
 
|-
  
 
|-
 
|-
| wxString || UpperCase || || same as Upper()
+
| bool || '''CreateDirectory''' || (const wxString& full_path, int perms) || arg1=dir, arg2=permissions '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| void || MakeUpper || ||
+
| bool || '''RemoveDirectory''' || (const wxString& src) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| wxString || Mid || int,int ||
+
| bool || '''CopyFile''' ||(const wxString& src, const wxString& dst, bool overwrite) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| void || Remove || int,int ||
+
| bool || '''RenameFile''' || (const wxString& src, const wxString& dst) || old,new  '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveLast || ||
+
| bool || '''RemoveFile''' || (const wxString& src) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| int || Replace || wxString,wxString[,bool] ||
+
| bool || FileExists || (const wxString& file) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| wxString || Right || int ||
+
| wxString || SelectFile || (const wxString& title, const wxString& defaultFile, const wxString& filter) ||  
 
|-
 
|-
  
 
|-
 
|-
| wxString || AfterFirst || char ||
+
| wxString || ReadFileContents || (const wxString& filename) || '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| wxString || AfterLast || char ||
+
| bool || '''WriteFileContents''' || (const wxString& filename, const wxString& contents) || filename,contents '''1)'''
 
|-
 
|-
  
 
|-
 
|-
| wxString || BeforeFirst || char ||
+
| int || '''Execute''' || (const wxString& command) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || BeforeLast || char ||
+
| wxString || '''ExecuteAndGetOutput''' || (const wxString& command) ||
 
|-
 
|-
|}
 
  
 +
|-
 +
| wxString || '''ExecuteAndGetOutputAndError''' || (const wxString& command, bool prepend_error) ||if 'prepend_error' is true gives an error string
 +
|-
 +
 +
|-
 +
| wxString || GetCwd || ( )  ||
 +
|-
 +
 +
|-
 +
| void || SetCwd || (const wxString& dir) || directory (currently working directory)
 +
|-
 +
 +
|}
  
  
== wxArrayString ==
+
'''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.
 +
 
 +
'''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
 +
<source lang="c">
 +
IO.CopyFile(_T("$(TARGET_OUTPUT_FILE)"),_T("output_directory/output_file"),true);
 +
</source>
 +
 
 +
== 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 526: Line 592:
 
!Return value
 
!Return value
 
!Name
 
!Name
!Arguments
+
!Arguments in Prototype
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| void || Add || wxString ||
+
| bool || IsValidCompilerID || (const wxString& id) ||
 +
|-
 +
 
 +
|-
 +
| int || GetCompilerIndex || (const wxString& id) ||
 
|-
 
|-
  
 
|-
 
|-
| void || Clear ||  ||
+
| wxString || GetDefaultCompilerID || ( ) ||
 
|-
 
|-
  
 
|-
 
|-
| int || GetCount ||  ||
+
| wxString || GetCompilerVersionString ||  (const wxString& Id) ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || Item || int ||
+
| bool || CompilerInheritsFrom || ( ) ||
 
|-
 
|-
  
 +
|-
 +
| wxString || GetCompilerIDByName || (const wxString &name ) || Makes it possible to find the compiler id by its name. Available since rev 9823.
 +
|-
 
|}
 
|}
  
 
+
== wxString ==
 
 
== ProjectFile ==
 
  
 
{| 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 559: Line 630:
 
!Remarks
 
!Remarks
 
|-
 
|-
 +
  
 
|-
 
|-
| void || AddBuildTarget || wxString ||  
+
| wxString || _T || const char* || basically this is the wxString constructor
 
|-
 
|-
  
 
|-
 
|-
| void || RenameBuildTarget || wxString,wxString ||  
+
| wxString || _ || const char* || the same as _T, but should be used for translatable strings
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveBuildTarget || wxString ||  
+
| wxString || operator= || const wxString ||
 
|-
 
|-
 +
  
 
|-
 
|-
| wxString || GetBaseName || ||
+
| wxString || operator+ || const wxString ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetObjName || ||
+
| wxString || operator+ || const int ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetObjName || wxString ||  
+
| wxString || operator+= || const wxString ||
 
|-
 
|-
  
 
|-
 
|-
| cbProject* || GetParentProject || ||
+
| wxString || operator+= || const int ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || relativeFilename || || (variable)
+
| bool || operator< || const wxString || _T("abc") <  _T("cba") -> true
 
|-
 
|-
  
 
|-
 
|-
| wxString || relativeToCommonTopLevelPath || || (variable)
+
| bool || operator<= || const wxString ||
 
|-
 
|-
  
 
|-
 
|-
| bool || compile || || (variable)
+
| bool || operator>= || const wxString ||
 
|-
 
|-
  
 
|-
 
|-
| bool || link || || (variable)
+
| bool || operator> || const wxString  ||
 
|-
 
|-
  
 
|-
 
|-
| int || weight || || (variable)
+
| int || Find || wxString || -1 if not found
 
|-
 
|-
  
 
|-
 
|-
| wxString || compilerVar || || (variable)
+
| bool || Matches || wxString || not use '==' !!, returns true if the string contents matches a mask containing '*' and '?'
 
|-
 
|-
  
|}
+
|-
 
+
| void || AddChar || char ||
 
 
 
 
== 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
 
 
|-
 
|-
  
 
|-
 
|-
| void || SetLinkerOptions || wxArrayString ||
+
| char || GetChar || int || arg1=position
 
|-
 
|-
  
 
|-
 
|-
| void || SetLinkLibs || wxArrayString ||
+
| bool || IsEmpty || ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetCompilerOptions || wxArrayString ||
+
| int || Length || ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetIncludeDirs || wxArrayString ||
+
| int || length || || same as Length()
 
|-
 
|-
  
 
|-
 
|-
| void || SetResourceIncludeDirs || wxArrayString ||
+
| int || len || || same as Length()
 
|-
 
|-
  
 
|-
 
|-
| void || SetLibDirs || wxArrayString ||
+
| int || size || || same as Length()
 
|-
 
|-
  
 
|-
 
|-
| void || SetCommandsBeforeBuild || wxArrayString ||
+
| wxString || Lower || ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetCommandsAfterBuild || wxArrayString ||
+
| wxString || LowerCase || || same as Lower()
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetLinkerOptions ||  ||
+
| void || MakeLower ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetLinkLibs ||  ||
+
| wxString || Upper ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetCompilerOptions ||  ||
+
| wxString || UpperCase ||  || same as Upper()
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetIncludeDirs ||  ||
+
| void || MakeUpper ||  ||
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetResourceIncludeDirs || ||
+
| wxString || Mid || int, int || arg1=position, arg2=long
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetLibDirs || ||
+
| wxString || Remove || int, int || arg1=position, arg2=long
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetCommandsBeforeBuild ||  ||
+
| void || RemoveLast || int || remove the last characters
 
|-
 
|-
  
 
|-
 
|-
| wxArrayString || GetCommandsAfterBuild || ||
+
| int || Replace || wxString, wxString,bool || arg3=true -> all occurrences else the first
 
|-
 
|-
  
 
|-
 
|-
| bool || GetModified || ||
+
| wxString || Right || int x || return the x last characters
 
|-
 
|-
  
 
|-
 
|-
| void || SetModified || bool ||
+
| wxString || AfterFirst || char || not found -> _T("")
 
|-
 
|-
  
 
|-
 
|-
| void || AddLinkerOption || wxString ||
+
| wxString || AfterLast || char || not found -> all the character string
 
|-
 
|-
  
 
|-
 
|-
| void || AddLinkLib || wxString ||
+
| wxString || BeforeFirst || char || not found -> all the character string
 
|-
 
|-
  
 
|-
 
|-
| void || AddCompilerOption || wxString ||
+
| wxString || BeforeLast || char || not found -> _T("")
 
|-
 
|-
 +
|}
 +
''NOTE: Is instantiated in a script using: local my_wxstring = ::wxString();
  
|-
+
== wxArrayString ==
| void || AddIncludeDir || wxString ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| void || AddResourceIncludeDir || wxString ||
+
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| void || AddLibDir || wxString ||
+
| void || Add || wxString, size_t || arg1=string, arg2=number of copies to add
 
|-
 
|-
  
 
|-
 
|-
| void || AddCommandsBeforeBuild || wxString ||
+
| void || Clear || ||
 
|-
 
|-
  
 
|-
 
|-
| void || AddCommandsAfterBuild || wxString ||
+
| int || GetCount || ||
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveLinkerOption || wxString ||
+
| int || Index || wxString || -1 If not found
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveLinkLib || wxString ||
+
| wxString || Item || int || not work with wx 2.9.x ?!
 
|-
 
|-
  
|-
+
|}
| void || RemoveCompilerOption || wxString ||
+
''NOTE: Is instantiated in a script using: local my_wxarraystring = ::wxArrayString();
|-
 
  
|-
+
== wxColour ==
| void || RemoveIncludeDir || wxString ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| void || RemoveResourceIncludeDir || wxString ||
+
|- style="background: #ececec; border: 0px solid gray"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveLibDir || wxString ||
+
| byte || Red || ||
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveCommandsBeforeBuild || wxString ||
+
| byte || Green || ||
 
|-
 
|-
  
 
|-
 
|-
| void || RemoveCommandsAfterBuild || wxString ||
+
| byte || Blue || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || GetAlwaysRunPostBuildSteps || ||
+
| bool || IsOk || || ONLY if (wxVERSION_NUMBER < 2900)
 
|-
 
|-
  
 
|-
 
|-
| void || SetAlwaysRunPostBuildSteps || bool ||
+
| void || Set || byte, byte, byte, byte || red, green, blue, alpha : into [0..255]
 
|-
 
|-
  
|-
+
|}
| bool || SetVar || wxString,wxString,bool ||
+
''NOTE: Is instantiated in a script using: local my_wxcolour = ::wxColour();
|-
 
 
 
|-
 
| wxString || GetVar || wxString ||
 
|-
 
  
|-
+
''EXAMPLE: local my_wxcolour = ::wxColour(); my_wxcolour.Set(0xFF, 0x00, 0x00, 0x55); ::print(my_wxcolour) -> [r=255, g=0, b=0]
| bool || UnsetVar || wxString ||
 
|-
 
  
|-
+
== wxFileName ==  
| void || UnsetAllVars ||  ||
+
'''UNDER VERIFICATION'''
|-
 
 
 
|}
 
 
 
 
 
 
 
== CompileTargetBase ==
 
Extends CompileOptionsBase.
 
  
 
{| 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 798: Line 851:
 
!Name
 
!Name
 
!Arguments
 
!Arguments
!Remarks
+
!Remarks  
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetFilename || ||
+
| void || Assign || const wxFileName || creates the file name from an other wxFileName
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetTitle || ||
+
| void || Assign || const wxString, wxPathFormat || arg1=full_path, arg2=wformat=xPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| void || SetTitle || wxString ||
+
| void || AssignCwd || const wxString || arg1=volume
 
|-
 
|-
  
 
|-
 
|-
| void || SetOutputFilename || wxString ||
+
| void || AssignDir|| const wxString, wxPathFormat || arg1=name_dir, arg2=format=wxPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| void || SetWorkingDir || wxString ||
+
| void || AssignHomeDir || || sets this file name object to the home directory
 
|-
 
|-
  
 
|-
 
|-
| void || SetObjectOutput || wxString ||
+
| void || Clear || || reset all components to default, uninitialized state
 
|-
 
|-
  
 
|-
 
|-
| void || SetDepsOutput || wxString ||
+
| void || ClearExt || || removes the extension from the file name resulting in a file name with no trailing dot
 
|-
 
|-
  
 
|-
 
|-
| OptionsRelation || GetOptionRelation || OptionsRelationType ||
+
| int || GetDirCount || || returns the number of directories in the file name.
 
|-
 
|-
  
 
|-
 
|-
| void || SetOptionRelation || OptionsRelationType,OptionsRelation ||
+
| wxArrayString || GetDirs || || returns the directories in string array form
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetWorkingDir ||  ||
+
| wxString || GetExt ||  || returns the file name extension.
 +
 
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetObjectOutput ||  ||
+
| wxString || GetFullName ||  || returns the full name (including extension but excluding directories).
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetDepsOutput || ||
+
| wxString || GetFullPath || wxPathFormat || arg=format=wxPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetOutputFilename ||  ||
+
| wxString || GetLongPath ||  || return the long form of the path (returns identity on non-Windows platforms)
 +
 
 
|-
 
|-
  
 
|-
 
|-
| wxString || SuggestOutputFilename ||  ||
+
| wxString || GetName ||  || returns the name part of the filename (without extension)
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetExecutableFilename || ||
+
| wxString || GetPath || int, wxPathFormat || arg1=flags=wxPATH_GET_VOLUME..., arg2=format=wxPATH_NATIVE ...
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetDynamicLibFilename ||  ||
+
| wxString || GetShortPath ||  || return the short form of the path (returns identity on non-Windows platforms).
 +
 
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetDynamicLibDefFilename ||  ||
+
| wxString || GetVolume ||  || returns the string containing the volume for this file name
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetStaticLibFilename ||  ||
+
| bool || HasExt ||  || returns true if an extension is present.
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetBasePath ||  ||
+
| bool || HasName ||  || returns true if a name is present
 
|-
 
|-
  
 
|-
 
|-
| void || SetTargetType || TargetType ||
+
| bool || HasVolume || || returns true if a volume specifier is present
 
|-
 
|-
  
 
|-
 
|-
| TargetType || GetTargetType || ||
+
| void || InsertDir||int, const wxString || arg1=before_dir, arg2=name_dir
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetExecutionParameters || ||
+
| bool || IsAbsolute || wxPathFormat ||arg=format=wxPATH_NATIVE...
 
|-
 
|-
  
 
|-
 
|-
| void || SetExecutionParameters || wxString ||
+
| bool || IsOk || || returns true if the filename is valid
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetHostApplication || ||
+
| bool || IsRelative || wxPathFormat ||arg=format=wxPATH_NATIVE...
 
|-
 
|-
  
 
|-
 
|-
| void || SetHostApplication || wxString ||
+
| bool || IsDir || || returns true if this object represents a directory
 
|-
 
|-
  
 
|-
 
|-
| void || SetCompilerID || wxString ||
+
| bool || MakeAbsolute ||const wxString, wxPathFormat|| arg1=cwd=_T("") or ..., arg2=format=wxPATH_NATIVE or ...
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetCompilerID || ||
+
| bool || MakeRelativeTo ||const wxString, wxPathFormat|| arg1=path_base, arg2=format=wxPATH_NATIVE or ...
 
|-
 
|-
  
|}
 
 
 
 
== ProjectBuildTarget ==
 
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
 
 
|-
 
|-
 +
| bool || Normalize ||int, const wxString, wxPathFormat||arg1=flags=wxPATH_NORM_ALL, arg2=cwd=_T(""),arg3=format=wxPATH_NATIVE or ...
 +
|
  
 
|-
 
|-
| cbProject* || GetParentProject || ||
+
| void || PrependDir || const wxString ||arg=dir
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetFullTitle || ||
+
| void || RemoveDir || int ||arg=pos RemoveLastDir
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetExternalDeps || ||
+
| void || RemoveLastDir || || removes last directory component from the path
 
|-
 
|-
  
 
|-
 
|-
| void || SetExternalDeps || wxString ||
+
| bool || SameAs || const wxFileName, wxPathFormat || arg1=filepath, arg2=format=wxPATH_NATIVE
 
|-
 
|-
  
 
|-
 
|-
| void || SetAdditionalOutputFiles || wxString ||
+
| bool || SetCwd|| || changes the current working directory
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetAdditionalOutputFiles || ||
+
| void || SetExt ||const wxString ||arg=extension
 
|-
 
|-
  
 
|-
 
|-
| bool || GetIncludeInTargetAll ||  ||
+
| void || SetEmptyExt ||  || sets the extension of the file name to be an empty extension
 
|-
 
|-
  
 
|-
 
|-
| void || SetIncludeInTargetAll || bool ||
+
| void || SetFullName || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| bool || GetCreateDefFile || ||
+
| void || SetName || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetCreateDefFile || bool ||
+
| void || SetVolume || wxString ||
 
|-
 
|-
  
|-
+
|}
| bool || GetCreateStaticLib ||  ||
+
''NOTE: Is instantiated in a script using: local my_filename = ::wxFileName()
|-
 
  
|-
+
== wxPoint ==
| void || SetCreateStaticLib || bool ||
+
'''UNDER CONSTRUCTION'''
|-
 
  
|-
+
'' Instantiate integer points 2D
| bool || GetUseConsoleRunner ||  ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| void || SetUseConsoleRunner || bool ||
+
|- style="background: #ececec; border: 0px solid gray"
|-
 
 
 
|}
 
 
 
 
 
 
 
== 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
 
!Return value
 
!Name
 
!Name
 
!Arguments
 
!Arguments
 
!Remarks
 
!Remarks
|-
+
|-  
  
 
|-
 
|-
| bool || GetModified || ||
+
| wxPoint || operator= || const wxPoint|| default assignment operator is ok
 
|-
 
|-
  
 
|-
 
|-
| void || SetModified || bool ||
+
| bool || operator== ||const wxPoint||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetMakefile || ||
+
| bool || operator!= || const wxPoint||
 
|-
 
|-
  
 
|-
 
|-
| void || SetMakefile || wxString ||
+
| int || x || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || IsMakefileCustom || ||
+
| int || y || ||
 
|-
 
|-
  
|-
+
|}
| void || SetMakefileCustom || bool ||
+
''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'''
  
|-
+
'' Instantiate integers values (X, Y)
| bool || CloseAllFiles || bool ||
 
|-
 
  
|-
+
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
| bool || SaveAllFiles ||  ||
+
|- style="background: #ececec; border: 0px solid gray"
|-
+
!Return value
 +
!Name
 +
!Arguments
 +
!Remarks
 +
|-  
  
 
|-
 
|-
| bool || Save || ||
+
| wxSize || operator= || const wwSize|| default assignment operator is ok
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveLayout || ||
+
| bool || operator== ||const wxSize||
 
|-
 
|-
  
 
|-
 
|-
| bool || LoadLayout || ||
+
| bool || operator!= || const wxSize||
 
|-
 
|-
  
 
|-
 
|-
| bool || ShowOptions || ||
+
| int || GetWidth || || return X
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetCommonTopLevelPath || ||
+
| int || GetHeight || || return Y
 
|-
 
|-
  
 
|-
 
|-
| int || GetFilesCount || ||
+
| void || SetWidth || int w|| X=w
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || GetFile || int ||
+
| void || SetHeight || int h|| Y=h
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || GetFileByFilename || wxString,bool,bool ||
+
| void || Set || int w, int h|| X=w, Y=h
 +
|-
 +
 
 +
 
 +
|}
 +
''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 ==
 +
 
 +
{| 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
 +
|-
 +
 
 +
|-
 +
| void || AddBuildTarget || const wxString& targetName ||
 +
|-
 +
 
 +
|-
 +
| void || RenameBuildTarget || const wxString& oldTargetName, const wxString& newTargetName ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveBuildTarget || const wxString& targetName ||  
 
|-
 
|-
  
 
|-
 
|-
| bool || RemoveFile || int ||
+
| const wxArrayString& || GetBuildTargets || ||
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || AddFile || wxString|int,wxString,bool,bool,int ||
+
| wxString || GetBaseName || ||
 
|-
 
|-
  
 
|-
 
|-
| int || GetBuildTargetsCount || ||
+
| wxString || GetObjName || ||
 
|-
 
|-
  
 
|-
 
|-
| ProjectBuildTarget* || GetBuildTarget || wxString|int ||
+
| void || SetObjName || const wxString& targetName ||  
 
|-
 
|-
  
 
|-
 
|-
| ProjectBuildTarget* || AddBuildTarget || wxString ||
+
| cbProject* || GetParentProject || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || RenameBuildTarget || wxString|int,wxString ||
+
| wxString|| GetCustomBuildCommand|| const wxString& compilerId ||
 
|-
 
|-
  
 
|-
 
|-
| ProjectBuildTarget* || DuplicateBuildTarget || wxString|int,wxString ||
+
| void  || SetCustomBuildCommand || const wxString& compilerId, const wxString& newBuildCommand ||
 
|-
 
|-
  
 
|-
 
|-
| bool || RemoveBuildTarget || wxString|int ||
+
| bool || GetUseCustomBuildCommand|| const wxString& compilerId ||
 
|-
 
|-
  
 
|-
 
|-
| bool || ExportTargetAsProject || wxString|int ||
+
| void  || SetUseCustomBuildCommand || const wxString& compilerId, bool useCustomBuildCommand ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetActiveBuildTarget || int ||
+
| wxFileName || file || || (variable)
 
|-
 
|-
  
 
|-
 
|-
| int || GetActiveBuildTarget ||  ||
+
| wxString || relativeFilename ||  || (variable)
 
|-
 
|-
  
 
|-
 
|-
| int || SelectTarget || int,bool ||
+
| wxString || relativeToCommonTopLevelPath || || (variable)
 
|-
 
|-
  
 
|-
 
|-
| ProjectBuildTarget* || GetCurrentlyCompilingTarget ||  ||
+
| bool || compile ||  || (variable)
 
|-
 
|-
  
 
|-
 
|-
| void || SetCurrentlyCompilingTarget || ProjectBuildTarget* ||
+
| bool || link || || (variable)
 
|-
 
|-
  
 
|-
 
|-
| PCHMode || GetModeForPCH ||  ||
+
| int || weight ||  || (variable)
 +
|-
 +
 
 +
|-
 +
| wxString || compilerVar ||  || (variable)
 
|-
 
|-
  
 
|-
 
|-
| void || SetModeForPCH || PCHMode ||
+
| wxArrayString || buildTargets || || (variable)
 
|-
 
|-
  
 
|}
 
|}
  
== EditorBase ==
+
== CompileOptionsBase ==
  
 
{| 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,131: Line 1,199:
 
!Return value
 
!Return value
 
!Name
 
!Name
!Arguments
+
!Arguments in Prototype
 
!Remarks
 
!Remarks
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetFilename || ||
+
| void || AddPlatform || int platform || windows,unix,mac
 
|-
 
|-
  
 
|-
 
|-
| void || SetFilename || wxString ||
+
| void || RemovePlatform || int platform ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetShortName || ||
+
| void || SetPlatforms || int platform ||
 
|-
 
|-
  
 
|-
 
|-
| bool || GetModified || ||
+
| int || GetPlatforms || ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetModified || bool ||
+
| bool || SupportsCurrentPlatform || ||
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetTitle || ||
+
| void || SetLinkerOptions || const wxArrayString& linkerOpts ||
 
|-
 
|-
  
 
|-
 
|-
| void || SetTitle || wxString ||
+
| void || SetLinkLibs || const wxArrayString& linkLibs ||
 
|-
 
|-
  
 
|-
 
|-
| void || Activate || ||
+
| void || SetLinkerExecutable || LinkerExecutableOption option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || Close || ||
+
| LinkerExecutableOption || GetLinkerExecutable || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || Save || ||
+
| void || SetCompilerOptions || const wxArrayString& compilerOpts ||
 
|-
 
|-
  
 
|-
 
|-
| bool || IsBuiltinEditor || ||
+
| void || SetResourceCompilerOptions || const wxArrayString& resourceCompilerOpts ||
 
|-
 
|-
  
 
|-
 
|-
| bool || ThereAreOthers || ||
+
| void || SetIncludeDirs || const wxArrayString& includeDirs ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoLine || int,bool ||
+
| void || SetResourceIncludeDirs || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleBreakpoint || int,bool ||
+
| void || SetLibDirs || const wxArrayString& libDirs ||
 
|-
 
|-
  
 
|-
 
|-
| bool || HasBreakpoint || int ||
+
| void || SetCommandsBeforeBuild || const wxArrayString& commands ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoNextBreakpoint || ||
+
| void || SetCommandsAfterBuild || const wxArrayString& commands ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoPreviousBreakpoint ||  ||
+
| wxArrayString || GetLinkerOptions ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleBookmark || int,bool ||
+
| wxArrayString || GetLinkLibs || ||
 
|-
 
|-
  
 
|-
 
|-
| bool || HasBookmark || int ||
+
| wxArrayString || GetCompilerOptions || ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoNextBookmark ||  ||
+
| wxArrayString || GetResourceCompilerOptions ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || GotoPreviousBookmark ||  ||
+
| wxArrayString || GetIncludeDirs ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || Undo ||  ||
+
| wxArrayString || GetResourceIncludeDirs ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || Redo ||  ||
+
| wxArrayString || GetLibDirs ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || Cut ||  ||
+
| wxArrayString || GetCommandsBeforeBuild ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || Copy ||  ||
+
| wxArrayString || GetCommandsAfterBuild ||  ||
 
|-
 
|-
  
 
|-
 
|-
| void || Paste ||  ||
+
| bool || GetModified ||  ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CanUndo || ||
+
| void || SetModified || bool modified ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CanRedo || ||
+
| void || AddLinkerOption || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || CanPaste || ||
+
| void || AddLinkLib || const wxString& lib ||
 
|-
 
|-
  
 
|-
 
|-
| bool || HasSelection || ||
+
| void || AddCompilerOption || const wxString& option ||
 
|-
 
|-
  
|}
+
|-
 
+
| void || AddResourceCompilerOption || const wxString& 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 || AddIncludeDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| ProjectFile* || GetProjectFile || ||
+
| void || AddResourceIncludeDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| bool || SaveAs || ||
+
| void || AddLibDir || const wxString& option ||
 
|-
 
|-
  
 
|-
 
|-
| void || FoldAll || ||
+
| void || AddCommandsBeforeBuild || const wxString& command ||
 
|-
 
|-
  
 
|-
 
|-
| void || UnfoldAll || ||
+
| void || AddCommandsAfterBuild || const wxString& command ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleAllFolds || ||
+
| void || ReplaceLinkerOption || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
 
|-
 
|-
| void || FoldBlockFromLine || int ||
+
| void || ReplaceLinkLib || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
 
|-
 
|-
| void || UnfoldBlockFromLine || int ||
+
| void || ReplaceCompilerOption || const wxString& option, const wxString& new_option ||
 
|-
 
|-
  
 
|-
 
|-
| void || ToggleFoldBlockFromLine || int ||
+
| void || ReplaceResourceCompilerOption || const wxString& option, const wxString& new_option ||
|-
+
|-
 
+
 
|-
+
|-
| int || GetLineIndentInSpaces || int ||
+
| void || ReplaceIncludeDir || const wxString& option, const wxString& new_option ||
|-
+
|-
 
+
 
|-
+
|-
| wxString || GetLineIndentString || int ||
+
| void || ReplaceResourceIncludeDir || const wxString& option, const wxString& new_option ||
 +
|-
 +
 
 +
|-
 +
| void || ReplaceLibDir || const wxString& option, const wxString& new_option ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveLinkerOption || const wxString& option ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveLinkLib || const wxString& lib ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveCompilerOption || const wxString& option ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveIncludeDir || const wxString& option ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveResourceCompilerOption || const wxString& option ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveResourceIncludeDir || const wxString& option ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveLibDir || const wxString& option ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveCommandsBeforeBuild || const wxString& command ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveCommandsAfterBuild || const wxString& command ||
 +
|-
 +
 
 +
|-
 +
| bool || GetAlwaysRunPostBuildSteps ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetAlwaysRunPostBuildSteps || bool always ||
 +
|-
 +
 
 +
|-
 +
| void || SetBuildScripts || const wxArrayString& scripts ||
 +
|-
 +
 
 +
|-
 +
| wxArrayString || GetBuildScripts || ||
 +
|-
 +
 
 +
|-
 +
| void || AddBuildScript || const wxString& script ||
 +
|-
 +
 
 +
|-
 +
| void || RemoveBuildScript || const wxString& script ||
 +
|-
 +
 
 +
|-
 +
| bool || SetVar || const wxString& key, const wxString& value, bool onlyIfExists = false ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetVar || const wxString& key ||
 +
|-
 +
 
 +
|-
 +
| bool || UnsetVar || const wxString& key ||
 +
|-
 +
 
 +
|-
 +
| void || UnsetAllVars || ||
 +
|-
 +
 
 +
|}
 +
 
 +
== 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
 +
|-
 +
 
 +
|-
 +
| 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.
 +
|-
 +
 
 +
|-
 +
| wxString || GetFilename ||  || The full project name (*.cbp)
 +
|-
 +
 
 +
|-
 +
| wxString || GetTitle ||  || Target name
 +
|-
 +
 
 +
|-
 +
| void || SetTitle || wxString title||
 +
|-
 +
 
 +
|-
 +
| void || SetOutputFilename || wxString filename||
 +
|-
 +
 
 +
|-
 +
| void || SetWorkingDir || wxString dirname||
 +
|-
 +
 
 +
|-
 +
| void || SetObjectOutput || wxString dirname||
 +
|-
 +
 
 +
|-
 +
| void || SetDepsOutput || wxString dirname||
 +
|-
 +
 
 +
|-
 +
| OptionsRelation || GetOptionRelation || OptionsRelationType type||
 +
|-
 +
 
 +
|-
 +
| void || SetOptionRelation || OptionsRelationType type, OptionsRelation rel ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetWorkingDir ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetObjectOutput ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetDepsOutput ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetOutputFilename ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || SuggestOutputFilename ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetExecutableFilename ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetDynamicLibFilename ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetDynamicLibDefFilename ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetStaticLibFilename ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetBasePath ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetTargetType || TargetType pt||
 +
|-
 +
 
 +
|-
 +
| TargetType || GetTargetType ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetExecutionParameters ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetExecutionParameters || wxString params||
 +
|-
 +
 
 +
|-
 +
| wxString || GetHostApplication ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetHostApplication || wxString app||
 +
|-
 +
 
 +
|-
 +
| void || SetCompilerID || wxString id||
 +
|-
 +
 
 +
|-
 +
| wxString || GetCompilerID ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetMakeCommandFor || MakeCommand cmd ||
 +
|-
 +
 
 +
|-
 +
| void || SetMakeCommandFor || MakeCommand cmd, wxString make ||
 +
|-
 +
 
 +
|-
 +
| bool || MakeCommandsModified ||  ||
 +
|-
 +
 
 +
|}
 +
 
 +
== ProjectBuildTarget ==
 +
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
 +
|-
 +
 
 +
|-
 +
| cbProject* || GetParentProject ||  ||
 +
|-
 +
 
 +
|-
 +
| wxString || GetFullTitle ||  ||The full title, i.e. "projectname - targetname"
 +
|-
 +
 
 +
|-
 +
| wxString || GetExternalDeps ||  ||Returns a list of files whose target depends (separated by ';')
 +
|-
 +
 
 +
|-
 +
| void || SetExternalDeps || wxString deps||Sets the list of files whose target depends (separated by ';')
 +
|-
 +
 
 +
|-
 +
| void || SetAdditionalOutputFiles || wxString files||Sets the list of additional output files (separated by ';')
 +
|-
 +
 
 +
|-
 +
| wxString || GetAdditionalOutputFiles ||  ||Returns a list of additional output files (separated by ';')
 +
|-
 +
 
 +
|-
 +
| bool || GetIncludeInTargetAll ||  || Deprecated, do not use at 'All'
 +
|-
 +
 
 +
|-
 +
| void || SetIncludeInTargetAll || bool || Deprecated, do not use at 'All'
 +
|-
 +
 
 +
|-
 +
| bool || GetCreateDefFile ||  || True if the target creates a DEF imports file. (valid for dynamic library targets only)
 +
|-
 +
 
 +
|-
 +
| void || SetCreateDefFile || bool createIt|| Set if the target creates a DEF imports file
 +
|-
 +
 
 +
|-
 +
| bool || GetCreateStaticLib ||  || Return true if an import library will be created, false if not (valid for dynamic library targets only)
 +
|-
 +
 
 +
|-
 +
| void || SetCreateStaticLib || bool ||Set if an import library should be created (valid for dynamic library targets only)
 +
|-
 +
 
 +
|-
 +
| bool || GetUseConsoleRunner ||  || Valid only for targets generating a console executable
 +
|-
 +
 
 +
|-
 +
| void || SetUseConsoleRunner || bool useIt||Valid only for targets generating a console executable
 +
|-
 +
 
 +
|-
 +
| ProjectFile* || GetFile || int index|| Returns a file from the target
 +
|-
 +
 
 +
|-
 +
| int || GetFilesCount ||  || Returns number of files for the target
 +
|-
 +
 
 +
|}
 +
 
 +
== 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
 +
|-
 +
 
 +
|-
 +
| bool || GetModified ||  || Return true if the project is modified in any way
 +
|-
 +
 
 +
|-
 +
| void || SetModified || bool modified|| Mark the project as modified or not
 +
|-
 +
 
 +
|-
 +
| wxString || GetMakefile ||  || Returns file name for the Makefile
 +
|-
 +
 
 +
|-
 +
| void || SetMakefile || wxString makefile || Set Makefile name when using a custom Makefile to build the project
 +
|-
 +
 
 +
|-
 +
| bool || IsMakefileCustom ||  || True if the project is using a custom Makefile for compilation, false if not
 +
|-
 +
 
 +
|-
 +
| void || SetMakefileCustom || bool custom || Mark if the project should use a custom Makefile for compilation
 +
|-
 +
 
 +
|-
 +
| bool || CloseAllFiles || bool dontsave || Close all project files. If dontsave is true no file would be saved even if modified
 +
|-
 +
 
 +
|-
 +
| bool || SaveAllFiles ||  || Save all project files
 +
|-
 +
 
 +
|-
 +
| bool || Save ||  || Save the project
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| bool || LoadLayout ||  || Load the project's layout
 +
|-
 +
 
 +
|-
 +
| wxString || GetCommonTopLevelPath ||  || Returns the top-level path common to all project files
 +
|-
 +
 
 +
|-
 +
| int || GetFilesCount ||  || Returns number of files in the project
 +
|-
 +
 
 +
|-
 +
| ProjectFile* || GetFile || int index || Access a file of the project. Index is between 0 and GetFilesCount()
 +
|-
 +
 
 +
|-
 +
| ProjectFile* || GetFileByFilename || wxString filename, bool isRelative, bool isUnixFilename || Access a file of the project.
 +
|-
 +
 
 +
|-
 +
| bool || RemoveFile || ProjectFile *file || Remove a file from the project
 +
|-
 +
 
 +
|-
 +
| ProjectFile* || AddFile || const wxString &targetName, const wxString &fileaname, bool compile, bool link, int weight || See API docs for cbProject::AddFile
 +
|-
 +
 
 +
|-
 +
| ProjectFile* || AddFile || int targetIndex, const wxString &fileaname, bool compile, bool link, int weight || See API docs for cbProject::AddFile
 +
|-
 +
 
 +
|-
 +
| int || GetBuildTargetsCount ||  || Returns the number of targets
 +
|-
 +
 
 +
|-
 +
| ProjectBuildTarget* || GetBuildTarget || int index|| Access a build target by index. Index is from 0 to GetBuildTargetsCount
 +
|-
 +
 
 +
|-
 +
| ProjectBuildTarget* || GetBuildTarget || const wxString &targetName || Access a build target by name
 +
|-
 +
 
 +
|-
 +
| ProjectBuildTarget* || AddBuildTarget || cont wxString &targetName || Add a new build target
 +
|-
 +
 
 +
|-
 +
| bool || RenameBuildTarget || int index, const wxString &targetName || Rename a build target
 +
|-
 +
 
 +
|-
 +
| bool || RenameBuildTarget || const wxString &oldTargetName, const wxString &newTargetName || Rename a build target
 +
|-
 +
 
 +
|-
 +
| ProjectBuildTarget* || DuplicateBuildTarget || int index, const wxString &newName || Duplicate a build target
 +
|-
 +
 
 +
|-
 +
| ProjectBuildTarget* || DuplicateBuildTarget || const wxString &targetName, const wxString &newName || Duplicate a build target
 +
|-
 +
 
 +
|-
 +
| bool || RemoveBuildTarget || int index || Remove a build target
 +
|-
 +
 
 +
|-
 +
| bool || RemoveBuildTarget || const wxString &targetName || Remove a build target
 +
|-
 +
 
 +
|-
 +
| 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.
 +
|-
 +
 
 +
|-
 +
| bool || ExportTargetAsProject || wxString targetName || Export a target as new project
 +
|-
 +
 
 +
|-
 +
| bool || BuildTargetValid || const wxString &name, bool virtualsToo || Is there a build target (virtual or real) by name?
 +
|-
 +
 
 +
|-
 +
| wxString || GetFirstValidBuildTargetName || bool virtualsToo || Returns the first valid (virtual or real) build target
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| wxString || GetDefaultExecuteTarget || || Returns the name of the build target which will be pre-selected when the "Select target" dialog appears when running the project
 +
|-
 +
 
 +
|-
 +
| 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.
 +
|-
 +
 
 +
|-
 +
| wxString || GetActiveBuildTarget || || The active build target name. Note that this might be a virtual target ||
 +
|-
 +
 
 +
|-
 +
| 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.
 +
|-
 +
 
 +
|-
 +
| PCHMode || GetModeForPCH ||  ||
 +
|-
 +
 
 +
|-
 +
| void || SetModeForPCH || PCHMode mode ||
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| bool || GetExtendedObjectNamesGeneration || || Returns true for extended mode, false for normal mode
 +
|-
 +
 
 +
|-
 +
| void || SetNotes || const wxString &notes || Set notes on the project
 +
|-
 +
 
 +
|-
 +
| wxString  || GetNotes || || Returns the notes on the project
 +
|-
 +
 
 +
|-
 +
| void || SetShowNotesOnLoad || bool show || Set if to show project notes on load automatically
 +
|-
 +
 
 +
|-
 +
| bool ||  GetShowNotesOnLoad || || Returns true if project notes would be shown automatically during load
 +
|-
 +
 
 +
|-
 +
| void || ShowNotes || bool nonEmptyOnly, bool editable || Show project notes now
 +
|-
 +
 
 +
|-
 +
| void || AddToExtensions || wxString || Deprecated since rev 11857
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| wxArrayString || ExtensionListNodeAttributes || const wxString &extension || Returns a list of with the names of the attributes on the given extension node. Available since rev 11857
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| void || ExtensionRemoveNodeAttribute || const wxString &extension, const wxString &attributeName || Remove the given attribute on the given extension node. Available since rev 11857
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| void || ExtensionRemoveNode || const wxString &extension || Remove the given extension node. Available since rev 11857
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| bool || HasVirtualBuildTarget|| const wxSring &alias || Does a virtual build target exist?
 +
|-
 +
 
 +
|-
 +
| bool || RemoveVirtualBuildTarget|| const wxString &alias || Remove a virtual build target. Return true if removed
 +
|-
 +
 
 +
|-
 +
| wxArrayString || GetVirtualBuildTargets|| ||Get a list of all defined virtual build targets.
 +
|-
 +
 
 +
|-
 +
| 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
 +
|-
 +
 
 +
|-
 +
| 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)
 +
|-
 +
 
 +
|-
 +
| 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.
 +
|-
 +
 
 +
|-
 +
| 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.
 +
 
 +
Examples:
 +
 
 +
{| border="1" cellpadding="3" cellspacing="0" style="border: 1px solid gray; border-collapse: collapse;"
 +
|- style="background: #ececec; border: 0px solid gray"
 +
 
 +
|-
 +
| _T("debugger") || Finds the first debugger node
 +
|-
 +
 
 +
|-
 +
| _T("debugger/remote_debugging") || Finds the first child named 'remote_debugging' of the first 'debugger' node
 +
|-
 +
 
 +
|-
 +
| _T("debugger/remote_debugging[1]") || Finds the second child named 'remote_debugging' of the first 'debugger' node
 +
|-
 +
 
 +
|-
 +
| _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 ==
 +
 
 +
{| 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
 +
|-
 +
 
 +
|}
 +
 
 +
== TiXML Binding==
 +
This describes the squirrel interface to read XML files. The base is the TinyXML library and for detailed function description, please refere to the official [https://www.grinninglizard.com/tinyxmldocs/index.html TinyXML documentation]. If a function from this section takes string as Argument it can take wxString or squirrel native strings. If a function returns a string it returns squirrel native strings.
 +
 
 +
Argument annotation: if multiple types are accepted they are separated with | . For example if a function takes an empty, string or int parameter for the first argument and a string for the second this is described as <syntaxhighlight lang="text">
 +
(void | string | int, string)
 +
</syntaxhighlight>
 +
 
 +
===TiXMLPrinter ===
 +
{| class="wikitable"
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remark
 +
|-
 +
|string
 +
|CStr
 +
|
 +
|Return the XML as string
 +
|-
 +
|void
 +
|SetIndent
 +
|string
 +
|Set indentation string
 +
|-
 +
|void
 +
|SetLineBreak
 +
|string
 +
| Set line break type
 +
|}
 +
 
 +
===TiXMLNode===
 +
{| class="wikitable"
 +
|+
 +
!Return value
 +
!Name
 +
!Arguments
 +
! Remark
 +
|-
 +
|string
 +
|Value
 +
|
 +
|
 +
|-
 +
|void
 +
|SetValue
 +
|string
 +
|
 +
|}
 +
 
 +
===TiXmlDocument ===
 +
{| class="wikitable"
 +
|+
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remark
 +
|-
 +
|TiXmlDocument
 +
|constructor
 +
|<nowiki>void | string</nowiki>
 +
|
 +
|-
 +
|bool
 +
|SaveFile
 +
|
 +
|
 +
|-
 +
|bool
 +
|SaveFile
 +
|string
 +
|
 +
|-
 +
|bool
 +
|LoadFile
 +
|<nowiki>void | string</nowiki>
 +
|
 +
|-
 +
|string
 +
|Parse
 +
|string
 +
|
 +
|-
 +
|TiXmlElement
 +
| RootElement
 +
|
 +
|
 +
|-
 +
|bool
 +
|Error
 +
|
 +
|
 +
|-
 +
|string
 +
|ErrorDesc
 +
|
 +
|
 +
|-
 +
|bool
 +
|Accept
 +
|TiXMLPringer
 +
|
 +
|}
 +
 
 +
=== TiXmlElement===
 +
{| class="wikitable"
 +
|+
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remark
 +
|-
 +
|TiXmlElement
 +
|constructor
 +
|string, TiXmlElement
 +
|
 +
|-
 +
|string
 +
|Attribute
 +
|string
 +
|
 +
|-
 +
|TiXMLAttribute
 +
|GetAttribute
 +
|string
 +
|
 +
|-
 +
|TiXMLAttribute
 +
| FirstAttribute
 +
|
 +
|
 +
|-
 +
| TiXMLAttribute
 +
| LastAttribute
 +
|
 +
|
 +
|-
 +
|void
 +
|RemoveAttribute
 +
|string
 +
|
 +
|-
 +
|void
 +
|SetAttribute
 +
|<nowiki>(string, string | int | float)</nowiki>
 +
|
 +
|-
 +
|TiXmlElement
 +
|FirstChildElement
 +
|<nowiki>(void | string)</nowiki>
 +
|
 +
|-
 +
| TiXMLNode
 +
|LastChild
 +
|<nowiki>(void | string)</nowiki>
 +
|
 +
|-
 +
|TiXmlElement
 +
|LastChildElement
 +
|<nowiki>(void | string)</nowiki>
 +
|
 +
|-
 +
|TiXmlElement
 +
|NextSiblingElement
 +
|<nowiki>(void | string)</nowiki>
 +
|
 +
|-
 +
| TiXMLNode
 +
|PreviousSibling
 +
|<nowiki>(void | string)</nowiki>
 +
|
 +
|-
 +
|string
 +
|GetText
 +
|
 +
|
 +
|}
 +
 
 +
===TiXmlAttribute ===
 +
{| class="wikitable"
 +
|+
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remark
 +
|-
 +
|TiXmlAttribute
 +
|constructor
 +
|<nowiki>(void) | (string, string)</nowiki>
 +
|
 +
|-
 +
|string
 +
| Value
 +
|
 +
|
 +
|-
 +
|string
 +
|Name
 +
|
 +
|
 +
|-
 +
|int
 +
|IntValue
 +
|
 +
|
 +
|-
 +
|float
 +
|DoubleValue
 +
|
 +
|
 +
|-
 +
| TiXmlAttribute
 +
|Next
 +
|
 +
|
 +
|-
 +
|void
 +
|SetValue
 +
|string
 +
|
 +
|-
 +
|void
 +
|SetName
 +
|string
 +
|
 +
|}
 +
 
 +
===TiXmlHandle===
 +
{| class="wikitable"
 +
|+
 +
!Return value
 +
!Name
 +
!Arguments
 +
!Remark
 +
|-
 +
|TiXmlHandle
 +
|constructor
 +
|<nowiki>TiXmlNode | TiXmlHandle</nowiki>
 +
|
 +
|-
 +
|TiXmlHandle
 +
|FirstChild
 +
|<nowiki>void | string</nowiki>
 +
|
 +
|-
 +
|TiXmlHandle
 +
|FirstChildElement
 +
|<nowiki>void | string</nowiki>
 +
|
 +
|-
 +
|TiXmlNode
 +
|ToNode
 +
|
 +
|
 +
|-
 +
|TiXmlElement
 +
|ToElement
 +
|
 +
|
 +
|-
 +
|TiXmlNode
 +
|Node
 +
|
 +
|
 +
|-
 +
|TiXmlElement
 +
|Element
 +
|
 +
|
 +
|}
 +
 
 +
==Constants==
 +
 
 +
{| style="border: 1px solid gray; border-collapse: collapse;" cellspacing="0" cellpadding="3" border="1"
 +
 
 +
|- 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.)
 +
|-
 +
 
 +
|-
 +
|PLATFORM_MAC||int||All Mac platforms
 +
|-
 +
 
 +
|-
 +
|PLATFORM_OS2||int||OS/2 platform
 +
|-
 +
 
 +
|-
 +
|PLATFORM_X11||int||All X11 platforms
 +
|-
 +
 
 +
|-
 +
|PLATFORM_UNKNOWN||int||Unknown platform. Please inform us if PLATFORM == PLATFORM_UNKNOWN so we can make this platform known too ;)
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''Plugin version'''
 +
|-
 +
 
 +
|-
 +
|PLUGIN_SDK_VERSION_MAJOR||int||=1, it will change when the SDK interface breaks
 +
|-
 +
 
 +
|-
 +
|PLUGIN_SDK_VERSION_MINOR||int||=13, it will change when the SDK interface breaks
 +
|-
 +
 
 +
|-
 +
|PLUGIN_SDK_VERSION_RELEASE||int||=13, it will change when the SDK interface breaks
 +
|-
 +
|-
 +
! colspan="3" |Script binding version
 +
|-
 +
|SCRIPTING_VERSION_MAJOR||int||=2, it will change when the script binding interface breaks (for ex. bindings removed, api breaks, function type changed)
 +
|-
 +
 
 +
|-
 +
|SCRIPTING_VERSION_MINOR||int||=0, it will change when the script binding interface breaks (for ex. new bindings introduced)
 +
|-
 +
 
 +
|-
 +
|SCRIPTING_VERSION_RELEASE|| int||=0, it will change when the script binding interface breaks (bug fixes)
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''Path separator for filenames'''
 +
|-
 +
 
 +
|-
 +
|wxFILE_SEP_PATH||wxString||Path separator. "\" for windows, "/" for all other platforms
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''Message dialog flags'''
 +
|-
 +
 
 +
|-
 +
|wxOK||int|| Flag for Message() 's third argument (flags).
 +
|-
 +
 
 +
|-
 +
|wxYES_NO||int|| -"-
 +
|-
 +
 
 +
|-
 +
| wxCANCEL||int||-"-
 +
|-
 +
 
 +
|-
 +
|wxICON_QUESTION|| int||-"-
 +
|-
 +
 
 +
|-
 +
|wxICON_INFORMATION||int||-"-
 +
|-
 +
 
 +
|-
 +
|wxICON_WARNING||int||-"-
 +
|-
 +
 
 +
|-
 +
|wxICON_ERROR||int||-"-
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''Message dialog return values'''
 +
|-
 +
 
 +
|-
 +
|wxID_OK|| int||
 +
|-
 +
 
 +
|-
 +
|wxID_YES ||int||
 +
|-
 +
 
 +
|-
 +
|wxID_NO||int||
 +
|-
 +
 
 +
|-
 +
|wxID_CANCEL||int||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum wxPathFormat'''
 +
|-
 +
 
 +
|-
 +
|wxPATH_NATIVE||enum||
 +
|-
 +
 
 +
|-
 +
|wxPATH_UNIX||enum||
 +
|-
 +
 
 +
|-
 +
|wxPATH_BEOS||enum||
 +
|-
 +
 
 +
|-
 +
|wxPATH_MAC||enum||
 +
|-
 +
 
 +
|wxPATH_DOS||enum||
 +
|-
 +
 
 +
|-
 +
| wxPATH_WIN|| enum||
 +
|-
 +
 
 +
|-
 +
|wxPATH_OS2||enum||
 +
|-
 +
 
 +
|-
 +
|wxPATH_VM3 ||enum||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''For wxFileName::GetPath()'''
 +
|-
 +
 
 +
|-
 +
|wxPATH_GET_VOLUME||enum||include the volume if applicable
 +
|-
 +
 
 +
|-
 +
|wxPATH_GET_SEPARATOR||enum||terminate the path with the separator
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum wxPathNormalize'''
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_ENV_VARS||enum||replace env vars with their values
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_DOTS||enum||squeeze all .. and . and prepend cwd
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_TILDE||enum||Unix only: replace ~ and ~user
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_CASE||enum||if case insensitive => tolower
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_ABSOLUTE || enum||make the path absolute
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_LONG||enum||make the path the long form
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_SHORTCUT ||enum||resolve the shortcut, if it is a shortcut
 +
|-
 +
 
 +
|-
 +
|wxPATH_NORM_ALL|| enum||= 0x00ff & ~wxPATH_NORM_CASE
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum OptionsRelationType'''
 +
|-
 +
 
 +
|-
 +
|ortCompilerOptions|| enum||
 +
|-
 +
 
 +
|-
 +
| ortLinkerOptions||enum||
 +
|-
 +
 
 +
|-
 +
|ortIncludeDirs||enum||
 +
|-
 +
 
 +
|-
 +
|ortLibDirs||enum||
 +
|-
 +
 
 +
|-
 +
|ortResDirs||enum ||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum OptionsRelation'''
 +
|-
 +
 
 +
|-
 +
|orUseParentOptionsOnly|| enum||
 +
|-
 +
 
 +
|-
 +
|orUseTargetOptionsOnly||enum||
 +
|-
 +
 
 +
|-
 +
|orPrependToParentOptions||enum||
 +
|-
 +
 
 +
|-
 +
|orAppendToParentOptions||enum||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum TargetType'''
 +
|-
 +
 
 +
|-
 +
| ttExecutable||enum||
 +
|-
 +
 
 +
|-
 +
|ttConsoleOnly||enum||
 +
|-
 +
 
 +
|-
 +
|ttStaticLib||enum||
 +
|-
 +
 
 +
|-
 +
|ttDynamicLib||enum||
 +
|-
 +
 
 +
|-
 +
|ttCommandsOnly||enum||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum MakeCommand'''
 +
|-
 +
 
 +
|-
 +
|mcClean||enum||
 +
|-
 +
 
 +
|-
 +
|mcDistClean||enum ||
 +
|-
 +
 
 +
|-
 +
|mcBuild|| enum||
 +
|-
 +
 
 +
|-
 +
|mcCompileFile||enum||
 +
|-
 +
 
 +
|-
 +
|mcAskRebuildNeeded||enum||
 +
|-
 +
 
 +
|-
 +
|mcSilentBuild||enum||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum PCHMode'''
 +
|-
 +
 
 +
|-
 +
|pchSourceDir||enum||
 +
|-
 +
 
 +
|-
 +
|pchObjectDir||enum||
 +
|-
 +
 
 +
|-
 +
|pchSourceFile||enum ||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum PrintScope'''
 +
|-
 +
 
 +
|-
 +
|psSelection||enum||
 +
|-
 +
 
 +
|-
 +
|psActiveEditor||enum ||
 +
|-
 +
 
 +
|-
 +
|psAllOpenEditors||enum||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum PrintColourMode'''
 +
|-
 +
 
 +
|-
 +
|pcmBlackAndWhite||enum||
 +
|-
 +
 
 +
|-
 +
| pcmColourOnWhite||enum ||
 +
|-
 +
 
 +
|-
 +
|pcmInvertColours||enum||
 +
|-
 +
 
 +
|-
 +
|pcmAsIs||enum||
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum TemplateOutputType'''
 +
|-
 +
 
 +
|-
 +
|wizProject||enum||TemplateOutputType::totProject
 +
|-
 +
 
 +
|-
 +
|wizTarget || enum||TemplateOutputType::totTarget
 +
|-
 +
 
 +
|-
 +
|wizFiles ||enum||TemplateOutputType::totFiles
 +
|-
 +
 
 +
|-
 +
|wizCustom||enum|| TemplateOutputType::totCustom
 +
|-
 +
 
 +
|-
 +
| colspan="3" style="background: #f8f8f8;" align="center" |'''enum SearchDirs'''
 
|-
 
|-
  
 
|-
 
|-
| void || Touch ||  ||
+
|sdHome||enum||User's home directory
 
|-
 
|-
  
 
|-
 
|-
| bool || Reload || bool ||
+
| sdBase||enum||Code::Blocks' installation base
 
|-
 
|-
  
 
|-
 
|-
| void || Print || bool,PrintColourMode,bool ||
+
|sdTemp||enum||System-wide temp folder
 
|-
 
|-
  
 
|-
 
|-
| void || AutoComplete ||  ||
+
|sdPath||enum||All dirs in the PATH environment variable
 
|-
 
|-
  
 
|-
 
|-
| bool || AddBreakpoint || int,bool ||
+
|sdConfig||enum|| Config folder
 
|-
 
|-
  
 
|-
 
|-
| bool || RemoveBreakpoint || int,bool ||
+
|sdCurrent||enum||Current working folder
 
|-
 
|-
  
 
|-
 
|-
| void || SetText || wxString || this is not present in cbEditor; included to help scripts edit text
+
|sdPluginsUser||enum || Plugins folder in user's dir
 
|-
 
|-
  
 
|-
 
|-
| wxString || GetText || || this is not present in cbEditor; included to help scripts edit text
+
|sdScriptsUser||enum||Scripts folder in user's dir
|-
 
 
 
|}
 
 
 
 
 
== 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
+
|sdDataUser||enum||Data folder in user's dir
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_MSW || int || All Windows platforms
+
|sdAllUser||enum|| Convenience value meaning "all sd*User values"
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_GTK || int || All GTK platforms (Linux, BSD, Solaris, Darwin)
+
|sdPluginsGlobal||enum||Plugins folder in base dir
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_MAC || int || All Mac platforms
+
|sdScriptsGlobal||enum||Scripts folder in base dir
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_OS2 || int || OS/2 platform
+
|sdDataGlobal||enum||Data folder in base dir
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_X11 || int || All X11 platforms
+
|sdAllGlobal||enum||Convenience value meaning "all sd*Global values"
 
|-
 
|-
  
 
|-
 
|-
| PLATFORM_UNKNOWN || int || Unknown platform. Please inform us if PLATFORM == PLATFORM_UNKNOWN so we can make this platform known too ;)
+
|sdAllKnown||enum||All known dirs (i.e. all of the above)
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''Message dialog flags'''
+
| colspan="3" style="background: #f8f8f8;" align="center" |'''SupportedPlatforms'''
 
|-
 
|-
  
 
|-
 
|-
| wxOK || int || Flag for Message() 's third argument (flags).
+
|spMac||enum||
 
|-
 
|-
  
 
|-
 
|-
| wxYES_NO || int || -"-
+
|spUnix ||enum||
 
|-
 
|-
  
 
|-
 
|-
| wxCANCEL || int || -"-
+
|spWindows||enum||
 
|-
 
|-
  
 
|-
 
|-
| wxICON_QUESTION || int || -"-
+
|spAll||enum||
|-
+
|
  
 
|-
 
|-
| wxICON_INFORMATION || int || -"-
+
| colspan="3" style="background: #f8f8f8;" align="center" |'''TargetFilenameGenerationPolicy'''
 
|-
 
|-
  
 
|-
 
|-
| wxICON_WARNING || int || -"-
+
|tgfpPlatformDefault||enum||Generate filename based on running platform defaults.
 
|-
 
|-
  
 
|-
 
|-
| wxICON_ERROR || int || -"-
+
|tgfpNone ||enum||No automatic generation; let the user specify the full filename
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''Message dialog return values'''
+
| colspan="3" style="background: #f8f8f8;" align="center" |'''ModuleType'''
 
|-
 
|-
  
 
|-
 
|-
| wxID_OK || int ||
+
|mtProjectManager ||enum||
 
|-
 
|-
  
 
|-
 
|-
| wxID_YES || int ||
+
|mtEditorManager||enum||
 
|-
 
|-
  
 
|-
 
|-
| wxID_NO || int ||
+
|mtLogManager||enum||
 
|-
 
|-
  
 
|-
 
|-
| wxID_CANCEL || int ||
+
|mtOpenFilesList||enum||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum OptionsRelationType'''
+
|mtEditorTab||enum||
 
|-
 
|-
  
 
|-
 
|-
| ortCompilerOptions || enum ||
+
|mtUnknown||enum||
 
|-
 
|-
  
 
|-
 
|-
| ortLinkerOptions || enum ||
+
| colspan="3" style="background: #f8f8f8;" align="center" |'''FileTreeDataKind'''
 
|-
 
|-
  
 
|-
 
|-
| ortIncludeDirs || enum ||
+
|ftdkUndefined||enum||
 
|-
 
|-
  
 
|-
 
|-
| ortLibDirs || enum ||
+
|ftdkProject||enum||
 
|-
 
|-
  
 
|-
 
|-
| ortResDirs || enum ||
+
|ftdkFolder||enum||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum OptionsRelation'''
+
|ftdkFile||enum||
 
|-
 
|-
  
 
|-
 
|-
| orUseParentOptionsOnly || enum ||
+
|ftdkVirtualGroup||enum||
 
|-
 
|-
  
 
|-
 
|-
| orUseTargetOptionsOnly || enum ||
+
|ftdkVirtualFolder||enum||
 
|-
 
|-
  
 
|-
 
|-
| orPrependToParentOptions || enum ||
+
| colspan="3" style="background: #f8f8f8;" align="center" |'''File extensions (e.g. "cbp")'''
 
|-
 
|-
  
 
|-
 
|-
| orAppendToParentOptions || enum ||
+
|EXT_WORKSPACE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum TargetType'''
+
|EXT_CODEBLOCKS||wxString||
 
|-
 
|-
  
 
|-
 
|-
| ttExecutable || enum ||
+
|EXT_DEVCPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| ttConsoleOnly || enum ||
+
|EXT_MSVC6||wxString||
 
|-
 
|-
  
 
|-
 
|-
| ttStaticLib || enum ||
+
|EXT_MSVC7||wxString||
 
|-
 
|-
  
 
|-
 
|-
| ttDynamicLib || enum ||
+
|EXT_MSVC10||wxString||
 
|-
 
|-
  
 
|-
 
|-
| ttCommandsOnly || enum ||
+
| EXT_MSVC6_WORKSPACE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum MakeCommand'''
+
|EXT_MSVC7_WORKSPACE || wxString ||
 
|-
 
|-
  
 
|-
 
|-
| mcClean || enum ||
+
| EXT_ASM||wxString||
 
|-
 
|-
  
 
|-
 
|-
| mcDistClean || enum ||
+
| EXT_D||wxString||
 
|-
 
|-
  
 
|-
 
|-
| mcBuild || enum ||
+
|EXT_F||wxString||
 
|-
 
|-
  
 
|-
 
|-
| mcCompileFile || enum ||
+
|EXT_F77||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum PCHMode'''
+
|EXT_F90||wxString||
 
|-
 
|-
  
 
|-
 
|-
| pchSourceDir || enum ||
+
|EXT_F95||wxString||
 
|-
 
|-
  
 
|-
 
|-
| pchObjectDir || enum ||
+
|EXT_FOR||wxString||
 
|-
 
|-
  
 
|-
 
|-
| pchSourceFile || enum ||
+
|EXT_FPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum PrintScope'''
+
|EXT_F03||wxString||
 
|-
 
|-
  
 
|-
 
|-
| psSelection || enum ||
+
|EXT_F08||wxString||
 
|-
 
|-
  
 
|-
 
|-
| psActiveEditor || enum ||
+
|EXT_JAVA||wxString||
 
|-
 
|-
  
 
|-
 
|-
| psAllOpenEditors || enum ||
+
|EXT_C||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum PrintColourMode'''
+
|EXT_CC||wxString||
 
|-
 
|-
  
 
|-
 
|-
| pcmBlackAndWhite || enum ||
+
|EXT_CPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| pcmColourOnWhite || enum ||
+
|EXT_CXX||wxString||
 
|-
 
|-
  
 
|-
 
|-
| pcmInvertColours || enum ||
+
|EXT_CPLPL||wxString||
 
|-
 
|-
  
 
|-
 
|-
| pcmAsIs || enum ||
+
|EXT_INL||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''enum TemplateOutputType'''
+
|EXT_H||wxString||
 
|-
 
|-
  
 
|-
 
|-
| wizProject || enum || TemplateOutputType::totProject
+
|EXT_HH||wxString||
 
|-
 
|-
  
 
|-
 
|-
| wizTarget || enum || TemplateOutputType::totTarget
+
|EXT_HPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| wizFiles || enum || TemplateOutputType::totFiles
+
|EXT_HXX||wxString||
 
|-
 
|-
  
 
|-
 
|-
| wizCustom || enum || TemplateOutputType::totCustom
+
|EXT_HPLPL||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''Other constants'''
+
|EXT_S||wxString||
 
|-
 
|-
  
 
|-
 
|-
| wxFILE_SEP_PATH || wxString || Path separator. "\" for windows, "/" for all other platforms
+
|EXT_SS||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''File extensions (e.g. "cbp")'''
+
|EXT_S62||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_WORKSPACE || wxString ||
+
|EXT_OBJECT||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_CODEBLOCKS || wxString ||
+
|EXT_XRCRESOURCE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_DEVCPP || wxString ||
+
|EXT_STATICLIB||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC6 || wxString ||
+
|EXT_DYNAMICLIB||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC6_WORKSPACE || wxString ||
+
|EXT_EXECUTABLE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC7 || wxString ||
+
|EXT_NATIVE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_MSVC7_WORKSPACE || wxString ||
+
|EXT_RESOURCE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_D || wxString ||
+
|EXT_RESOURCEBIN||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_F || wxString ||
+
|EXT_XML||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_F77 || wxString ||
+
|EXT_SCRIPT||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_F95 || wxString ||
+
| colspan="3" style="background: #f8f8f8;" align="center" |'''File extensions with leading dot (e.g. ".cbp")'''
 
|-
 
|-
  
 
|-
 
|-
| EXT_CPP || wxString ||
+
|DOT_EXT_WORKSPACE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_C || wxString ||
+
|DOT_EXT_CODEBLOCKS||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_CC || wxString ||
+
|DOT_EXT_DEVCPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_CXX || wxString ||
+
|DOT_EXT_MSVC6||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_HPP || wxString ||
+
|DOT_EXT_MSVC7||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_H || wxString ||
+
|DOT_EXT_MSVC10||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_HH || wxString ||
+
|DOT_EXT_MSVC7_WORKSPACE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_HXX || wxString ||
+
|DOT_EXT_MSVC6_WORKSPACE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_OBJECT || wxString ||
+
|DOT_EXT_D||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_XRCRESOURCE || wxString ||
+
|DOT_EXT_F||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_STATICLIB || wxString ||
+
|DOT_EXT_F77||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_DYNAMICLIB || wxString ||
+
|DOT_EXT_F90||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_EXECUTABLE || wxString ||
+
|DOT_EXT_F95||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_RESOURCE || wxString ||
+
|DOT_EXT_FOR||wxString||
 
|-
 
|-
  
 
|-
 
|-
| EXT_RESOURCEBIN || wxString ||
+
|DOT_EXT_FPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| colspan="3" align="center" style="background: #f8f8f8;" | '''File extensions with leading dot (e.g. ".cbp")'''
+
|DOT_EXT_F03||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_WORKSPACE || wxString ||
+
|DOT_EXT_F08||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CODEBLOCKS || wxString ||
+
|DOT_EXT_JAVA||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_DEVCPP || wxString ||
+
|DOT_EXT_C||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC6 || wxString ||
+
|DOT_EXT_CC||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC6_WORKSPACE || wxString ||
+
|DOT_EXT_CPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC7 || wxString ||
+
|DOT_EXT_CXX||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_MSVC7_WORKSPACE || wxString ||
+
|DOT_EXT_HPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_D || wxString ||
+
|DOT_EXT_CPLPL||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_F || wxString ||
+
|DOT_EXT_H||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_F77 || wxString ||
+
|DOT_EXT_HH||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_F95 || wxString ||
+
|DOT_EXT_HPP||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CPP || wxString ||
+
|DOT_EXT_HXX||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_C || wxString ||
+
|DOT_EXT_HPLPL||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CC || wxString ||
+
|DOT_EXT_S||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_CXX || wxString ||
+
|DOT_EXT_SS||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_HPP || wxString ||
+
|DOT_EXT_S62||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_H || wxString ||
+
|DOT_EXT_OBJECT||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_HH || wxString ||
+
|DOT_EXT_XRCRESOURCE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_HXX || wxString ||
+
|DOT_EXT_STATICLIB||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_OBJECT || wxString ||
+
|DOT_EXT_DYNAMICLIB||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_XRCRESOURCE || wxString ||
+
|DOT_EXT_EXECUTABLE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_STATICLIB || wxString ||
+
|DOT_EXT_NATIVE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_DYNAMICLIB || wxString ||
+
|DOT_EXT_RESOURCE||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_EXECUTABLE || wxString ||
+
|DOT_EXT_RESOURCEBIN||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_RESOURCE || wxString ||
+
|DOT_EXT_XML||wxString||
 
|-
 
|-
  
 
|-
 
|-
| DOT_EXT_RESOURCEBIN || wxString ||
+
|DOT_EXT_SCRIPT||wxString||
 
|-
 
|-
  
 
|}
 
|}
  
== See also ==
+
==Plugins with script bindings==
 +
[[Environment Variables plugin]] Plugin to change environment variables
 +
 
 +
==Script example collection==
 +
[[Some examples]]
  
* [[Scripting Code::Blocks|Scripting index]]
+
==See also==
  
[[Category:Code::Blocks_Documentation]]
+
*[[Scripting Code::Blocks|Scripting index]]
[[Category:Scripting Code::Blocks]]
 

Latest revision as of 15:34, 15 April 2022

Scripting is no good if all you can do is use the scripting language's built-in commands only. The host application (Code::Blocks) needs to expose parts of its internals to scripts, so scripts can use and control the host.

Code::Blocks has exposed a very large chunk of its SDK to scripts. This makes scripting in Code::Blocks nearly as powerful as native code (C++).

In this page all the exported constants, functions and classes are documented as a quick reference. For detailed documentation on each function/class, refer to the Code::Blocks SDK documentation.


NOTE: Please remember that Squirrel is typeless. Data types mentioned below are only used for documentation purposes.

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

The application object is accessed through the variable named App. Currently it has no bound functions...


Global functions

Return value Name Arguments Remarks
void Log wxString logs to the application log
void LogDebug wxString logs to the debug log
void LogWarning wxString logs a warning
void LogError wxString logs an error
int Message wxString,wxString,int arg1=msg, arg2=caption, arg3=buttons; see API docs for cbMessageBox()
void ShowMessage wxString
void ShowWarning wxString
void ShowError wxString
void ShowInfo wxString
wxString ReplaceMacros wxString Does variable expansion on the input wxString
ScriptingManager* GetScriptingManager
ProjectManager* GetProjectManager
EditorManager* GetEditorManager
ConfigManager* GetConfigManager
UserVariableManager* GetUserVariableManager
CompilerFactory* GetCompilerFactory
wxArrayString GetArrayFromString wxString,wxString,bool
wxString GetStringFromArray wxArrayString,wxString,bool
wxString EscapeSpaces wxString
wxString UnixFilename wxString, int arg1=filename, arg2=wxPATH_NATIVE, wxPATH_WIN, ...
FileType FileTypeOf wxString
wxString URLEncode wxString
void NotifyMissingFile wxString
int GetPlatformsFromString wxString
wxString GetStringFromPlatforms int,bool
void InfoWindow wxString,wxString,int,int pop-up box in the lower right, see infowindow.h
wxString GetFolder int see API docs for ConfigManager::GetFolder()
wxString LocateDataFile wxString, int see API docs for ConfigManager::LocateDataFile()
bool InstallPlugin wxString,bool, bool Install a binary plugin
int ExecuteToolPlugin wxString Execute a tool plugin (found in Plugins menu)
int ConfigureToolPlugin wxString Configure a tool plugin (found in Plugins menu)
void CallMenu wxString Call a menu entry describing its path using slashes (e.g. "/Valgrind/Run Valgrind::MemCheck")
void Include wxString similar to C/C++ #include "name"
int Require wxString arg=script_filename, return 0 if ok
bool IsNull void*
bool wxLaunchDefaultBrowser wxString
wxColour wxGetColourFromUser [wxColour]
long wxGetNumberFromUser wxString,wxString,wxString
wxString wxGetPasswordFromUser wxString,wxString,wxString
wxString wxGetTextFromUser wxString,wxString,wxString
long wxString_ToLong wxString const

ScriptingManager

Return value Name Arguments Remarks
bool RegisterScriptMenu wxString, wxString registers the script file (arg1) under a menu item (arg2).

e.g. GetScriptingManager().RegisterScriptMenu(_T("sample.script"), _T("Scripts/Sample script"));

Notes about the RegisterScriptMenu function:

  • 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.


ConfigManager

Return value Name Arguments Remarks
int Read const wxString, int arg1=key, arg2=default_val
bool Read const wxString, bool arg1=key, arg2=default_val
float Read const wxString, float arg1=key, arg2=default_val
wxString Read const wxString, const wxString arg1=key, arg2=default_val
void Write const wxString, int arg1=key, arg2=value
void Write const wxString, bool arg1=key, arg2=value
void Write const wxString, float arg1=key, arg2=value
void Write const wxString, const wxString, bool arg1=key, arg2=value, arg3=ignore_value_empty

ProjectManager

see API docs for 'ProjectManager::...' in 'include\projectmanager.h'

Return value Name Arguments in Prototype Remarks
wxString GetDefaultPath ( )
void SetDefaultPath (const wxString& path)
cbProject* GetActiveProject ( )
int GetProjectCount ( )
cbProject* GetProject (int)
void SetProject (cbProject* project, bool refresh = true)
bool LoadWorkspace (const wxString& filename = DEFAULT_WORKSPACE)
bool SaveWorkspace ( )
bool SaveWorkspaceAs (const wxString& filename)
bool CloseWorkspace ( )
cbProject* IsOpen (const wxString& filename)
cbProject* LoadProject (const wxString& filename, bool activateIt = true)
bool SaveProject (cbProject* project)
bool SaveProjectAs (cbProject* project)
bool SaveActiveProject ( )
bool SaveActiveProjectAs ( )
bool SaveAllProjects ( )
bool CloseProject (cbProject* project, bool dontsave = false, bool refresh = true)
bool CloseActiveProject (bool dontsave = false)
bool CloseAllProjects (bool dontsave = false)
cbProject* NewProject (const wxString& filename = wxEmptyString)
int AddFileToProject (const wxString& filename, cbProject* project = 0L, int target = -1)
int AskForBuildTargetIndex (cbProject* project = 0L)
void RebuildTree ( )
bool AddProjectDependency (cbProject* base, cbProject* dependsOn)
void RemoveProjectDependency (cbProject* base, cbProject* doesNotDependOn)
void ClearProjectDependencies (cbProject* base)
void RemoveProjectFromAllDependencies (cbProject* base)
ProjectsArray* GetDependenciesForProject (cbProject* base)
void ConfigureProjectDependencies (cbProject* base = 0)

EditorManager

Return value Name Arguments in Prototype Remarks
void Configure ( )
cbEditor* New (const wxString& newFileName = wxEmptyString)
cbEditor* Open (const wxString& filename)
cbEditor* IsBuiltinOpen (const wxString& filename)
cbEditor* GetBuiltinEditor (int index)
cbEditor* GetBuiltinActiveEditor ( )
EditorBase* GetActiveEditor ( )
void ActivateNext ( )
void ActivatePrevious ( )
bool SwapActiveHeaderSource ( )
bool CloseActive (bool dontsave = false)
bool Close (int index,bool dontsave = false),(EditorBase* editor,bool dontsave = false)
bool CloseAll (bool dontsave=false)
bool Save (int index)
bool SaveActive ( )
bool SaveAs (int index)
bool SaveActiveAs ( )
bool SaveAll ( )
int ShowFindDialog (bool replace, bool explicitly_find_in_files = false)

UserVariableManager

Return value Name Arguments in Prototype Remarks
bool Exists (const wxString& variable)

IO namespace

Return value Name Arguments in Prototype Remarks
bool DirectoryExists (const wxString& dir) 1)
wxString SelectDirectory (const wxString& message, const wxString& initialPath, bool showCreateDirButton)
bool CreateDirectory (const wxString& full_path, int perms) arg1=dir, arg2=permissions 1)
bool RemoveDirectory (const wxString& src) 1)
bool CopyFile (const wxString& src, const wxString& dst, bool overwrite) 1)
bool RenameFile (const wxString& src, const wxString& dst) old,new 1)
bool RemoveFile (const wxString& src) 1)
bool FileExists (const wxString& file) 1)
wxString SelectFile (const wxString& title, const wxString& defaultFile, const wxString& filter)
wxString ReadFileContents (const wxString& filename) 1)
bool WriteFileContents (const wxString& filename, const wxString& contents) filename,contents 1)
int Execute (const wxString& command)
wxString ExecuteAndGetOutput (const wxString& command)
wxString ExecuteAndGetOutputAndError (const wxString& command, bool prepend_error) if 'prepend_error' is true gives an error string
wxString GetCwd ( )
void SetCwd (const wxString& dir) directory (currently working directory)


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.

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

IO.CopyFile(_T("$(TARGET_OUTPUT_FILE)"),_T("output_directory/output_file"),true);

CompilerFactory

Return value Name Arguments in Prototype Remarks
bool IsValidCompilerID (const wxString& id)
int GetCompilerIndex (const wxString& id)
wxString GetDefaultCompilerID ( )
wxString GetCompilerVersionString (const wxString& Id)
bool CompilerInheritsFrom ( )
wxString GetCompilerIDByName (const wxString &name ) Makes it possible to find the compiler id by its name. Available since rev 9823.

wxString

Return value Name Arguments Remarks
wxString _T const char* basically this is the wxString constructor
wxString _ const char* the same as _T, but should be used for translatable strings
wxString operator= const wxString
wxString operator+ const wxString
wxString operator+ const int
wxString operator+= const wxString
wxString operator+= const int
bool operator< const wxString _T("abc") < _T("cba") -> true
bool operator<= const wxString
bool operator>= const wxString
bool operator> const wxString
int Find wxString -1 if not found
bool Matches wxString not use '==' !!, returns true if the string contents matches a mask containing '*' and '?'
void AddChar char
char GetChar int arg1=position
bool IsEmpty
int Length
int length same as Length()
int len same as Length()
int size same as Length()
wxString Lower
wxString LowerCase same as Lower()
void MakeLower
wxString Upper
wxString UpperCase same as Upper()
void MakeUpper
wxString Mid int, int arg1=position, arg2=long
wxString Remove int, int arg1=position, arg2=long
void RemoveLast int remove the last characters
int Replace wxString, wxString,bool arg3=true -> all occurrences else the first
wxString Right int x return the x last characters
wxString AfterFirst char not found -> _T("")
wxString AfterLast char not found -> all the character string
wxString BeforeFirst char not found -> all the character string
wxString BeforeLast char not found -> _T("")

NOTE: Is instantiated in a script using: local my_wxstring = ::wxString();

wxArrayString

Return value Name Arguments Remarks
void Add wxString, size_t arg1=string, arg2=number of copies to add
void Clear
int GetCount
int Index wxString -1 If not found
wxString Item int not work with wx 2.9.x ?!

NOTE: Is instantiated in a script using: local my_wxarraystring = ::wxArrayString();

wxColour

Return value Name Arguments Remarks
byte Red
byte Green
byte Blue
bool IsOk ONLY if (wxVERSION_NUMBER < 2900)
void Set byte, byte, byte, byte red, green, blue, alpha : into [0..255]

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

Return value Name Arguments Remarks
void Assign const wxFileName creates the file name from an other wxFileName
void Assign const wxString, wxPathFormat arg1=full_path, arg2=wformat=xPATH_NATIVE ...
void AssignCwd const wxString arg1=volume
void AssignDir const wxString, wxPathFormat arg1=name_dir, arg2=format=wxPATH_NATIVE ...
void AssignHomeDir sets this file name object to the home directory
void Clear reset all components to default, uninitialized state
void ClearExt removes the extension from the file name resulting in a file name with no trailing dot
int GetDirCount returns the number of directories in the file name.
wxArrayString GetDirs returns the directories in string array form
wxString GetExt returns the file name extension.
wxString GetFullName returns the full name (including extension but excluding directories).
wxString GetFullPath wxPathFormat arg=format=wxPATH_NATIVE ...
wxString GetLongPath return the long form of the path (returns identity on non-Windows platforms)
wxString GetName returns the name part of the filename (without extension)
wxString GetPath int, wxPathFormat arg1=flags=wxPATH_GET_VOLUME..., arg2=format=wxPATH_NATIVE ...
wxString GetShortPath return the short form of the path (returns identity on non-Windows platforms).
wxString GetVolume returns the string containing the volume for this file name
bool HasExt returns true if an extension is present.
bool HasName returns true if a name is present
bool HasVolume returns true if a volume specifier is present
void InsertDir int, const wxString arg1=before_dir, arg2=name_dir
bool IsAbsolute wxPathFormat arg=format=wxPATH_NATIVE...
bool IsOk returns true if the filename is valid
bool IsRelative wxPathFormat arg=format=wxPATH_NATIVE...
bool IsDir returns true if this object represents a directory
bool MakeAbsolute const wxString, wxPathFormat arg1=cwd=_T("") or ..., arg2=format=wxPATH_NATIVE or ...
bool MakeRelativeTo const wxString, wxPathFormat arg1=path_base, arg2=format=wxPATH_NATIVE or ...
bool Normalize int, const wxString, wxPathFormat arg1=flags=wxPATH_NORM_ALL, arg2=cwd=_T(""),arg3=format=wxPATH_NATIVE or ...
void PrependDir const wxString arg=dir
void RemoveDir int arg=pos RemoveLastDir
void RemoveLastDir removes last directory component from the path
bool SameAs const wxFileName, wxPathFormat arg1=filepath, arg2=format=wxPATH_NATIVE
bool SetCwd changes the current working directory
void SetExt const wxString arg=extension
void SetEmptyExt sets the extension of the file name to be an empty extension
void SetFullName wxString
void SetName wxString
void SetVolume wxString

NOTE: Is instantiated in a script using: local my_filename = ::wxFileName()

wxPoint

UNDER CONSTRUCTION

Instantiate integer points 2D

Return value Name Arguments Remarks
wxPoint operator= const wxPoint default assignment operator is ok
bool operator== const wxPoint
bool operator!= const wxPoint
int x
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

Instantiate integers values (X, Y)

Return value Name Arguments Remarks
wxSize operator= const wwSize default assignment operator is ok
bool operator== const wxSize
bool operator!= const wxSize
int GetWidth return X
int GetHeight return Y
void SetWidth int w X=w
void SetHeight int h Y=h
void Set int w, int h X=w, Y=h

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

Return value Name Arguments in Prototype Remarks
void AddBuildTarget const wxString& targetName
void RenameBuildTarget const wxString& oldTargetName, const wxString& newTargetName
void RemoveBuildTarget const wxString& targetName
const wxArrayString& GetBuildTargets
wxString GetBaseName
wxString GetObjName
void SetObjName const wxString& targetName
cbProject* GetParentProject
wxString GetCustomBuildCommand const wxString& compilerId
void SetCustomBuildCommand const wxString& compilerId, const wxString& newBuildCommand
bool GetUseCustomBuildCommand const wxString& compilerId
void SetUseCustomBuildCommand const wxString& compilerId, bool useCustomBuildCommand
wxFileName file (variable)
wxString relativeFilename (variable)
wxString relativeToCommonTopLevelPath (variable)
bool compile (variable)
bool link (variable)
int weight (variable)
wxString compilerVar (variable)
wxArrayString buildTargets (variable)

CompileOptionsBase

Return value Name Arguments in Prototype Remarks
void AddPlatform int platform windows,unix,mac
void RemovePlatform int platform
void SetPlatforms int platform
int GetPlatforms
bool SupportsCurrentPlatform
void SetLinkerOptions const wxArrayString& linkerOpts
void SetLinkLibs const wxArrayString& linkLibs
void SetLinkerExecutable LinkerExecutableOption option
LinkerExecutableOption GetLinkerExecutable
void SetCompilerOptions const wxArrayString& compilerOpts
void SetResourceCompilerOptions const wxArrayString& resourceCompilerOpts
void SetIncludeDirs const wxArrayString& includeDirs
void SetResourceIncludeDirs const wxString& option
void SetLibDirs const wxArrayString& libDirs
void SetCommandsBeforeBuild const wxArrayString& commands
void SetCommandsAfterBuild const wxArrayString& commands
wxArrayString GetLinkerOptions
wxArrayString GetLinkLibs
wxArrayString GetCompilerOptions
wxArrayString GetResourceCompilerOptions
wxArrayString GetIncludeDirs
wxArrayString GetResourceIncludeDirs
wxArrayString GetLibDirs
wxArrayString GetCommandsBeforeBuild
wxArrayString GetCommandsAfterBuild
bool GetModified
void SetModified bool modified
void AddLinkerOption const wxString& option
void AddLinkLib const wxString& lib
void AddCompilerOption const wxString& option
void AddResourceCompilerOption const wxString& option
void AddIncludeDir const wxString& option
void AddResourceIncludeDir const wxString& option
void AddLibDir const wxString& option
void AddCommandsBeforeBuild const wxString& command
void AddCommandsAfterBuild const wxString& command
void ReplaceLinkerOption const wxString& option, const wxString& new_option
void ReplaceLinkLib const wxString& option, const wxString& new_option
void ReplaceCompilerOption const wxString& option, const wxString& new_option
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
void ReplaceLibDir const wxString& option, const wxString& new_option
void RemoveLinkerOption const wxString& option
void RemoveLinkLib const wxString& lib
void RemoveCompilerOption const wxString& option
void RemoveIncludeDir const wxString& option
void RemoveResourceCompilerOption const wxString& option
void RemoveResourceIncludeDir const wxString& option
void RemoveLibDir const wxString& option
void RemoveCommandsBeforeBuild const wxString& command
void RemoveCommandsAfterBuild const wxString& command
bool GetAlwaysRunPostBuildSteps
void SetAlwaysRunPostBuildSteps bool always
void SetBuildScripts const wxArrayString& scripts
wxArrayString GetBuildScripts
void AddBuildScript const wxString& script
void RemoveBuildScript const wxString& script
bool SetVar const wxString& key, const wxString& value, bool onlyIfExists = false
wxString GetVar const wxString& key
bool UnsetVar const wxString& key
void UnsetAllVars

CompileTargetBase

Extends CompileOptionsBase.

Return value Name Arguments Remarks
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.
wxString GetFilename The full project name (*.cbp)
wxString GetTitle Target name
void SetTitle wxString title
void SetOutputFilename wxString filename
void SetWorkingDir wxString dirname
void SetObjectOutput wxString dirname
void SetDepsOutput wxString dirname
OptionsRelation GetOptionRelation OptionsRelationType type
void SetOptionRelation OptionsRelationType type, OptionsRelation rel
wxString GetWorkingDir
wxString GetObjectOutput
wxString GetDepsOutput
wxString GetOutputFilename
wxString SuggestOutputFilename
wxString GetExecutableFilename
wxString GetDynamicLibFilename
wxString GetDynamicLibDefFilename
wxString GetStaticLibFilename
wxString GetBasePath
void SetTargetType TargetType pt
TargetType GetTargetType
wxString GetExecutionParameters
void SetExecutionParameters wxString params
wxString GetHostApplication
void SetHostApplication wxString app
void SetCompilerID wxString id
wxString GetCompilerID
wxString GetMakeCommandFor MakeCommand cmd
void SetMakeCommandFor MakeCommand cmd, wxString make
bool MakeCommandsModified

ProjectBuildTarget

Extends CompileTargetBase.

Return value Name Arguments Remarks
cbProject* GetParentProject
wxString GetFullTitle The full title, i.e. "projectname - targetname"
wxString GetExternalDeps Returns a list of files whose target depends (separated by ';')
void SetExternalDeps wxString deps Sets the list of files whose target depends (separated by ';')
void SetAdditionalOutputFiles wxString files Sets the list of additional output files (separated by ';')
wxString GetAdditionalOutputFiles Returns a list of additional output files (separated by ';')
bool GetIncludeInTargetAll Deprecated, do not use at 'All'
void SetIncludeInTargetAll bool Deprecated, do not use at 'All'
bool GetCreateDefFile True if the target creates a DEF imports file. (valid for dynamic library targets only)
void SetCreateDefFile bool createIt Set if the target creates a DEF imports file
bool GetCreateStaticLib Return true if an import library will be created, false if not (valid for dynamic library targets only)
void SetCreateStaticLib bool Set if an import library should be created (valid for dynamic library targets only)
bool GetUseConsoleRunner Valid only for targets generating a console executable
void SetUseConsoleRunner bool useIt Valid only for targets generating a console executable
ProjectFile* GetFile int index Returns a file from the target
int GetFilesCount Returns number of files for the target

cbProject

Extends CompileTargetBase.

Return value Name Arguments Remarks
bool GetModified Return true if the project is modified in any way
void SetModified bool modified Mark the project as modified or not
wxString GetMakefile Returns file name for the Makefile
void SetMakefile wxString makefile Set Makefile name when using a custom Makefile to build the project
bool IsMakefileCustom True if the project is using a custom Makefile for compilation, false if not
void SetMakefileCustom bool custom Mark if the project should use a custom Makefile for compilation
bool CloseAllFiles bool dontsave Close all project files. If dontsave is true no file would be saved even if modified
bool SaveAllFiles Save all project files
bool Save Save the project
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
bool LoadLayout Load the project's layout
wxString GetCommonTopLevelPath Returns the top-level path common to all project files
int GetFilesCount Returns number of files in the project
ProjectFile* GetFile int index Access a file of the project. Index is between 0 and GetFilesCount()
ProjectFile* GetFileByFilename wxString filename, bool isRelative, bool isUnixFilename Access a file of the project.
bool RemoveFile ProjectFile *file Remove a file from the project
ProjectFile* AddFile const wxString &targetName, const wxString &fileaname, bool compile, bool link, int weight See API docs for cbProject::AddFile
ProjectFile* AddFile int targetIndex, const wxString &fileaname, bool compile, bool link, int weight See API docs for cbProject::AddFile
int GetBuildTargetsCount Returns the number of targets
ProjectBuildTarget* GetBuildTarget int index Access a build target by index. Index is from 0 to GetBuildTargetsCount
ProjectBuildTarget* GetBuildTarget const wxString &targetName Access a build target by name
ProjectBuildTarget* AddBuildTarget cont wxString &targetName Add a new build target
bool RenameBuildTarget int index, const wxString &targetName Rename a build target
bool RenameBuildTarget const wxString &oldTargetName, const wxString &newTargetName Rename a build target
ProjectBuildTarget* DuplicateBuildTarget int index, const wxString &newName Duplicate a build target
ProjectBuildTarget* DuplicateBuildTarget const wxString &targetName, const wxString &newName Duplicate a build target
bool RemoveBuildTarget int index Remove a build target
bool RemoveBuildTarget const wxString &targetName Remove a build target
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.
bool ExportTargetAsProject wxString targetName Export a target as new project
bool BuildTargetValid const wxString &name, bool virtualsToo Is there a build target (virtual or real) by name?
wxString GetFirstValidBuildTargetName bool virtualsToo Returns the first valid (virtual or real) build target
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
wxString GetDefaultExecuteTarget Returns the name of the build target which will be pre-selected when the "Select target" dialog appears when running the project
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.
wxString GetActiveBuildTarget The active build target name. Note that this might be a virtual target
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.
PCHMode GetModeForPCH
void SetModeForPCH PCHMode mode
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
bool GetExtendedObjectNamesGeneration Returns true for extended mode, false for normal mode
void SetNotes const wxString &notes Set notes on the project
wxString GetNotes Returns the notes on the project
void SetShowNotesOnLoad bool show Set if to show project notes on load automatically
bool GetShowNotesOnLoad Returns true if project notes would be shown automatically during load
void ShowNotes bool nonEmptyOnly, bool editable Show project notes now
void AddToExtensions wxString Deprecated since rev 11857
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
wxArrayString ExtensionListNodeAttributes const wxString &extension Returns a list of with the names of the attributes on the given extension node. Available since rev 11857
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
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
void ExtensionRemoveNodeAttribute const wxString &extension, const wxString &attributeName Remove the given attribute on the given extension node. Available since rev 11857
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
void ExtensionRemoveNode const wxString &extension Remove the given extension node. Available since rev 11857
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
bool HasVirtualBuildTarget const wxSring &alias Does a virtual build target exist?
bool RemoveVirtualBuildTarget const wxString &alias Remove a virtual build target. Return true if removed
wxArrayString GetVirtualBuildTargets Get a list of all defined virtual build targets.
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
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)
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.
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.

Examples:

_T("debugger") Finds the first debugger node
_T("debugger/remote_debugging") Finds the first child named 'remote_debugging' of the first 'debugger' node
_T("debugger/remote_debugging[1]") Finds the second child named 'remote_debugging' of the first 'debugger' node
_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

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.

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

TiXML Binding

This describes the squirrel interface to read XML files. The base is the TinyXML library and for detailed function description, please refere to the official TinyXML documentation. If a function from this section takes string as Argument it can take wxString or squirrel native strings. If a function returns a string it returns squirrel native strings.

Argument annotation: if multiple types are accepted they are separated with | . For example if a function takes an empty, string or int parameter for the first argument and a string for the second this is described as

(void | string | int, string)

TiXMLPrinter

Return value Name Arguments Remark
string CStr Return the XML as string
void SetIndent string Set indentation string
void SetLineBreak string Set line break type

TiXMLNode

Return value Name Arguments Remark
string Value
void SetValue string

TiXmlDocument

Return value Name Arguments Remark
TiXmlDocument constructor void | string
bool SaveFile
bool SaveFile string
bool LoadFile void | string
string Parse string
TiXmlElement RootElement
bool Error
string ErrorDesc
bool Accept TiXMLPringer

TiXmlElement

Return value Name Arguments Remark
TiXmlElement constructor string, TiXmlElement
string Attribute string
TiXMLAttribute GetAttribute string
TiXMLAttribute FirstAttribute
TiXMLAttribute LastAttribute
void RemoveAttribute string
void SetAttribute (string, string | int | float)
TiXmlElement FirstChildElement (void | string)
TiXMLNode LastChild (void | string)
TiXmlElement LastChildElement (void | string)
TiXmlElement NextSiblingElement (void | string)
TiXMLNode PreviousSibling (void | string)
string GetText

TiXmlAttribute

Return value Name Arguments Remark
TiXmlAttribute constructor (void) | (string, string)
string Value
string Name
int IntValue
float DoubleValue
TiXmlAttribute Next
void SetValue string
void SetName string

TiXmlHandle

Return value Name Arguments Remark
TiXmlHandle constructor TiXmlNode | TiXmlHandle
TiXmlHandle FirstChild void | string
TiXmlHandle FirstChildElement void | string
TiXmlNode ToNode
TiXmlElement ToElement
TiXmlNode Node
TiXmlElement Element

Constants

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.)
PLATFORM_MAC int All Mac platforms
PLATFORM_OS2 int OS/2 platform
PLATFORM_X11 int All X11 platforms
PLATFORM_UNKNOWN int Unknown platform. Please inform us if PLATFORM == PLATFORM_UNKNOWN so we can make this platform known too ;)
Plugin version
PLUGIN_SDK_VERSION_MAJOR int =1, it will change when the SDK interface breaks
PLUGIN_SDK_VERSION_MINOR int =13, it will change when the SDK interface breaks
PLUGIN_SDK_VERSION_RELEASE int =13, it will change when the SDK interface breaks
Script binding version
SCRIPTING_VERSION_MAJOR int =2, it will change when the script binding interface breaks (for ex. bindings removed, api breaks, function type changed)
SCRIPTING_VERSION_MINOR int =0, it will change when the script binding interface breaks (for ex. new bindings introduced)
SCRIPTING_VERSION_RELEASE int =0, it will change when the script binding interface breaks (bug fixes)
Path separator for filenames
wxFILE_SEP_PATH wxString Path separator. "\" for windows, "/" for all other platforms
Message dialog flags
wxOK int Flag for Message() 's third argument (flags).
wxYES_NO int -"-
wxCANCEL int -"-
wxICON_QUESTION int -"-
wxICON_INFORMATION int -"-
wxICON_WARNING int -"-
wxICON_ERROR int -"-
Message dialog return values
wxID_OK int
wxID_YES int
wxID_NO int
wxID_CANCEL int
enum wxPathFormat
wxPATH_NATIVE enum
wxPATH_UNIX enum
wxPATH_BEOS enum
wxPATH_MAC enum
wxPATH_DOS enum
wxPATH_WIN enum
wxPATH_OS2 enum
wxPATH_VM3 enum
For wxFileName::GetPath()
wxPATH_GET_VOLUME enum include the volume if applicable
wxPATH_GET_SEPARATOR enum terminate the path with the separator
enum wxPathNormalize
wxPATH_NORM_ENV_VARS enum replace env vars with their values
wxPATH_NORM_DOTS enum squeeze all .. and . and prepend cwd
wxPATH_NORM_TILDE enum Unix only: replace ~ and ~user
wxPATH_NORM_CASE enum if case insensitive => tolower
wxPATH_NORM_ABSOLUTE enum make the path absolute
wxPATH_NORM_LONG enum make the path the long form
wxPATH_NORM_SHORTCUT enum resolve the shortcut, if it is a shortcut
wxPATH_NORM_ALL enum = 0x00ff & ~wxPATH_NORM_CASE
enum OptionsRelationType
ortCompilerOptions enum
ortLinkerOptions enum
ortIncludeDirs enum
ortLibDirs enum
ortResDirs enum
enum OptionsRelation
orUseParentOptionsOnly enum
orUseTargetOptionsOnly enum
orPrependToParentOptions enum
orAppendToParentOptions enum
enum TargetType
ttExecutable enum
ttConsoleOnly enum
ttStaticLib enum
ttDynamicLib enum
ttCommandsOnly enum
enum MakeCommand
mcClean enum
mcDistClean enum
mcBuild enum
mcCompileFile enum
mcAskRebuildNeeded enum
mcSilentBuild enum
enum PCHMode
pchSourceDir enum
pchObjectDir enum
pchSourceFile enum
enum PrintScope
psSelection enum
psActiveEditor enum
psAllOpenEditors enum
enum PrintColourMode
pcmBlackAndWhite enum
pcmColourOnWhite enum
pcmInvertColours enum
pcmAsIs enum
enum TemplateOutputType
wizProject enum TemplateOutputType::totProject
wizTarget enum TemplateOutputType::totTarget
wizFiles enum TemplateOutputType::totFiles
wizCustom enum TemplateOutputType::totCustom
enum SearchDirs
sdHome enum User's home directory
sdBase enum Code::Blocks' installation base
sdTemp enum System-wide temp folder
sdPath enum All dirs in the PATH environment variable
sdConfig enum Config folder
sdCurrent enum Current working folder
sdPluginsUser enum Plugins folder in user's dir
sdScriptsUser enum Scripts folder in user's dir
sdDataUser enum Data folder in user's dir
sdAllUser enum Convenience value meaning "all sd*User values"
sdPluginsGlobal enum Plugins folder in base dir
sdScriptsGlobal enum Scripts folder in base dir
sdDataGlobal enum Data folder in base dir
sdAllGlobal enum Convenience value meaning "all sd*Global values"
sdAllKnown enum All known dirs (i.e. all of the above)
SupportedPlatforms
spMac enum
spUnix enum
spWindows enum
spAll enum
TargetFilenameGenerationPolicy
tgfpPlatformDefault enum Generate filename based on running platform defaults.
tgfpNone enum No automatic generation; let the user specify the full filename
ModuleType
mtProjectManager enum
mtEditorManager enum
mtLogManager enum
mtOpenFilesList enum
mtEditorTab enum
mtUnknown enum
FileTreeDataKind
ftdkUndefined enum
ftdkProject enum
ftdkFolder enum
ftdkFile enum
ftdkVirtualGroup enum
ftdkVirtualFolder enum
File extensions (e.g. "cbp")
EXT_WORKSPACE wxString
EXT_CODEBLOCKS wxString
EXT_DEVCPP wxString
EXT_MSVC6 wxString
EXT_MSVC7 wxString
EXT_MSVC10 wxString
EXT_MSVC6_WORKSPACE wxString
EXT_MSVC7_WORKSPACE wxString
EXT_ASM wxString
EXT_D wxString
EXT_F wxString
EXT_F77 wxString
EXT_F90 wxString
EXT_F95 wxString
EXT_FOR wxString
EXT_FPP wxString
EXT_F03 wxString
EXT_F08 wxString
EXT_JAVA wxString
EXT_C wxString
EXT_CC wxString
EXT_CPP wxString
EXT_CXX wxString
EXT_CPLPL wxString
EXT_INL wxString
EXT_H wxString
EXT_HH wxString
EXT_HPP wxString
EXT_HXX wxString
EXT_HPLPL wxString
EXT_S wxString
EXT_SS wxString
EXT_S62 wxString
EXT_OBJECT wxString
EXT_XRCRESOURCE wxString
EXT_STATICLIB wxString
EXT_DYNAMICLIB wxString
EXT_EXECUTABLE wxString
EXT_NATIVE wxString
EXT_RESOURCE wxString
EXT_RESOURCEBIN wxString
EXT_XML wxString
EXT_SCRIPT wxString
File extensions with leading dot (e.g. ".cbp")
DOT_EXT_WORKSPACE wxString
DOT_EXT_CODEBLOCKS wxString
DOT_EXT_DEVCPP wxString
DOT_EXT_MSVC6 wxString
DOT_EXT_MSVC7 wxString
DOT_EXT_MSVC10 wxString
DOT_EXT_MSVC7_WORKSPACE wxString
DOT_EXT_MSVC6_WORKSPACE wxString
DOT_EXT_D wxString
DOT_EXT_F wxString
DOT_EXT_F77 wxString
DOT_EXT_F90 wxString
DOT_EXT_F95 wxString
DOT_EXT_FOR wxString
DOT_EXT_FPP wxString
DOT_EXT_F03 wxString
DOT_EXT_F08 wxString
DOT_EXT_JAVA wxString
DOT_EXT_C wxString
DOT_EXT_CC wxString
DOT_EXT_CPP wxString
DOT_EXT_CXX wxString
DOT_EXT_HPP wxString
DOT_EXT_CPLPL wxString
DOT_EXT_H wxString
DOT_EXT_HH wxString
DOT_EXT_HPP wxString
DOT_EXT_HXX wxString
DOT_EXT_HPLPL wxString
DOT_EXT_S wxString
DOT_EXT_SS wxString
DOT_EXT_S62 wxString
DOT_EXT_OBJECT wxString
DOT_EXT_XRCRESOURCE wxString
DOT_EXT_STATICLIB wxString
DOT_EXT_DYNAMICLIB wxString
DOT_EXT_EXECUTABLE wxString
DOT_EXT_NATIVE wxString
DOT_EXT_RESOURCE wxString
DOT_EXT_RESOURCEBIN wxString
DOT_EXT_XML wxString
DOT_EXT_SCRIPT wxString

Plugins with script bindings

Environment Variables plugin Plugin to change environment variables

Script example collection

Some examples

See also