- wx.EVT_MENU(self, ID_NEW, self.OnFileNew)
- wx.EVT_MENU(self, ID_OPEN, self.OnFileOpen)
- wx.EVT_MENU(self, ID_REVERT, self.OnFileRevert)
- wx.EVT_MENU(self, ID_CLOSE, self.OnFileClose)
- wx.EVT_MENU(self, ID_SAVE, self.OnFileSave)
- wx.EVT_MENU(self, ID_SAVEAS, self.OnFileSaveAs)
- wx.EVT_MENU(self, ID_NAMESPACE, self.OnFileUpdateNamespace)
- wx.EVT_MENU(self, ID_PRINT, self.OnFilePrint)
- wx.EVT_MENU(self, ID_EXIT, self.OnExit)
- wx.EVT_MENU(self, ID_UNDO, self.OnUndo)
- wx.EVT_MENU(self, ID_REDO, self.OnRedo)
- wx.EVT_MENU(self, ID_CUT, self.OnCut)
- wx.EVT_MENU(self, ID_COPY, self.OnCopy)
- wx.EVT_MENU(self, ID_COPY_PLUS, self.OnCopyPlus)
- wx.EVT_MENU(self, ID_PASTE, self.OnPaste)
- wx.EVT_MENU(self, ID_PASTE_PLUS, self.OnPastePlus)
- wx.EVT_MENU(self, ID_CLEAR, self.OnClear)
- wx.EVT_MENU(self, ID_SELECTALL, self.OnSelectAll)
- wx.EVT_MENU(self, ID_ABOUT, self.OnAbout)
- wx.EVT_MENU(self, ID_AUTOCOMP_SHOW, self.OnAutoCompleteShow)
- wx.EVT_MENU(self, ID_AUTOCOMP_MAGIC, self.OnAutoCompleteMagic)
- wx.EVT_MENU(self, ID_AUTOCOMP_SINGLE, self.OnAutoCompleteSingle)
- wx.EVT_MENU(self, ID_AUTOCOMP_DOUBLE, self.OnAutoCompleteDouble)
- wx.EVT_MENU(self, ID_CALLTIPS_SHOW, self.OnCallTipsShow)
- wx.EVT_MENU(self, ID_WRAP, self.OnWrap)
-
- wx.EVT_UPDATE_UI(self, ID_NEW, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_OPEN, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_REVERT, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_CLOSE, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_SAVE, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_SAVEAS, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_NAMESPACE, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_PRINT, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_UNDO, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_REDO, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_CUT, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_COPY, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_COPY_PLUS, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_PASTE, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_PASTE_PLUS, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_CLEAR, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_SELECTALL, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_AUTOCOMP_SHOW, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_AUTOCOMP_MAGIC, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_AUTOCOMP_SINGLE, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_AUTOCOMP_DOUBLE, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_CALLTIPS_SHOW, self.OnUpdateMenu)
- wx.EVT_UPDATE_UI(self, ID_WRAP, self.OnUpdateMenu)
+ self.Bind(wx.EVT_MENU, self.OnFileNew, id=ID_NEW)
+ self.Bind(wx.EVT_MENU, self.OnFileOpen, id=ID_OPEN)
+ self.Bind(wx.EVT_MENU, self.OnFileRevert, id=ID_REVERT)
+ self.Bind(wx.EVT_MENU, self.OnFileClose, id=ID_CLOSE)
+ self.Bind(wx.EVT_MENU, self.OnFileSave, id=ID_SAVE)
+ self.Bind(wx.EVT_MENU, self.OnFileSaveAs, id=ID_SAVEAS)
+ self.Bind(wx.EVT_MENU, self.OnFileUpdateNamespace, id=ID_NAMESPACE)
+ self.Bind(wx.EVT_MENU, self.OnFilePrint, id=ID_PRINT)
+ self.Bind(wx.EVT_MENU, self.OnExit, id=ID_EXIT)
+ self.Bind(wx.EVT_MENU, self.OnUndo, id=ID_UNDO)
+ self.Bind(wx.EVT_MENU, self.OnRedo, id=ID_REDO)
+ self.Bind(wx.EVT_MENU, self.OnCut, id=ID_CUT)
+ self.Bind(wx.EVT_MENU, self.OnCopy, id=ID_COPY)
+ self.Bind(wx.EVT_MENU, self.OnCopyPlus, id=ID_COPY_PLUS)
+ self.Bind(wx.EVT_MENU, self.OnPaste, id=ID_PASTE)
+ self.Bind(wx.EVT_MENU, self.OnPastePlus, id=ID_PASTE_PLUS)
+ self.Bind(wx.EVT_MENU, self.OnClear, id=ID_CLEAR)
+ self.Bind(wx.EVT_MENU, self.OnSelectAll, id=ID_SELECTALL)
+ self.Bind(wx.EVT_MENU, self.OnEmptyBuffer, id=ID_EMPTYBUFFER)
+ self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_ABOUT)
+ self.Bind(wx.EVT_MENU, self.OnHelp, id=ID_HELP)
+ self.Bind(wx.EVT_MENU, self.OnAutoCompleteShow, id=ID_AUTOCOMP_SHOW)
+ self.Bind(wx.EVT_MENU, self.OnAutoCompleteMagic, id=ID_AUTOCOMP_MAGIC)
+ self.Bind(wx.EVT_MENU, self.OnAutoCompleteSingle, id=ID_AUTOCOMP_SINGLE)
+ self.Bind(wx.EVT_MENU, self.OnAutoCompleteDouble, id=ID_AUTOCOMP_DOUBLE)
+ self.Bind(wx.EVT_MENU, self.OnCallTipsShow, id=ID_CALLTIPS_SHOW)
+ self.Bind(wx.EVT_MENU, self.OnCallTipsInsert, id=ID_CALLTIPS_INSERT)
+ self.Bind(wx.EVT_MENU, self.OnWrap, id=ID_WRAP)
+ self.Bind(wx.EVT_MENU, self.OnUseAA, id=ID_USEAA)
+ self.Bind(wx.EVT_MENU, self.OnToggleMaximize, id=ID_TOGGLE_MAXIMIZE)
+ self.Bind(wx.EVT_MENU, self.OnShowLineNumbers, id=ID_SHOW_LINENUMBERS)
+ self.Bind(wx.EVT_MENU, self.OnAutoSaveSettings, id=ID_AUTO_SAVESETTINGS)
+ self.Bind(wx.EVT_MENU, self.OnSaveHistory, id=ID_SAVEHISTORY)
+ self.Bind(wx.EVT_MENU, self.OnSaveHistoryNow, id=ID_SAVEHISTORYNOW)
+ self.Bind(wx.EVT_MENU, self.OnClearHistory, id=ID_CLEARHISTORY)
+ self.Bind(wx.EVT_MENU, self.OnSaveSettings, id=ID_SAVESETTINGS)
+ self.Bind(wx.EVT_MENU, self.OnDelSettingsFile, id=ID_DELSETTINGSFILE)
+ self.Bind(wx.EVT_MENU, self.OnEditStartupScript, id=ID_EDITSTARTUPSCRIPT)
+ self.Bind(wx.EVT_MENU, self.OnExecStartupScript, id=ID_EXECSTARTUPSCRIPT)
+ self.Bind(wx.EVT_MENU, self.OnFindText, id=ID_FIND)
+ self.Bind(wx.EVT_MENU, self.OnFindNext, id=ID_FINDNEXT)
+
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_NEW)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_OPEN)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_REVERT)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_CLOSE)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_SAVE)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_SAVEAS)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_NAMESPACE)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_PRINT)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_UNDO)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_REDO)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_CUT)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_COPY)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_COPY_PLUS)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_PASTE)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_PASTE_PLUS)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_CLEAR)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_SELECTALL)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_EMPTYBUFFER)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_AUTOCOMP_SHOW)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_AUTOCOMP_MAGIC)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_AUTOCOMP_SINGLE)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_AUTOCOMP_DOUBLE)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_CALLTIPS_SHOW)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_CALLTIPS_INSERT)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_WRAP)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_USEAA)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_SHOW_LINENUMBERS)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_AUTO_SAVESETTINGS)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_SAVESETTINGS)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_DELSETTINGSFILE)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_EXECSTARTUPSCRIPT)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_SAVEHISTORY)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_SAVEHISTORYNOW)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_CLEARHISTORY)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_EDITSTARTUPSCRIPT)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_FIND)
+ self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateMenu, id=ID_FINDNEXT)
+
+ self.Bind(wx.EVT_ACTIVATE, self.OnActivate)
+ self.Bind(wx.EVT_FIND, self.OnFindNext)
+ self.Bind(wx.EVT_FIND_NEXT, self.OnFindNext)
+ self.Bind(wx.EVT_FIND_CLOSE, self.OnFindClose)
+
+
+
+ def OnShowLineNumbers(self, event):
+ win = wx.Window.FindFocus()
+ if hasattr(win, 'lineNumbers'):
+ win.lineNumbers = event.IsChecked()
+ win.setDisplayLineNumbers(win.lineNumbers)
+
+ def OnToggleMaximize(self, event):
+ self.Maximize(not self.IsMaximized())