mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 05:20:08 +01:00
Add propgridmanager
This commit is contained in:
@@ -2677,6 +2677,9 @@
|
||||
"PropertyGridInterface":"wx.propgrid.",
|
||||
"PropertyGridIterator":"wx.propgrid.",
|
||||
"PropertyGridIteratorBase":"wx.propgrid.",
|
||||
"PropertyGridManager":"wx.propgrid.",
|
||||
"PropertyGridManagerNameStr":"wx.propgrid.",
|
||||
"PropertyGridPage":"wx.propgrid.",
|
||||
"PropertyGridPageState":"wx.propgrid.",
|
||||
"PseudoDC":"wx.adv.",
|
||||
"PyApp":"wx.",
|
||||
|
||||
@@ -30,6 +30,7 @@ INCLUDES = [ 'propgridproperty',
|
||||
'propgrid',
|
||||
'propgridprops',
|
||||
'propgridadvprops',
|
||||
'propgridmanager',
|
||||
]
|
||||
|
||||
|
||||
|
||||
65
etg/propgridmanager.py
Normal file
65
etg/propgridmanager.py
Normal file
@@ -0,0 +1,65 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Name: etg/propgridmanager.py
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 31-Aug-2016
|
||||
# Copyright: (c) 2016 by Total Control Software
|
||||
# License: wxWindows License
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_propgrid"
|
||||
NAME = "propgridmanager" # Base name of the file to generate to for this script
|
||||
DOCSTRING = ""
|
||||
|
||||
# The classes and/or the basename of the Doxygen XML files to be processed by
|
||||
# this script.
|
||||
ITEMS = [ 'wxPropertyGridPage',
|
||||
'wxPropertyGridManager',
|
||||
]
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def run():
|
||||
# Parse the XML file(s) building a collection of Extractor objects
|
||||
module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING)
|
||||
etgtools.parseDoxyXML(module, ITEMS)
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# Tweak the parsed meta objects in the module object as needed for
|
||||
# customizing the generated code and docstrings.
|
||||
|
||||
|
||||
c = module.find('wxPropertyGridPage')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
tools.ignoreConstOverloads(c)
|
||||
|
||||
|
||||
module.addGlobalStr('wxPropertyGridManagerNameStr', c)
|
||||
|
||||
c = module.find('wxPropertyGridManager')
|
||||
tools.fixWindowClass(c, hideVirtuals=False, ignoreProtected=False)
|
||||
tools.ignoreConstOverloads(c)
|
||||
|
||||
|
||||
# wxPGPropArg is a typedef for "const wxPGPropArgCls&" so having the
|
||||
# wrappers treat it as a normal type can be problematic. ("new cannot be
|
||||
# applied to a reference type", etc.) Let's just ignore it an replace it
|
||||
# everywhere for the real type.
|
||||
for item in module.allItems():
|
||||
if hasattr(item, 'type') and item.type == 'wxPGPropArg':
|
||||
item.type = 'const wxPGPropArgCls &'
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
||||
Submodule ext/wxWidgets updated: 1d5119acf5...354897cd13
16
unittests/test_propgridmanager.py
Normal file
16
unittests/test_propgridmanager.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import unittest
|
||||
from unittests import wtc
|
||||
import wx
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class propgridmanager_Tests(wtc.WidgetTestCase):
|
||||
|
||||
# TODO: Remove this test and add real ones.
|
||||
def test_propgridmanager1(self):
|
||||
self.fail("Unit tests for propgridmanager not implemented yet.")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user