mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-03-15 13:10:07 +01:00
cleanups and tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -239,11 +239,7 @@ class FunctionDef(BaseDef):
|
||||
if element is not None:
|
||||
self.extract(element)
|
||||
|
||||
|
||||
def releaseGIL(self, release=True):
|
||||
self.pyReleaseGIL = release
|
||||
|
||||
|
||||
|
||||
def extract(self, element):
|
||||
super(FunctionDef, self).extract(element)
|
||||
self.type = flattenNode(element.find('type'))
|
||||
@@ -257,13 +253,23 @@ class FunctionDef(BaseDef):
|
||||
# briefDoc for this ParamDef object.
|
||||
|
||||
|
||||
def releaseGIL(self, release=True):
|
||||
self.pyReleaseGIL = release
|
||||
|
||||
|
||||
def setCppCode(self, code):
|
||||
"""
|
||||
Use the given C++ code instead of that automatically generated by the
|
||||
back-end. This is similar to adding a new C++ method, except it uses
|
||||
info we've alread received from the source XML such as the argument
|
||||
types and names, docstring, etc.
|
||||
"""
|
||||
self.cppCode = code
|
||||
|
||||
|
||||
def checkForOverload(self, methods):
|
||||
for m in methods:
|
||||
if isinstance(m, MethodDef) and m.name == self.name:
|
||||
if isinstance(m, FunctionDef) and m.name == self.name:
|
||||
m.overloads.append(self)
|
||||
m.isOverloaded = self.isOverloaded = True
|
||||
return True
|
||||
|
||||
@@ -32,7 +32,7 @@ def removeWxPrefixes(node):
|
||||
item.pyName = item.name[2:]
|
||||
item.wxDropped = True
|
||||
if item.name.startswith('wxEVT_'):
|
||||
# give these theire actual name so the auto-renamer won't touch them
|
||||
# give these their actual name so the auto-renamer won't touch them
|
||||
item.pyName = item.name
|
||||
|
||||
|
||||
@@ -69,12 +69,13 @@ def fixEventClass(klass):
|
||||
Add the extra stuff that an event class needs that are lacking from the
|
||||
interface headers.
|
||||
"""
|
||||
assert isinstance(klass, extractors.ClassDef)
|
||||
if klass.name != 'wxEvent':
|
||||
# Clone() in wxEvent is pure virtual, so we need to let the back-end
|
||||
# know that the other event classes have an implementation for it so
|
||||
# it won't think that they are abstract classes too.
|
||||
wig = extractors.WigCode("virtual wxEvent* Clone();")
|
||||
klass.addItem(wig)
|
||||
if not klass.findItem('Clone'):
|
||||
klass.addPublic('virtual wxEvent* Clone() const /Factory/;')
|
||||
|
||||
# Add a private assignment operator so the back-end (if it's watching out
|
||||
# for this) won't try to make copies by assignment.
|
||||
@@ -107,7 +108,8 @@ def removeVirtuals(klass):
|
||||
|
||||
def addWindowVirtuals(klass):
|
||||
"""
|
||||
|
||||
Either turn the virtual flag back on or add a delcaration for the subset of
|
||||
the C++ virtuals in wxWindow classes that we will be supporting.
|
||||
"""
|
||||
publicWindowVirtuals = [
|
||||
('GetClientAreaOrigin', 'wxPoint GetClientAreaOrigin() const'),
|
||||
|
||||
Reference in New Issue
Block a user