Add mapped type for wxPGVariant and switch all wxVariant in propgrid to this type. This allows the variant types only available in propgrid to be used the same as the core variant types.

This commit is contained in:
Robin Dunn
2017-02-24 14:32:40 -08:00
parent 19930c9bbd
commit 918a70f5a4
10 changed files with 320 additions and 1 deletions

View File

@@ -23,7 +23,8 @@ ITEMS = [ ]
# The list of other ETG scripts and back-end generator modules that are
# included as part of this module. These should all be items that are put in
# the wxWidgets "propgrid" library in a multi-lib build.
INCLUDES = [ 'propgriddefs',
INCLUDES = [ 'pgvariant',
'propgriddefs',
'propgridproperty',
'propgrideditors',
'propgridpagestate',

View File

@@ -87,6 +87,13 @@ def run():
""")
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)

View File

@@ -52,6 +52,13 @@ def run():
m.find('value').default = 'wxArrayString()'
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)

View File

@@ -45,6 +45,13 @@ def run():
tools.fixWindowClass(c)
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)

View File

@@ -148,6 +148,14 @@ def run():
item.type = 'const wxPGPropArgCls &'
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)

View File

@@ -52,6 +52,13 @@ def run():
module.find('wxPG_IT_CHILDREN').ignore()
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)

View File

@@ -162,6 +162,13 @@ def run():
""")
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)

View File

@@ -91,6 +91,13 @@ def run():
tools.fixWindowClass(c, hideVirtuals=False, ignoreProtected=False)
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)