def default_umenu(tc): from gui.uberwidgets.umenu import UMenu m = UMenu(tc) # spelling suggestions and options if isinstance(tc, SpellCheckTextCtrlMixin): tc.AddSuggestionsToMenu(m) m.AddItem(_('Copy'), id = wx.ID_COPY, callback = tc.Copy) m.AddItem(_('Paste'), id = wx.ID_PASTE, callback = tc.Paste) m.AddSep() from gui.toolbox import add_rtl_checkbox add_rtl_checkbox(tc, m) return m
def GenMenu(self): m = UMenu(self) # spelling suggestions and options if isinstance(self, SpellCheckTextCtrlMixin): if self.AddSuggestionsToMenu(m): m.AddSep() m.AddItem(_('Cut'), id = wx.ID_CUT, callback = self.Cut) m.AddItem(_('Copy'), id = wx.ID_COPY, callback = self.Copy) m.AddItem(_('Paste'), id = wx.ID_PASTE, callback = self.Paste) m.AddSep() m.AddItem(_('Select All'), id = wx.ID_SELECTALL, callback = lambda: self.SetSelection(0, self.GetLastPosition())) m.AddSep() from gui.toolbox import add_rtl_checkbox add_rtl_checkbox(self, m) return m