mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Add ability to make global name strings from a wchar_t constant
This commit is contained in:
@@ -6492,6 +6492,7 @@
|
|||||||
"TheMimeTypesManager":"wx.",
|
"TheMimeTypesManager":"wx.",
|
||||||
"ThePenList":"wx.",
|
"ThePenList":"wx.",
|
||||||
"TimePickerCtrl":"wx.adv.",
|
"TimePickerCtrl":"wx.adv.",
|
||||||
|
"TimePickerCtrlNameStr":"wx.adv.",
|
||||||
"TimeSpan":"wx.",
|
"TimeSpan":"wx.",
|
||||||
"TimeZone":"wx.DateTime.",
|
"TimeZone":"wx.DateTime.",
|
||||||
"Timer":"wx.",
|
"Timer":"wx.",
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ def run():
|
|||||||
c = module.find('wxTimePickerCtrl')
|
c = module.find('wxTimePickerCtrl')
|
||||||
assert isinstance(c, etgtools.ClassDef)
|
assert isinstance(c, etgtools.ClassDef)
|
||||||
tools.fixWindowClass(c)
|
tools.fixWindowClass(c)
|
||||||
|
module.addGlobalStr('wxTimePickerCtrlNameStr', c, wide=True)
|
||||||
|
|
||||||
|
|
||||||
# ignore the return value and set the parameters to be outputs
|
# ignore the return value and set the parameters to be outputs
|
||||||
|
|||||||
@@ -1596,10 +1596,13 @@ class ModuleDef(BaseDef):
|
|||||||
return pc
|
return pc
|
||||||
|
|
||||||
|
|
||||||
def addGlobalStr(self, name, before=None):
|
def addGlobalStr(self, name, before=None, wide=False):
|
||||||
if self.findItem(name):
|
if self.findItem(name):
|
||||||
self.findItem(name).ignore()
|
self.findItem(name).ignore()
|
||||||
gv = GlobalVarDef(type='const char*', name=name)
|
if wide:
|
||||||
|
gv = GlobalVarDef(type='const wchar_t*', name=name)
|
||||||
|
else:
|
||||||
|
gv = GlobalVarDef(type='const char*', name=name)
|
||||||
if before is None:
|
if before is None:
|
||||||
self.addItem(gv)
|
self.addItem(gv)
|
||||||
elif isinstance(before, int):
|
elif isinstance(before, int):
|
||||||
|
|||||||
@@ -1302,7 +1302,7 @@ def guessTypeFloat(v):
|
|||||||
def guessTypeStr(v):
|
def guessTypeStr(v):
|
||||||
if hasattr(v, 'value') and '"' in v.value:
|
if hasattr(v, 'value') and '"' in v.value:
|
||||||
return True
|
return True
|
||||||
for t in ['wxString', 'wxChar', 'char*', 'char *']:
|
for t in ['wxString', 'wxChar', 'char*', 'char *', 'wchar_t*', 'wchar_t *']:
|
||||||
if t in v.type:
|
if t in v.type:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user