def wx_menu(self):
     '''return a wx.Menu() for this menu'''
     from MAVProxy.modules.lib.wx_loader import wx
     menu = wx.Menu()
     for i in range(len(self.items)):
         m = self.items[i]
         m._append(menu)
     return menu
Пример #2
0
 def _append(self, menu):
     '''append this menu item to a menu'''
     from MAVProxy.modules.lib.wx_loader import wx
     submenu = wx.Menu()
     for i in range(len(self.items)):
         submenu.AppendRadioItem(self.id()+i, self.items[i], self.description)
         if self.items[i] == self.initial:
             submenu.Check(self.id()+i, True)
     menu.AppendSubMenu(submenu, self.name)