def EVT_KEY_UP(win, func):
win.Connect(-1, -1, wxEVT_KEY_UP, func)
+def EVT_MENU_OPEN(win, func):
+ win.Connect(-1, -1, wxEVT_MENU_OPEN, func)
+
+def EVT_MENU_CLOSE(win, func):
+ win.Connect(-1, -1, wxEVT_MENU_CLOSE, func)
+
def EVT_MENU_HIGHLIGHT(win, id, func):
win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
-# Help events
-def EVT_HELP(win, id, func):
- win.Connect(id, -1, wxEVT_HELP, func)
-
-def EVT_HELP_RANGE(win, id, id2, func):
- win.Connect(id, id2, wxEVT_HELP, func)
-
-def EVT_DETAILED_HELP(win, id, func):
- win.Connect(id, -1, wxEVT_DETAILED_HELP, func)
-
-def EVT_DETAILED_HELP_RANGE(win, id, id2, func):
- win.Connect(id, id2, wxEVT_DETAILED_HELP, func)
-
def EVT_CONTEXT_MENU(win, func):
win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func)
# 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()
+class __wxPyCleanup:
+ def __init__(self):
+ self.cleanup = wxc.wxApp_CleanUp
+ def __del__(self):
+ self.cleanup()
-## __cleanMeUp = __wxPyCleanup()
+sys.__wxPythonCleanup = __wxPyCleanup()
-if sys.version[0] == '2':
- import atexit
- atexit.register(wxc.wxApp_CleanUp)
-else:
- sys.exitfunc = wxc.wxApp_CleanUp
+## # another possible solution, but it gets called too early...
+## if sys.version[0] == '2':
+## import atexit
+## atexit.register(wxc.wxApp_CleanUp)
+## else:
+## sys.exitfunc = wxc.wxApp_CleanUp
#----------------------------------------------------------------------------