Code::Blocks  SVN r11506
sc_wxtypes.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: 11439 $
6  * $Id: sc_wxtypes.cpp 11439 2018-08-07 07:13:55Z fuscated $
7  * $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/sdk/scripting/bindings/sc_wxtypes.cpp $
8  */
9 
10 #include "sdk_precomp.h"
11 #ifndef CB_PRECOMP
12  #include <wx/string.h>
13  #include <globals.h>
14 #endif
15 #include <wx/filename.h>
16 #include <wx/colour.h>
17 
18 #include "sc_base_types.h"
19 
20 namespace ScriptBindings
21 {
23  // wxArrayString //
25  void wxArrayString_Clear(HSQUIRRELVM v)
26  {
27  static_assert(wxMinimumVersion<2,8,12>::eval, "wxWidgets 2.8.12 is required");
28  StackHandler sa(v);
29  wxArrayString& self = *SqPlus::GetInstance<wxArrayString,false>(v, 1);
30  self.Clear();
31  }
32  SQInteger wxArrayString_GetCount(HSQUIRRELVM v)
33  {
34  static_assert(wxMinimumVersion<2,8,12>::eval, "wxWidgets 2.8.12 is required");
35  StackHandler sa(v);
36  wxArrayString& self = *SqPlus::GetInstance<wxArrayString,false>(v, 1);
37  return sa.Return((SQInteger)self.GetCount());
38  }
39 
40  SQInteger wxArrayString_Index(HSQUIRRELVM v)
41  {
42  static_assert(wxMinimumVersion<2,8,12>::eval, "wxWidgets 2.8.12 is required");
43  StackHandler sa(v);
44  wxArrayString& self = *SqPlus::GetInstance<wxArrayString,false>(v, 1);
45  wxString inpstr = *SqPlus::GetInstance<wxString,false>(v, 2);
46  bool chkCase = true;
47  bool frmEnd = false;
48  if (sa.GetParamCount() >= 3)
49  chkCase = sa.GetBool(3);
50  if (sa.GetParamCount() == 4)
51  frmEnd = sa.GetBool(4);
52  return sa.Return((SQInteger)self.Index(inpstr.c_str(), chkCase, frmEnd));
53  }
54  SQInteger wxArrayString_SetItem(HSQUIRRELVM v)
55  {
56  StackHandler sa(v);
57  if (sa.GetParamCount() != 3)
58  return sq_throwerror(v, "wxArrayString::SetItem wrong number of parameters!");
59  wxArrayString& self = *SqPlus::GetInstance<wxArrayString,false>(v, 1);
60  int index = sa.GetInt(2);
61  if (index < 0 || size_t(index) >= self.GetCount())
62  return sq_throwerror(v, "wxArrayString::SetItem index out of bounds!");
63  const wxString &value = *SqPlus::GetInstance<wxString,false>(v, 3);
64  self[index] = value;
65  return 0;
66  }
67 
69  // wxColour //
71  SQInteger wxColour_OpToString(HSQUIRRELVM v)
72  {
73  StackHandler sa(v);
74  wxColour& self = *SqPlus::GetInstance<wxColour,false>(v, 1);
75  wxString str = wxString::Format(_T("[r=%d, g=%d, b=%d]"), self.Red(), self.Green(), self.Blue());
76  return sa.Return((const SQChar*)str.mb_str(wxConvUTF8));
77  }
78 
80  // wxFileName //
82  SQInteger wxFileName_OpToString(HSQUIRRELVM v)
83  {
84  StackHandler sa(v);
85  wxFileName& self = *SqPlus::GetInstance<wxFileName,false>(v, 1);
86  return sa.Return((const SQChar*)self.GetFullPath().mb_str(wxConvUTF8));
87  }
88 
90  // wxPoint //
92 
93  // wxPoint operator==
94  SQInteger wxPoint_OpCmp(HSQUIRRELVM v)
95  {
96  StackHandler sa(v);
97  wxPoint& self = *SqPlus::GetInstance<wxPoint,false>(v, 1);
98  wxPoint& other = *SqPlus::GetInstance<wxPoint,false>(v, 2);
99  return sa.Return(self==other);
100  }
101  SQInteger wxPoint_x(HSQUIRRELVM v)
102  {
103  StackHandler sa(v);
104  wxPoint& self = *SqPlus::GetInstance<wxPoint,false>(v, 1);
105  return sa.Return((SQInteger)(self.x));
106  }
107  SQInteger wxPoint_y(HSQUIRRELVM v)
108  {
109  StackHandler sa(v);
110  wxPoint& self = *SqPlus::GetInstance<wxPoint,false>(v, 1);
111  return sa.Return((SQInteger)(self.y));
112  }
113 
115  // wxString //
117 
118  // the _() function for scripts
119  wxString static_(const SQChar* str)
120  {
121  return wxGetTranslation(cbC2U(str));
122  }
123 
124  // the _T() function for scripts
126  {
127  return cbC2U(str);
128  }
129 
130  // wxString operator+
131  SQInteger wxString_OpAdd(HSQUIRRELVM v)
132  {
133  StackHandler sa(v);
134  wxString result;
135  wxString& str1 = *SqPlus::GetInstance<wxString,false>(v, 1);
136  if (sa.GetType(2) == OT_INTEGER)
137  {
138 #ifdef _SQ64
139  result.Printf(_T("%s%ld"), str1.c_str(), sa.GetInt(2));
140 #else
141  result.Printf(_T("%s%d"), str1.c_str(), sa.GetInt(2));
142 #endif
143  }
144  else if (sa.GetType(2) == OT_FLOAT)
145  result.Printf(_T("%s%f"), str1.c_str(), sa.GetFloat(2));
146  else if (sa.GetType(2) == OT_USERPOINTER)
147  result.Printf(_T("%s%p"), str1.c_str(), sa.GetUserPointer(2));
148  else if (sa.GetType(2) == OT_STRING)
149  result.Printf(_T("%s%s"), str1.c_str(), cbC2U(sa.GetString(2)).c_str());
150  else
151  {
152  wxString *str2 = SqPlus::GetInstance<wxString,false>(v, 2);
153  if (!str2)
154  return sa.ThrowError("Second paramter is not a wxString instance!");
155  result = str1 + *str2;
156  }
157  return SqPlus::ReturnCopy(v, result);
158  }
159 
160  SQInteger wxString_OpCmp(HSQUIRRELVM v)
161  {
162  StackHandler sa(v);
163  wxString& str1 = *SqPlus::GetInstance<wxString,false>(v, 1);
164  if (sa.GetType(2) == OT_STRING)
165  return sa.Return((SQInteger)str1.Cmp(cbC2U(sa.GetString(2))));
166  return sa.Return((SQInteger)str1.Cmp(*SqPlus::GetInstance<wxString,false>(v, 2)));
167  }
168 
169  SQInteger wxString_OpToString(HSQUIRRELVM v)
170  {
171  StackHandler sa(v);
172  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
173  return sa.Return((const SQChar*)self.mb_str(wxConvUTF8));
174  }
175 
176  SQInteger wxString_AddChar(HSQUIRRELVM v)
177  {
178  StackHandler sa(v);
179  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
180  int idx = sa.GetInt(2);
181  char tmp[8] = {};
182  sprintf(tmp, "%c", idx);
183  self += cbC2U(tmp);
184  return sa.Return();
185  }
186  SQInteger wxString_GetChar(HSQUIRRELVM v)
187  {
188  StackHandler sa(v);
189  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
190  int idx = sa.GetInt(2);
191  return sa.Return((SQInteger)(((const char*)cbU2C(self))[idx]));
192  }
193  SQInteger wxString_Matches(HSQUIRRELVM v)
194  {
195  StackHandler sa(v);
196  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
197  wxString& other = *SqPlus::GetInstance<wxString,false>(v, 2);
198  return sa.Return(self.Matches(other));
199  }
200  SQInteger wxString_AfterFirst(HSQUIRRELVM v)
201  {
202  StackHandler sa(v);
203  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
204  SQInteger search_char = static_cast<SQInteger>( sa.GetInt(2) );
205  if ( !search_char ) // Probably it's a wxString
206  {
207  wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
208  #if wxCHECK_VERSION(3, 0, 0)
209  search_char = static_cast<SQInteger>( temp.GetChar(0).GetValue() );
210  #else
211  search_char = static_cast<SQInteger>( temp.GetChar(0) );
212  #endif
213  }
214  return SqPlus::ReturnCopy( v, self.AfterFirst( static_cast<wxChar>( search_char ) ) );
215  }
216  SQInteger wxString_AfterLast(HSQUIRRELVM v)
217  {
218  StackHandler sa(v);
219  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
220  SQInteger search_char = static_cast<SQInteger>( sa.GetInt(2) );
221  if ( !search_char ) // Probably it's a wxString
222  {
223  wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
224  #if wxCHECK_VERSION(3, 0, 0)
225  search_char = static_cast<SQInteger>( temp.GetChar(0).GetValue() );
226  #else
227  search_char = static_cast<SQInteger>( temp.GetChar(0) );
228  #endif
229  }
230  return SqPlus::ReturnCopy( v, self.AfterLast( static_cast<wxChar>( search_char ) ) );
231  }
232  SQInteger wxString_BeforeFirst(HSQUIRRELVM v)
233  {
234  StackHandler sa(v);
235  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
236  SQInteger search_char = static_cast<SQInteger>( sa.GetInt(2) );
237  if ( !search_char ) // Probably it's a wxString
238  {
239  wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
240  #if wxCHECK_VERSION(3, 0, 0)
241  search_char = static_cast<SQInteger>( temp.GetChar(0).GetValue() );
242  #else
243  search_char = static_cast<SQInteger>( temp.GetChar(0) );
244  #endif
245  }
246  return SqPlus::ReturnCopy( v, self.BeforeFirst( static_cast<wxChar>( search_char ) ) );
247  }
248  SQInteger wxString_BeforeLast(HSQUIRRELVM v)
249  {
250  StackHandler sa(v);
251  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
252  SQInteger search_char = static_cast<SQInteger>( sa.GetInt(2) );
253  if ( !search_char ) // Probably it's a wxString
254  {
255  wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
256  #if wxCHECK_VERSION(3, 0, 0)
257  search_char = static_cast<SQInteger>( temp.GetChar(0).GetValue() );
258  #else
259  search_char = static_cast<SQInteger>( temp.GetChar(0) );
260  #endif
261  }
262  return SqPlus::ReturnCopy( v, self.BeforeLast( static_cast<wxChar>( search_char ) ) );
263  }
264  SQInteger wxString_Replace(HSQUIRRELVM v)
265  {
266  StackHandler sa(v);
267  wxString& self = *SqPlus::GetInstance<wxString,false>(v, 1);
268  wxString from = *SqPlus::GetInstance<wxString,false>(v, 2);
269  wxString to = *SqPlus::GetInstance<wxString,false>(v, 3);
270  bool all = true;
271  if (sa.GetParamCount() == 4)
272  all = sa.GetBool(4);
273  return sa.Return((SQInteger)self.Replace(from, to, all));
274  }
275 
277 
279  {
280 #if wxCHECK_VERSION(3, 0, 0) && !wxUSE_STD_CONTAINERS
281  typedef const wxString& (wxArrayString::*wxArrayStringItem)(size_t nIndex) const;
282 #else
283  typedef wxString& (wxArrayString::*wxArrayStringItem)(size_t nIndex) const;
284 #endif
285  typedef size_t (wxArrayString::*wxArrayStrinGetCount)() const;
286 
288  // wxArrayString //
290  SqPlus::SQClassDef<wxArrayString>("wxArrayString").
291  emptyCtor().
292  func(&wxArrayString::Add, "Add").
293  staticFunc(&wxArrayString_Clear, "Clear").
294  staticFuncVarArgs(&wxArrayString_Index, "Index", "*").
295  func<wxArrayStrinGetCount>(&wxArrayString::GetCount, "GetCount").
296  func<wxArrayStringItem>(&wxArrayString::Item, "Item").
297  staticFuncVarArgs(&wxArrayString_SetItem, "SetItem", "*");
298 
300  // wxColour //
302  typedef void(wxColour::*WXC_SET)(const unsigned char, const unsigned char, const unsigned char, const unsigned char);
303  typedef bool (wxColour::*WXC_ISOK)() const;
304  SqPlus::SQClassDef<wxColour>("wxColour").
305  emptyCtor().
306  staticFuncVarArgs(&wxColour_OpToString, "_tostring", "").
307  func(&wxColour::Blue, "Blue").
308  func(&wxColour::Green, "Green").
309  func(&wxColour::Red, "Red").
310  func<WXC_ISOK>(&wxColour::IsOk, "IsOk").
311  func<WXC_SET>(&wxColour::Set, "Set");
312 
314  // wxFileName //
316  typedef void(wxFileName::*WXFN_ASSIGN_FN)(const wxFileName&);
317  typedef void(wxFileName::*WXFN_ASSIGN_STR)(const wxString&, wxPathFormat);
318  typedef wxString(wxFileName::*WXFN_GETPATH)(int, wxPathFormat)const;
319 #if wxCHECK_VERSION(3, 0, 0)
320  typedef bool(wxFileName::*WXFN_SETCWD)()const;
321 #else
322  typedef bool(wxFileName::*WXFN_SETCWD)();
323 #endif
324  typedef bool(wxFileName::*WXFN_ISFILEWRITEABLE)()const;
325 
326  SqPlus::SQClassDef<wxFileName>("wxFileName").
327  emptyCtor().
328  staticFuncVarArgs(&wxFileName_OpToString, "_tostring", "").
329  func<WXFN_ASSIGN_FN>(&wxFileName::Assign, "Assign").
330  func<WXFN_ASSIGN_STR>(&wxFileName::Assign, "Assign").
331  func(&wxFileName::AssignCwd, "AssignCwd").
332  func(&wxFileName::AssignDir, "AssignDir").
333  func(&wxFileName::AssignHomeDir, "AssignHomeDir").
334  func(&wxFileName::Clear, "Clear").
335  func(&wxFileName::ClearExt, "ClearExt").
336 // func(&wxFileName::GetCwd, "GetCwd").
337  func(&wxFileName::GetDirCount, "GetDirCount").
338  func(&wxFileName::GetDirs, "GetDirs").
339  func(&wxFileName::GetExt, "GetExt").
340  func(&wxFileName::GetFullName, "GetFullName").
341  func(&wxFileName::GetFullPath, "GetFullPath").
342  func(&wxFileName::GetLongPath, "GetLongPath").
343  func(&wxFileName::GetName, "GetName").
344  func<WXFN_GETPATH>(&wxFileName::GetPath, "GetPath").
345  func(&wxFileName::GetShortPath, "GetShortPath").
346  func(&wxFileName::GetVolume, "GetVolume").
347  func(&wxFileName::HasExt, "HasExt").
348  func(&wxFileName::HasName, "HasName").
349  func(&wxFileName::HasVolume, "HasVolume").
350  func(&wxFileName::InsertDir, "InsertDir").
351  func(&wxFileName::IsAbsolute, "IsAbsolute").
352  func(&wxFileName::IsOk, "IsOk").
353  func(&wxFileName::IsRelative, "IsRelative").
354  func(&wxFileName::IsDir, "IsDir").
355  func(&wxFileName::MakeAbsolute, "MakeAbsolute").
356  func(&wxFileName::MakeRelativeTo, "MakeRelativeTo").
357  func(&wxFileName::Normalize, "Normalize").
358  func(&wxFileName::PrependDir, "PrependDir").
359  func(&wxFileName::RemoveDir, "RemoveDir").
360  func(&wxFileName::RemoveLastDir, "RemoveLastDir").
361  func(&wxFileName::SameAs, "SameAs").
362  func<WXFN_SETCWD>(&wxFileName::SetCwd, "SetCwd").
363  func(&wxFileName::SetExt, "SetExt").
364  func(&wxFileName::SetEmptyExt, "SetEmptyExt").
365  func(&wxFileName::SetFullName, "SetFullName").
366  func(&wxFileName::SetName, "SetName").
367  func(&wxFileName::SetVolume, "SetVolume").
368  func<WXFN_ISFILEWRITEABLE>(&wxFileName::IsFileWritable,"IsFileWritable");
369 
371  // wxPoint //
373  SqPlus::SQClassDef<wxPoint>("wxPoint").
374  emptyCtor().
375  staticFuncVarArgs(&wxPoint_OpCmp, "_cmp", "*").
376  var(&wxPoint::x, "x").
377  var(&wxPoint::y, "y");
378 
380  // wxSize //
382  typedef void(wxSize::*WXS_SET)(int, int);
383  typedef void(wxSize::*WXS_SETH)(int);
384  typedef void(wxSize::*WXS_SETW)(int);
385  SqPlus::SQClassDef<wxSize>("wxSize").
386  emptyCtor().
387  func(&wxSize::GetWidth, "GetWidth").
388  func(&wxSize::GetHeight, "GetHeight").
389  func<WXS_SET>(&wxSize::Set, "Set").
390  func<WXS_SETH>(&wxSize::SetHeight, "SetHeight").
391  func<WXS_SETW>(&wxSize::SetWidth, "SetWidth");
392 
394  // wxString //
396  SqPlus::RegisterGlobal(&static_, "_");
397  SqPlus::RegisterGlobal(&static_T, "_T");
398 
399  typedef int(wxString::*WXSTR_FIRST_STR)(const wxString&)const;
400  typedef wxString&(wxString::*WXSTR_REMOVE_2)(size_t pos, size_t len);
401 
402  SqPlus::SQClassDef<wxString>("wxString").
403  emptyCtor().
404  staticFuncVarArgs(&wxString_OpAdd, "_add", "*").
405  staticFuncVarArgs(&wxString_OpCmp, "_cmp", "*").
406  staticFuncVarArgs(&wxString_OpToString, "_tostring", "").
407  func<WXSTR_FIRST_STR>(&wxString::First, "Find").
408  staticFuncVarArgs(&wxString_Matches, "Matches", "*").
409  staticFuncVarArgs(&wxString_AddChar, "AddChar", "n").
410  staticFuncVarArgs(&wxString_GetChar, "GetChar", "n").
411  func(&wxString::IsEmpty, "IsEmpty").
412  func(&wxString::Length, "Length").
413  func(&wxString::Length, "length").
414  func(&wxString::Length, "len").
415  func(&wxString::Length, "size").
416  func(&wxString::Lower, "Lower").
417  func(&wxString::LowerCase, "LowerCase").
418  func(&wxString::MakeLower, "MakeLower").
419  func(&wxString::Upper, "Upper").
420  func(&wxString::UpperCase, "UpperCase").
421  func(&wxString::MakeUpper, "MakeUpper").
422  func(&wxString::Mid, "Mid").
423  func<WXSTR_REMOVE_2>(&wxString::Remove, "Remove").
424  func(&wxString::RemoveLast, "RemoveLast").
425  staticFuncVarArgs(&wxString_Replace, "Replace", "*").
426  func(&wxString::Right, "Right").
427  staticFuncVarArgs(&wxString_AfterFirst, "AfterFirst", "*").
428  staticFuncVarArgs(&wxString_AfterLast, "AfterLast", "*").
429  staticFuncVarArgs(&wxString_BeforeFirst, "BeforeFirst", "*").
430  staticFuncVarArgs(&wxString_BeforeLast, "BeforeLast", "*");
431  }
432 };
void LowerCase()
SQInteger wxString_AfterLast(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:216
SQInteger wxString_BeforeFirst(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:232
SQInteger wxColour_OpToString(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:71
SQInteger wxString_OpCmp(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:160
void SetEmptyExt()
SQInteger wxString_AfterFirst(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:200
void Assign(const wxFileName &filepath)
void SetFullName(const wxString &fullname)
wxString Lower() const
bool SameAs(const wxFileName &filepath, wxPathFormat format=wxPATH_NATIVE) const
int Cmp(const wxString &s) const
bool IsOk() const
SQRESULT sq_throwerror(HSQUIRRELVM v, const SQChar *err)
Definition: sqapi.cpp:918
int GetWidth() const
int GetHeight() const
virtual unsigned char Red() const
wxString GetShortPath() const
void SetVolume(const wxString &volume)
SQInteger wxString_GetChar(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:186
SQInteger wxPoint_y(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:107
SQInteger wxArrayString_SetItem(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:54
bool HasName() const
size_t Length() const
wxCStrData c_str() const
#define _T(string)
void RemoveDir(size_t pos)
SQInteger wxString_AddChar(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:176
bool IsAbsolute(wxPathFormat format=wxPATH_NATIVE) const
void ClearExt()
wxString & Remove(size_t pos)
wxString GetName() const
void SetHeight(int height)
bool SetCwd() const
void PrependDir(const wxString &dir)
wxString static_(const SQChar *str)
Definition: sc_wxtypes.cpp:119
SQInteger wxString_BeforeLast(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:248
void Set(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=wxALPHA_OPAQUE)
bool IsDir() const
void Set(int width, int height)
DLLIMPORT const wxWX2MBbuf cbU2C(const wxString &str)
Return multibyte (C string) representation of the string.
Definition: globals.cpp:743
SQInteger wxString_OpAdd(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:131
const wxArrayString & GetDirs() const
SQInteger wxPoint_x(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:101
void UpperCase()
bool MakeRelativeTo(const wxString &pathBase=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
SQInteger wxString_Replace(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:264
wxString GetExt() const
void RemoveLastDir()
SQInteger wxString_Matches(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:193
value_type GetValue() const
const wxString & wxGetTranslation(const wxString &string, const wxString &domain=wxEmptyString)
wxString & RemoveLast(size_t n=1)
DLLIMPORT wxString cbC2U(const char *str)
Return str as a proper unicode-compatible string.
Definition: globals.cpp:733
SQInteger wxArrayString_GetCount(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:32
wxPathFormat
virtual unsigned char Green() const
wxString GetVolume() const
wxString & Item(size_t nIndex)
bool IsFileWritable() const
wxString GetLongPath() const
virtual unsigned char Blue() const
wxString Right(size_t count) const
SQInteger wxString_OpToString(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:169
void AssignDir(const wxString &dir, wxPathFormat format=wxPATH_NATIVE)
SQInteger wxPoint_OpCmp(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:94
int First(wxUniChar ch) const
bool HasVolume() const
void AssignCwd(const wxString &volume=wxEmptyString)
void SetWidth(int width)
void AssignHomeDir()
bool IsEmpty() const
wxString GetPath(int flags=wxPATH_GET_VOLUME, wxPathFormat format=wxPATH_NATIVE) const
bool InsertDir(size_t before, const wxString &dir)
wxString Upper() const
bool HasExt() const
virtual bool IsOk() const
bool IsRelative(wxPathFormat format=wxPATH_NATIVE) const
char SQChar
wxString GetFullName() const
SQInteger wxFileName_OpToString(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:82
void SetExt(const wxString &ext)
void Clear()
size_t Add(const wxString &str, size_t copies=1)
bool Normalize(int flags=wxPATH_NORM_ALL, const wxString &cwd=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
wxString static_T(const SQChar *str)
Definition: sc_wxtypes.cpp:125
size_t GetCount() const
void wxArrayString_Clear(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:25
wxUniChar GetChar(size_t n) const
bool MakeAbsolute(const wxString &cwd=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
int Printf(const wxString &pszFormat,...)
void SetName(const wxString &name)
wxString GetFullPath(wxPathFormat format=wxPATH_NATIVE) const
static wxString Format(const wxString &format,...)
wxString & MakeUpper()
wxString Mid(size_t first, size_t nCount=wxString::npos) const
void Register_wxTypes()
Definition: sc_wxtypes.cpp:278
SQInteger wxArrayString_Index(HSQUIRRELVM v)
Definition: sc_wxtypes.cpp:40
wxString & MakeLower()
size_t GetDirCount() const