Add tweaks for things like output args, ownership transfers, etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-11-01 22:51:13 +00:00
parent d3bc68a180
commit 8829d26dde
12 changed files with 166 additions and 7 deletions

View File

@@ -206,6 +206,21 @@ def fixBookctrlClass(klass, treeBook=False):
virtual bool InsertPage(size_t index, wxWindow * page, const wxString & text,
bool select = false, int imageId = NO_IMAGE);
"""))
def fixHtmlSetFonts(klass):
# Use wxArrayInt instead of a C array of ints.
m = klass.find('SetFonts')
m.find('sizes').type = 'const wxArrayInt&'
m.find('sizes').default = ''
m.argsString = '(const wxString & normal_face, const wxString & fixed_face, const wxArrayInt& sizes)'
m.setCppCode("""\
if (sizes->GetCount() != 7) {
wxPyErr_SetString(PyExc_ValueError, "Sequence of 7 integers expected.");
return;
}
self->SetFonts(*normal_face, *fixed_face, &sizes->Item(0));
""")
def removeVirtuals(klass):