Update wxWidgets to 3.1.7

This commit is contained in:
Scott Talbert
2022-06-07 22:51:42 -04:00
committed by Robin Dunn
parent b33ede2106
commit 46f1c1759f
10 changed files with 133 additions and 15 deletions

View File

@@ -62,5 +62,5 @@ VER_FLAGS = "a1" # wxPython release flags
# The version numbers of wxWidgets to be used in the build
wxVER_MAJOR = 3
wxVER_MINOR = 1
wxVER_RELEASE = 6 # only used when wxVER_MINOR is an odd value
wxVER_RELEASE = 7 # only used when wxVER_MINOR is an odd value

View File

@@ -1261,7 +1261,16 @@
"FileCtrlNameStr":"wx.",
"FileDataObject":"wx.",
"FileDialog":"wx.",
"FileDialogButton":"wx.",
"FileDialogCheckBox":"wx.",
"FileDialogChoice":"wx.",
"FileDialogCustomControl":"wx.",
"FileDialogCustomize":"wx.",
"FileDialogCustomizeHook":"wx.",
"FileDialogNameStr":"wx.",
"FileDialogRadioButton":"wx.",
"FileDialogStaticText":"wx.",
"FileDialogTextCtrl":"wx.",
"FileDirPickerEvent":"wx.",
"FileDropTarget":"wx.",
"FileHistory":"wx.",
@@ -6832,6 +6841,7 @@
"SetDisplayName":"wx.",
"SetEnv":"wx.",
"SettableHeaderColumn":"wx.",
"SharedClientDataContainer":"wx.",
"Shell":"wx.",
"ShowEffect":"wx.",
"ShowEvent":"wx.",
@@ -7903,6 +7913,8 @@
"wxEVT_GRID_RANGE_SELECT":"wx.grid.",
"wxEVT_GRID_RANGE_SELECTED":"wx.grid.",
"wxEVT_GRID_RANGE_SELECTING":"wx.grid.",
"wxEVT_GRID_ROW_AUTO_SIZE":"wx.grid.",
"wxEVT_GRID_ROW_MOVE":"wx.grid.",
"wxEVT_GRID_ROW_SIZE":"wx.grid.",
"wxEVT_GRID_SELECT_CELL":"wx.grid.",
"wxEVT_GRID_TABBING":"wx.grid.",
@@ -8212,6 +8224,7 @@
"wxEVT_WEBVIEW_NAVIGATING":"wx.html2.",
"wxEVT_WEBVIEW_NEWWINDOW":"wx.html2.",
"wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED":"wx.html2.",
"wxEVT_WEBVIEW_SCRIPT_RESULT":"wx.html2.",
"wxEVT_WEBVIEW_TITLE_CHANGED":"wx.html2.",
"wxEVT_WINDOW_MODAL_DIALOG_CLOSED":"wx.",
"wxEVT_WIZARD_BEFORE_PAGE_CHANGED":"wx.adv.",

View File

@@ -196,6 +196,7 @@ INCLUDES = [ # base and core stuff
'dirdlg',
'dirctrl',
'filedlg',
'filedlgcustomize',
'frame',
'msgdlg',
'richmsgdlg',

View File

@@ -17,7 +17,8 @@ DOCSTRING = ""
# The classes and/or the basename of the Doxygen XML files to be processed by
# this script.
ITEMS = [ 'wxClientDataContainer' ]
ITEMS = [ 'wxClientDataContainer',
'wxSharedClientDataContainer' ]
#---------------------------------------------------------------------------

View File

@@ -100,11 +100,6 @@ def run():
#endif
""")
# Missing in 3.1.6
module.addItem(etgtools.WigCode("""\
wxEventType wxEVT_FULLSCREEN /PyName=wxEVT_FULLSCREEN/;
"""))
module.addPyClass('PyEventBinder', ['object'],
doc="""\

86
etg/filedlgcustomize.py Normal file
View File

@@ -0,0 +1,86 @@
#---------------------------------------------------------------------------
# Name: etg/filedlgcustomize.py
# Author: Scott Talbert
#
# Created: 07-Jun-2022
# Copyright: (c) 2022 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
MODULE = "_core"
NAME = "filedlgcustomize" # 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 = [ 'wxFileDialogButton',
'wxFileDialogChoice',
'wxFileDialogCheckBox',
'wxFileDialogCustomControl',
'wxFileDialogCustomize',
'wxFileDialogCustomizeHook',
'wxFileDialogRadioButton',
'wxFileDialogStaticText',
'wxFileDialogTextCtrl',
]
#---------------------------------------------------------------------------
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('wxFileDialogButton')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
c = module.find('wxFileDialogChoice')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
c = module.find('wxFileDialogCheckBox')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
c = module.find('wxFileDialogCustomControl')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
c = module.find('wxFileDialogCustomize')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
c = module.find('wxFileDialogCustomizeHook')
assert isinstance(c, etgtools.ClassDef)
c = module.find('wxFileDialogRadioButton')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
c = module.find('wxFileDialogStaticText')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
c = module.find('wxFileDialogTextCtrl')
assert isinstance(c, etgtools.ClassDef)
c.noDefCtor = True
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

View File

@@ -46,6 +46,8 @@ def run():
c = module.find('wxPropertyGridPageState')
tools.ignoreConstOverloads(c)
# Incorrectly documented in 3.1.7
c.find('GetColumnFullWidth.p').type = 'wxPGProperty *'
module.find('wxPG_IT_CHILDREN').ignore()

View File

@@ -103,13 +103,6 @@ def run():
'wxVersionInfo': 'wxVersionInfo()',
})
# Missing in 3.1.6
module.addItem(etgtools.WigCode("""\
wxEventType wxEVT_WEBVIEW_FULLSCREEN_CHANGED /PyName=wxEVT_WEBVIEW_FULLSCREEN_CHANGED/;
wxEventType wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED /PyName=wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED/;
wxEventType wxEVT_WEBVIEW_SCRIPT_RESULT /PyName=wxEVT_WEBVIEW_SCRIPT_RESULT/;
"""))
c = module.find('wxWebView')
assert isinstance(c, etgtools.ClassDef)
tools.fixWindowClass(c)

View File

@@ -0,0 +1,27 @@
import unittest
from unittests import wtc
import wx
#---------------------------------------------------------------------------
class filedlgcustomize_Tests(wtc.WidgetTestCase):
def test_filedlgcustomize1(self):
class MyFileDialogCustomizeHook(wx.FileDialogCustomizeHook):
def __init__(self):
super().__init__()
self.add_called = False
def AddCustomControls(self, customizer):
self.add_called = True
hook = MyFileDialogCustomizeHook()
dlg = wx.FileDialog(None, 'Save Document', '', 'file.my')
dlg.SetCustomizeHook(hook)
wx.CallLater(250, dlg.EndModal, wx.ID_OK)
dlg.ShowModal()
assert(hook.add_called)
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()