27 static_assert(wxMinimumVersion<2,8,12>::eval,
"wxWidgets 2.8.12 is required");
29 wxArrayString&
self = *SqPlus::GetInstance<wxArrayString,false>(v, 1);
34 static_assert(wxMinimumVersion<2,8,12>::eval,
"wxWidgets 2.8.12 is required");
36 wxArrayString&
self = *SqPlus::GetInstance<wxArrayString,false>(v, 1);
37 return sa.Return((SQInteger)
self.GetCount());
42 static_assert(wxMinimumVersion<2,8,12>::eval,
"wxWidgets 2.8.12 is required");
44 wxArrayString&
self = *SqPlus::GetInstance<wxArrayString,false>(v, 1);
45 wxString inpstr = *SqPlus::GetInstance<wxString,false>(v, 2);
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));
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);
74 wxColour&
self = *SqPlus::GetInstance<wxColour,false>(v, 1);
76 return sa.Return((
const SQChar*)str.mb_str(wxConvUTF8));
85 wxFileName&
self = *SqPlus::GetInstance<wxFileName,false>(v, 1);
86 return sa.Return((
const SQChar*)
self.GetFullPath().mb_str(wxConvUTF8));
97 wxPoint&
self = *SqPlus::GetInstance<wxPoint,false>(v, 1);
98 wxPoint& other = *SqPlus::GetInstance<wxPoint,false>(v, 2);
99 return sa.Return(
self==other);
104 wxPoint&
self = *SqPlus::GetInstance<wxPoint,false>(v, 1);
105 return sa.Return((SQInteger)(
self.x));
110 wxPoint&
self = *SqPlus::GetInstance<wxPoint,false>(v, 1);
111 return sa.Return((SQInteger)(
self.y));
135 wxString& str1 = *SqPlus::GetInstance<wxString,false>(v, 1);
136 if (sa.GetType(2) == OT_INTEGER)
144 else if (sa.GetType(2) == OT_FLOAT)
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)
152 wxString *str2 = SqPlus::GetInstance<wxString,false>(v, 2);
154 return sa.ThrowError(
"Second paramter is not a wxString instance!");
155 result = str1 + *str2;
157 return SqPlus::ReturnCopy(v, result);
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)));
172 wxString&
self = *SqPlus::GetInstance<wxString,false>(v, 1);
173 return sa.Return((
const SQChar*)
self.mb_str(wxConvUTF8));
179 wxString&
self = *SqPlus::GetInstance<wxString,false>(v, 1);
180 int idx = sa.GetInt(2);
182 sprintf(tmp,
"%c", idx);
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]));
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));
203 wxString&
self = *SqPlus::GetInstance<wxString,false>(v, 1);
204 SQInteger search_char =
static_cast<SQInteger
>( sa.GetInt(2) );
207 wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
208 #if wxCHECK_VERSION(3, 0, 0) 211 search_char =
static_cast<SQInteger
>( temp.
GetChar(0) );
214 return SqPlus::ReturnCopy( v,
self.AfterFirst( static_cast<wxChar>( search_char ) ) );
219 wxString&
self = *SqPlus::GetInstance<wxString,false>(v, 1);
220 SQInteger search_char =
static_cast<SQInteger
>( sa.GetInt(2) );
223 wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
224 #if wxCHECK_VERSION(3, 0, 0) 227 search_char =
static_cast<SQInteger
>( temp.
GetChar(0) );
230 return SqPlus::ReturnCopy( v,
self.AfterLast( static_cast<wxChar>( search_char ) ) );
235 wxString&
self = *SqPlus::GetInstance<wxString,false>(v, 1);
236 SQInteger search_char =
static_cast<SQInteger
>( sa.GetInt(2) );
239 wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
240 #if wxCHECK_VERSION(3, 0, 0) 243 search_char =
static_cast<SQInteger
>( temp.
GetChar(0) );
246 return SqPlus::ReturnCopy( v,
self.BeforeFirst( static_cast<wxChar>( search_char ) ) );
251 wxString&
self = *SqPlus::GetInstance<wxString,false>(v, 1);
252 SQInteger search_char =
static_cast<SQInteger
>( sa.GetInt(2) );
255 wxString& temp = *SqPlus::GetInstance<wxString,false>(v, 2);
256 #if wxCHECK_VERSION(3, 0, 0) 259 search_char =
static_cast<SQInteger
>( temp.
GetChar(0) );
262 return SqPlus::ReturnCopy( v,
self.BeforeLast( static_cast<wxChar>( search_char ) ) );
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);
271 if (sa.GetParamCount() == 4)
273 return sa.Return((SQInteger)
self.Replace(from, to, all));
280 #if wxCHECK_VERSION(3, 0, 0) && !wxUSE_STD_CONTAINERS 283 typedef wxString& (
wxArrayString::*wxArrayStringItem)(
size_t nIndex)
const;
285 typedef size_t (
wxArrayString::*wxArrayStrinGetCount)()
const;
290 SqPlus::SQClassDef<wxArrayString>(
"wxArrayString").
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").
319 #if wxCHECK_VERSION(3, 0, 0) 320 typedef bool(
wxFileName::*WXFN_SETCWD)()
const;
324 typedef bool(
wxFileName::*WXFN_ISFILEWRITEABLE)()
const;
326 SqPlus::SQClassDef<wxFileName>(
"wxFileName").
330 func<WXFN_ASSIGN_STR>(&wxFileName::Assign,
"Assign").
373 SqPlus::SQClassDef<wxPoint>(
"wxPoint").
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").
396 SqPlus::RegisterGlobal(&
static_,
"_");
397 SqPlus::RegisterGlobal(&
static_T,
"_T");
399 typedef int(wxString::*WXSTR_FIRST_STR)(
const wxString&)
const;
400 typedef wxString&(wxString::*WXSTR_REMOVE_2)(
size_t pos,
size_t len);
402 SqPlus::SQClassDef<wxString>(
"wxString").
SQInteger wxString_AfterLast(HSQUIRRELVM v)
SQInteger wxString_BeforeFirst(HSQUIRRELVM v)
SQInteger wxColour_OpToString(HSQUIRRELVM v)
SQInteger wxString_OpCmp(HSQUIRRELVM v)
SQInteger wxString_AfterFirst(HSQUIRRELVM v)
void Assign(const wxFileName &filepath)
void SetFullName(const wxString &fullname)
bool SameAs(const wxFileName &filepath, wxPathFormat format=wxPATH_NATIVE) const
int Cmp(const wxString &s) const
SQRESULT sq_throwerror(HSQUIRRELVM v, const SQChar *err)
virtual unsigned char Red() const
wxString GetShortPath() const
void SetVolume(const wxString &volume)
SQInteger wxString_GetChar(HSQUIRRELVM v)
SQInteger wxPoint_y(HSQUIRRELVM v)
SQInteger wxArrayString_SetItem(HSQUIRRELVM v)
void RemoveDir(size_t pos)
SQInteger wxString_AddChar(HSQUIRRELVM v)
bool IsAbsolute(wxPathFormat format=wxPATH_NATIVE) const
wxString & Remove(size_t pos)
void SetHeight(int height)
void PrependDir(const wxString &dir)
wxString static_(const SQChar *str)
SQInteger wxString_BeforeLast(HSQUIRRELVM v)
void Set(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=wxALPHA_OPAQUE)
void Set(int width, int height)
DLLIMPORT const wxWX2MBbuf cbU2C(const wxString &str)
Return multibyte (C string) representation of the string.
SQInteger wxString_OpAdd(HSQUIRRELVM v)
const wxArrayString & GetDirs() const
SQInteger wxPoint_x(HSQUIRRELVM v)
bool MakeRelativeTo(const wxString &pathBase=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
SQInteger wxString_Replace(HSQUIRRELVM v)
SQInteger wxString_Matches(HSQUIRRELVM v)
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.
SQInteger wxArrayString_GetCount(HSQUIRRELVM v)
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)
void AssignDir(const wxString &dir, wxPathFormat format=wxPATH_NATIVE)
SQInteger wxPoint_OpCmp(HSQUIRRELVM v)
int First(wxUniChar ch) const
void AssignCwd(const wxString &volume=wxEmptyString)
wxString GetPath(int flags=wxPATH_GET_VOLUME, wxPathFormat format=wxPATH_NATIVE) const
bool InsertDir(size_t before, const wxString &dir)
virtual bool IsOk() const
bool IsRelative(wxPathFormat format=wxPATH_NATIVE) const
wxString GetFullName() const
SQInteger wxFileName_OpToString(HSQUIRRELVM v)
void SetExt(const wxString &ext)
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)
void wxArrayString_Clear(HSQUIRRELVM v)
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 Mid(size_t first, size_t nCount=wxString::npos) const
SQInteger wxArrayString_Index(HSQUIRRELVM v)
size_t GetDirCount() const