def EVT_MOVE(win, func):
win.Connect(-1, -1, wxEVT_MOVE, func)
+def EVT_SIZING(win, func):
+ win.Connect(-1, -1, wxEVT_SIZING, func)
+
+def EVT_MOVING(win, func):
+ win.Connect(-1, -1, wxEVT_MOVING, func)
+
def EVT_CLOSE(win, func):
win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func)
def EVT_KEY_UP(win, func):
win.Connect(-1, -1, wxEVT_KEY_UP, func)
+def EVT_HOTKEY(win, func):
+ win.Connect(-1, -1, wxEVT_HOTKEY, func)
+
def EVT_MENU_OPEN(win, func):
win.Connect(-1, -1, wxEVT_MENU_OPEN, func)
win.Connect(id, -1, wxEVT_COMMAND_ENTER, func)
-# wxNotebook events
-def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func)
-
-def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func)
-
-
# wxSpinButton
def EVT_SPIN_UP(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
-# wxTaskBarIcon
-def EVT_TASKBAR_MOVE(win, func):
- win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func)
-
-def EVT_TASKBAR_LEFT_DOWN(win, func):
- win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func)
-
-def EVT_TASKBAR_LEFT_UP(win, func):
- win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func)
-
-def EVT_TASKBAR_RIGHT_DOWN(win, func):
- win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func)
-
-def EVT_TASKBAR_RIGHT_UP(win, func):
- win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func)
-
-def EVT_TASKBAR_LEFT_DCLICK(win, func):
- win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func)
-
-def EVT_TASKBAR_RIGHT_DCLICK(win, func):
- win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func)
-
-
# wxSashWindow
def EVT_SASH_DRAGGED(win, id, func):
win.Connect(id, -1, wxEVT_SASH_DRAGGED, func)
if redirect:
self.RedirectStdio(filename)
+ # Set the default handler for SIGINT. This fixes a problem
+ # where if Ctrl-C is pressed in the console that started this
+ # app then it will not appear to do anything, (not even send
+ # KeyboardInterrupt???) but will later segfault on exit. By
+ # setting the default handler then the app will exit, as
+ # expected (depending on platform.)
+ try:
+ import signal
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
+ except:
+ pass
+
# this initializes wxWindows and then calls our OnInit
_wxStart(self.OnInit)
# change from wxPyApp_ to wxApp_
-wxApp_GetMacDefaultEncodingIsPC = wxc.wxPyApp_GetMacDefaultEncodingIsPC
wxApp_GetMacSupportPCMenuShortcuts = wxc.wxPyApp_GetMacSupportPCMenuShortcuts
wxApp_GetMacAboutMenuItemId = wxc.wxPyApp_GetMacAboutMenuItemId
wxApp_GetMacPreferencesMenuItemId = wxc.wxPyApp_GetMacPreferencesMenuItemId
wxApp_GetMacExitMenuItemId = wxc.wxPyApp_GetMacExitMenuItemId
wxApp_GetMacHelpMenuTitleName = wxc.wxPyApp_GetMacHelpMenuTitleName
-wxApp_SetMacDefaultEncodingIsPC = wxc.wxPyApp_SetMacDefaultEncodingIsPC
wxApp_SetMacSupportPCMenuShortcuts = wxc.wxPyApp_SetMacSupportPCMenuShortcuts
wxApp_SetMacAboutMenuItemId = wxc.wxPyApp_SetMacAboutMenuItemId
wxApp_SetMacPreferencesMenuItemId = wxc.wxPyApp_SetMacPreferencesMenuItemId