Code::Blocks  SVN r11506
sc_consts.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  *
5  * $Revision: 10854 $
6  * $Id: sc_consts.cpp 10854 2016-05-18 22:20:45Z d_anselmi $
7  * $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/sdk/scripting/bindings/sc_consts.cpp $
8  */
9 
10 #include <sdk_precomp.h>
11 #ifndef CB_PRECOMP
12  #include <wx/string.h>
13  #include <globals.h>
14  #include <settings.h>
15 #endif
16 
17 #include <filefilters.h>
18 #include "sc_base_types.h"
19 
20 // helper macros to bind constants
21 #define BIND_INT_CONSTANT(a) SqPlus::BindConstant<SQInteger>(a, #a);
22 #define BIND_INT_CONSTANT_NAMED(a,n) SqPlus::BindConstant<SQInteger>(a, n);
23 #define BIND_WXSTR_CONSTANT_NAMED(a,n) BindVariable(const_cast<wxString*>(&a), n, SqPlus::VAR_ACCESS_CONSTANT);
24 
25 namespace ScriptBindings
26 {
27  wxString s_PathSep = wxFILE_SEP_PATH;
28 
30  {
31  // platform constants
32  BIND_INT_CONSTANT_NAMED(0, "PLATFORM_MSW");
33  BIND_INT_CONSTANT_NAMED(1, "PLATFORM_GTK");
34  BIND_INT_CONSTANT_NAMED(2, "PLATFORM_MAC");
35  BIND_INT_CONSTANT_NAMED(3, "PLATFORM_OS2");
36  BIND_INT_CONSTANT_NAMED(4, "PLATFORM_X11");
37  BIND_INT_CONSTANT_NAMED(99, "PLATFORM_UNKNOWN");
38 
39  #if defined(__WXMSW__)
40  BIND_INT_CONSTANT_NAMED(0, "PLATFORM");
41  #elif defined(__WXGTK__)
42  BIND_INT_CONSTANT_NAMED(1, "PLATFORM");
43  #elif defined(__WXMAC__)
44  BIND_INT_CONSTANT_NAMED(2, "PLATFORM");
45  #elif defined(__WXOS2__)
46  BIND_INT_CONSTANT_NAMED(3, "PLATFORM");
47  #elif defined(__WXX11__)
48  BIND_INT_CONSTANT_NAMED(4, "PLATFORM");
49  #else
50  BIND_INT_CONSTANT_NAMED(99, "PLATFORM");
51  #endif
52 
53  BIND_INT_CONSTANT_NAMED(PLUGIN_SDK_VERSION_MAJOR, "PLUGIN_SDK_VERSION_MAJOR");
54  BIND_INT_CONSTANT_NAMED(PLUGIN_SDK_VERSION_MINOR, "PLUGIN_SDK_VERSION_MINOR");
55  BIND_INT_CONSTANT_NAMED(PLUGIN_SDK_VERSION_RELEASE, "PLUGIN_SDK_VERSION_RELEASE");
56 
57  // path separator for filenames
58  BIND_WXSTR_CONSTANT_NAMED(s_PathSep, "wxFILE_SEP_PATH");
59 
60  // dialog buttons
72 
73  // wxPathFormat
82 
83  // for wxFileName::GetPath()
84  BIND_INT_CONSTANT(wxPATH_GET_VOLUME);
85  BIND_INT_CONSTANT(wxPATH_GET_SEPARATOR);
86 
87  // wxPathNormalize
96 
97  // OptionsRelationType
103 
104  // OptionsRelation
109 
110  // TargetType
117 
118  // MakeCommand
125 
126  // PCHMode
130 
131  // printing scope for print dialog
135 
136  // printing colour mode
141 
142  // TemplateOutputType
143  BIND_INT_CONSTANT_NAMED(totProject, "wizProject");
144  BIND_INT_CONSTANT_NAMED(totTarget, "wizTarget");
145  BIND_INT_CONSTANT_NAMED(totFiles, "wizFiles");
146  BIND_INT_CONSTANT_NAMED(totCustom, "wizCustom");
147 
148  // SearchDirs
164 
165  // SupportedPlatforms
170 
171  // TargetFilenameGenerationPolicy
174 
175  // ModuleType
181 
182  // FileTreeDataKind
189 
190  // file extensions
280  }
281 };
const DLLIMPORT wxString F90_DOT_EXT
const DLLIMPORT wxString S62_DOT_EXT
#define wxICON_QUESTION
const DLLIMPORT wxString TCC_EXT
const DLLIMPORT wxString MSVC10_DOT_EXT
Data folder in user&#39;s dir.
Definition: configmanager.h:75
const DLLIMPORT wxString FPP_EXT
const DLLIMPORT wxString CODEBLOCKS_EXT
const DLLIMPORT wxString S_DOT_EXT
const DLLIMPORT wxString MSVC7_WORKSPACE_DOT_EXT
const DLLIMPORT wxString F95_EXT
#define wxICON_WARNING
const DLLIMPORT wxString SCRIPT_EXT
Linker include dir option.
const DLLIMPORT wxString OBJECT_DOT_EXT
const DLLIMPORT wxString SCRIPT_DOT_EXT
const DLLIMPORT wxString MSVC10_EXT
const DLLIMPORT wxString CPLPL_DOT_EXT
#define BIND_INT_CONSTANT_NAMED(a, n)
Definition: sc_consts.cpp:22
const DLLIMPORT wxString D_DOT_EXT
const DLLIMPORT wxString H_EXT
const DLLIMPORT wxString XML_DOT_EXT
const DLLIMPORT wxString INL_EXT
#define PLUGIN_SDK_VERSION_MINOR
Definition: cbplugin.h:40
The option uses parent options only.
#define wxICON_ERROR
The option uses target options appended to parent options.
const DLLIMPORT wxString DEVCPP_EXT
Scripts folder in base dir.
Definition: configmanager.h:80
const DLLIMPORT wxString NATIVE_DOT_EXT
Definition: globals.h:157
const DLLIMPORT wxString HPP_DOT_EXT
Scripts folder in user&#39;s dir.
Definition: configmanager.h:74
Target produces an executable.
#define wxCANCEL
const DLLIMPORT wxString HPP_EXT
const DLLIMPORT wxString JAVA_EXT
const DLLIMPORT wxString JAVA_DOT_EXT
#define PLUGIN_SDK_VERSION_MAJOR
Definition: cbplugin.h:39
Generate filename based on running platform defaults.
Convenience value meaning "all sd*Global values".
Definition: configmanager.h:83
#define wxYES_NO
const DLLIMPORT wxString S62_EXT
const DLLIMPORT wxString RESOURCEBIN_EXT
const DLLIMPORT wxString HXX_EXT
const DLLIMPORT wxString C_EXT
const DLLIMPORT wxString MSVC6_EXT
Config folder.
Definition: configmanager.h:70
const DLLIMPORT wxString F77_EXT
const DLLIMPORT wxString DYNAMICLIB_DOT_EXT
#define wxICON_INFORMATION
const DLLIMPORT wxString TPP_EXT
const DLLIMPORT wxString RESOURCEBIN_DOT_EXT
const DLLIMPORT wxString WORKSPACE_DOT_EXT
All dirs in the PATH environment variable.
Definition: configmanager.h:69
#define BIND_INT_CONSTANT(a)
Definition: sc_consts.cpp:21
In the objects output dir, along with other object files.
Definition: cbproject.h:87
const DLLIMPORT wxString ASM_DOT_EXT
const DLLIMPORT wxString CPLPL_EXT
const DLLIMPORT wxString F_EXT
const DLLIMPORT wxString FPP_DOT_EXT
const DLLIMPORT wxString DYNAMICLIB_EXT
template produces custom output (entirely up to the wizard used)
Definition: globals.h:150
#define BIND_WXSTR_CONSTANT_NAMED(a, n)
Definition: sc_consts.cpp:23
const DLLIMPORT wxString XRCRESOURCE_DOT_EXT
const DLLIMPORT wxString D_EXT
const DLLIMPORT wxString CXX_DOT_EXT
const DLLIMPORT wxString MSVC6_WORKSPACE_EXT
const DLLIMPORT wxString CC_DOT_EXT
User&#39;s home directory.
Definition: configmanager.h:66
template outputs a new file (or files)
Definition: globals.h:149
const DLLIMPORT wxString MSVC6_DOT_EXT
const DLLIMPORT wxString SS_EXT
const DLLIMPORT wxString XML_EXT
const DLLIMPORT wxString F90_EXT
const DLLIMPORT wxString WORKSPACE_EXT
Resource compiler include dir option.
void Register_Constants()
Definition: sc_consts.cpp:29
const DLLIMPORT wxString CPP_DOT_EXT
Target produces a dynamic library.
Convenience value meaning "all sd*User values".
Definition: configmanager.h:77
const DLLIMPORT wxString STATICLIB_EXT
The option uses parent options appended to target options.
const DLLIMPORT wxString MSVC7_DOT_EXT
const DLLIMPORT wxString MSVC7_WORKSPACE_EXT
const DLLIMPORT wxString CC_EXT
Target produces a native binary.
const DLLIMPORT wxString F_DOT_EXT
const DLLIMPORT wxString S_EXT
Compiler include dir option.
const DLLIMPORT wxString C_DOT_EXT
#define wxOK
const DLLIMPORT wxString F77_DOT_EXT
Current working folder.
Definition: configmanager.h:71
All known dirs (i.e. all of the above)
Definition: configmanager.h:85
No automatic generation; let the user specify the full filename.
const DLLIMPORT wxString FOR_DOT_EXT
const DLLIMPORT wxString CXX_EXT
const DLLIMPORT wxString F08_EXT
const DLLIMPORT wxString DEVCPP_DOT_EXT
In a dir (named by the PCH) on the same level as the source header (default).
Definition: cbproject.h:86
Plugins folder in user&#39;s dir.
Definition: configmanager.h:73
Plugins folder in base dir.
Definition: configmanager.h:79
Target produces a static library.
const DLLIMPORT wxString EXECUTABLE_EXT
const DLLIMPORT wxString HPLPL_DOT_EXT
Code::Blocks&#39; installation base.
Definition: configmanager.h:67
const DLLIMPORT wxString HXX_DOT_EXT
#define PLUGIN_SDK_VERSION_RELEASE
Definition: cbplugin.h:41
const DLLIMPORT wxString H_DOT_EXT
const DLLIMPORT wxString STATICLIB_DOT_EXT
Target produces a console executable (without GUI) (distinction between ttExecutable and ttConsoleOnl...
const DLLIMPORT wxString HH_DOT_EXT
const DLLIMPORT wxString RESOURCE_DOT_EXT
const DLLIMPORT wxString XRCRESOURCE_EXT
const DLLIMPORT wxString HPLPL_EXT
template adds a new target in a project
Definition: globals.h:148
const DLLIMPORT wxString HH_EXT
const DLLIMPORT wxString F03_EXT
const DLLIMPORT wxString CPP_EXT
Linker option.
template outputs a new project
Definition: globals.h:147
const DLLIMPORT wxString TCC_DOT_EXT
const DLLIMPORT wxString OBJECT_EXT
const DLLIMPORT wxString SS_DOT_EXT
const DLLIMPORT wxString F95_DOT_EXT
Data folder in base dir.
Definition: configmanager.h:81
const DLLIMPORT wxString MSVC6_WORKSPACE_DOT_EXT
const DLLIMPORT wxString ASM_EXT
System-wide temp folder.
Definition: configmanager.h:68
Compiler option.
const DLLIMPORT wxString CODEBLOCKS_DOT_EXT
const DLLIMPORT wxString EXECUTABLE_DOT_EXT
The option uses target options only.
wxString s_PathSep
Definition: sc_consts.cpp:27
const DLLIMPORT wxString RESOURCE_EXT
Definition: globals.h:161
const DLLIMPORT wxString F08_DOT_EXT
const DLLIMPORT wxString TPP_DOT_EXT
const DLLIMPORT wxString FOR_EXT
const DLLIMPORT wxString F03_DOT_EXT
Target only runs commands in pre-build and/or post-build steps.
const DLLIMPORT wxString MSVC7_EXT