X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f90df854ed9630ab60ac7729287807e4d1d8286..dafb483b3a1f273e79bae8cbc7eb0bab2387239b:/utils/wxPython/src/_extras.py?ds=sidebyside diff --git a/utils/wxPython/src/_extras.py b/utils/wxPython/src/_extras.py index 564f3aa353..cdff6809b3 100644 --- a/utils/wxPython/src/_extras.py +++ b/utils/wxPython/src/_extras.py @@ -472,6 +472,15 @@ def EVT_TREE_KEY_DOWN(win, id, func): def EVT_TREE_DELETE_ITEM(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func) +def EVT_TREE_ITEM_ACTIVATED(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, func) + +def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, func) + +def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func) + # wxSpinButton def EVT_SPIN_UP(win, id, func): @@ -772,7 +781,16 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- # DO NOT hold any other references to this object. This is how we know when -# to cleanup system resources that wxWin is holding... +# to cleanup system resources that wxWin is holding. When this module is +# unloaded, the refcount on __cleanMeUp goes to zero and it calls the +# wxApp_CleanUp function. + +class __wxPyCleanup: + def __init__(self): + self.cleanup = wxc.wxApp_CleanUp + def __del__(self): + self.cleanup() + __cleanMeUp = __wxPyCleanup() #----------------------------------------------------------------------------