mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Some fixes in the generation of the pi files related to default parameter values.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,18 +51,18 @@ def run():
|
||||
else:
|
||||
func.find('defaultVal').default = 'wxEmptyString'
|
||||
|
||||
c.addCppMethod('long', 'ReadInt', '(const wxString& key, long defaultVal = 0)', """\
|
||||
c.addCppMethod('long', 'ReadInt', '(const wxString& key, long defaultVal=0)', """\
|
||||
long rv;
|
||||
self->Read(*key, &rv, defaultVal);
|
||||
return rv;
|
||||
""")
|
||||
c.addCppMethod('double', 'ReadFloat', '(const wxString& key, double defaultVal = 0.0)', """\
|
||||
c.addCppMethod('double', 'ReadFloat', '(const wxString& key, double defaultVal=0.0)', """\
|
||||
double rv;
|
||||
self->Read(*key, &rv, defaultVal);
|
||||
return rv;
|
||||
""")
|
||||
c.find('ReadBool').ignore()
|
||||
c.addCppMethod('bool', 'ReadBool', '(const wxString& key, bool defaultVal = false)', """\
|
||||
c.addCppMethod('bool', 'ReadBool', '(const wxString& key, bool defaultVal=false)', """\
|
||||
bool rv;
|
||||
self->Read(*key, &rv, defaultVal);
|
||||
return rv;
|
||||
|
||||
@@ -38,15 +38,18 @@ def addGetAllFormats(klass, pureVirtual=False):
|
||||
m = klass.findItem('GetAllFormats')
|
||||
if m:
|
||||
m.ignore()
|
||||
|
||||
pyArgs = '(dir=Get)' if klass.name == 'wxDataObject' else '(dir=DataObject.Get)'
|
||||
|
||||
klass.addCppMethod('PyObject*', 'GetAllFormats', '(wxDataObject::Direction dir=wxDataObject::Get)',
|
||||
cppSignature='void (wxDataFormat* formats, Direction dir)',
|
||||
pyArgsString=pyArgs,
|
||||
isVirtual=True,
|
||||
isPureVirtual=pureVirtual,
|
||||
isConst=True,
|
||||
doc="""\
|
||||
Returns a list of wx.DataFormat objects which this data object supports
|
||||
transfering in the given direction.""",
|
||||
Returns a list of wx.DataFormat objects which this data object
|
||||
supports transfering in the given direction.""",
|
||||
body="""\
|
||||
size_t count = self->GetFormatCount(dir);
|
||||
wxDataFormat* formats = new wxDataFormat[count];
|
||||
|
||||
@@ -61,7 +61,8 @@ def run():
|
||||
|
||||
# Doxygen doesn't declare the base class (the template parameter in
|
||||
# this case) so we can just add it here.
|
||||
scrolled.bases.append('T')
|
||||
# FIXED in Dox 1.8.x
|
||||
#scrolled.bases.append('T')
|
||||
|
||||
scrolled.addPrivateCopyCtor()
|
||||
scrolled.addPrivateAssignOp()
|
||||
|
||||
@@ -445,8 +445,8 @@ class FunctionDef(BaseDef):
|
||||
# is there a default value?
|
||||
default = ''
|
||||
if '=' in arg:
|
||||
default = arg.split('=')[1]
|
||||
arg = arg.split('=')[0]
|
||||
default = arg.split('=')[1].strip()
|
||||
arg = arg.split('=')[0].strip()
|
||||
if default in defValueMap:
|
||||
default = defValueMap.get(default)
|
||||
else:
|
||||
|
||||
@@ -25,6 +25,7 @@ from etgtools.tweaker_tools import removeWxPrefix, magicMethods, \
|
||||
|
||||
|
||||
phoenixRoot = os.path.abspath(os.path.split(__file__)[0]+'/..')
|
||||
|
||||
header = """\
|
||||
# -*- coding: utf-8 -*-
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -38,6 +39,7 @@ header = """\
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
"""
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class PiWrapperGenerator(generators.WrapperGeneratorBase):
|
||||
|
||||
Reference in New Issue
Block a user