Added wxArtProvider and other changes to match CVS updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-06-14 23:31:53 +00:00
parent 6fc4b6483f
commit 72797a7da3
12 changed files with 1478 additions and 4 deletions

View File

@@ -1571,6 +1571,29 @@ def wxPyTypeCast(obj, typeStr):
#----------------------------------------------------------------------------
_wxCallAfterId = None
def wxCallAfter(callable, *args, **kw):
"""
Call the specified function after the current and pending event
handlers have been completed.
"""
app = wxGetApp()
assert app, 'No wxApp created yet'
global _wxCallAfterId
if _wxCallAfterId is None:
_wxCallAfterId = wxNewId()
app.Connect(-1, -1, _wxCallAfterId,
lambda event: apply(event.callable, event.args, event.kw) )
evt = wxPyEvent()
evt.SetEventType(_wxCallAfterId)
evt.callable = callable
evt.args = args
evt.kw = kw
wxPostEvent(app, evt)
#----------------------------------------------------------------------
class wxPyDeadObjectError(AttributeError):
pass