Add, and ignore for now, some new things in grid

This commit is contained in:
Robin Dunn
2020-07-08 16:51:27 -07:00
parent 9b682d61c4
commit bd6733afa2

View File

@@ -33,7 +33,11 @@ ITEMS = [ 'wxGridCellCoords',
'wxGridCellFloatRenderer',
'wxGridCellNumberRenderer',
'wxGridActivationResult',
'wxGridActivationSource',
'wxGridCellEditor',
'wxGridCellActivatableEditor',
'wxGridCellTextEditor',
'wxGridCellDateEditor',
'wxGridCellAutoWrapStringEditor',
@@ -277,6 +281,20 @@ def run():
module.addPyCode("PyGridCellRenderer = wx.deprecated(GridCellRenderer, 'Use GridCellRenderer instead.')")
#-----------------------------------------------------------------
c = module.find('wxGridActivationResult')
c.ignore() # FIXME
c.addPrivateAssignOp()
c.instanceCode = 'sipCpp = new wxGridActivationResult::DoNothing();'
c = module.find('wxGridActivationSource')
c.ignore() # FIXME
c.noDefCtor = True
c.addPrivateAssignOp()
#-----------------------------------------------------------------
def fixEditorClass(name):
klass = module.find(name)
@@ -373,14 +391,18 @@ def run():
c.find('~wxGridCellEditor').ignore(False)
c.find('Clone').factory = True
tools.fixRefCountedClass(c)
c.find('TryActivate').ignore() # FIXME: remove this when the compilations issues with wxGridActivationResult is fixed
c.find('TryActivate').ignore() # FIXME: remove this when the compilation issues with wxGridActivationResult is fixed
c = module.find('wxGridCellActivatableEditor')
c.ignore() # FIXME: see above
c = module.find('wxGridCellChoiceEditor')
c.find('wxGridCellChoiceEditor').findOverload('count').ignore()
for name in ITEMS:
if 'Cell' in name and 'Editor' in name:
if 'Cell' in name and 'Editor' in name and name != 'wxGridCellActivatableEditor':
fixEditorClass(name)
module.addPyCode("PyGridCellEditor = wx.deprecated(GridCellEditor, 'Use GridCellEditor instead.')")