def describe(self, frame):
     try:
         menu_bar = frame.GetMenuBar()
         if menu_bar is not None:
             self.describe_menu_bar(menu_bar)
             Logger.add(" ")
     except AttributeError:
         pass
Beispiel #2
0
 def describe(self,frame):
     try:
         menu_bar = frame.GetMenuBar()
         if menu_bar is not None:
             self.describe_menu_bar(menu_bar)
             Logger.add(" ")
     except AttributeError:
         pass
Beispiel #3
0
 def describe_wxdialog_windows(self, win, level=0):
     try:
         for child in win.Children:
             child_id = child.GetId()
             margin = "%*.*s" % (level*3, level*3, "")
             Logger.add("   %s%4d  %-24.24s %-16.16s  '%s'" % (margin, child_id, child.GetClassName(), child.GetLabel(), child.GetName()))
             self.describe_wxdialog_windows(child, level+1)
     except AttributeError:
         Logger.add("   No children exiets")
         
Beispiel #4
0
 def describe_wxdialog(self, win, level=0):
     if win is None:
         return
     try:
         if len(win.Children) == 0:
             return
     except AttributeError:
         return
     Logger.newline()
     Logger.header2("wx Description")
     Logger.add("   Id    Classname                Label             Name")
     Logger.add("   ----  ------------------------ ----------------  ----------------")
     self.describe_wxdialog_windows(win)
Beispiel #5
0
 def execute_next_instruction(self):
     try:
         instruction = self._next_instruction()
         self._display_instruction_in_popup_window(instruction)
         if instruction.comment:
             delay = 0
         else:
             # TODO: We have some timing problem so we can't set
             #       waiting time to 0. 40 seems to be ok,
             delay = max(40, self.args.timedelay() * 1000)
         wx.CallLater(delay, self._execute_instruction, instruction)
     except NoMoreInstructionsException:
         Logger.add("INSTRUCTION: None")
Beispiel #6
0
 def describe_menu(self, menu, name):
     Logger.add(" ")
     Logger.add("   Menu: '%s'    Item count: %d" % (name, menu.MenuItemCount))
     Logger.add("        Id   Label                      Text")
     Logger.add("      ----   ------------------------   ---------------------")
     for item in menu.MenuItems:
         self.describe_menu_item(item)
         if item.SubMenu is not None and item.SubMenu.MenuItemCount > 0:
             self.describe_submenu(item.SubMenu)
 def describe_menu(self, menu, name):
     Logger.add(" ")
     Logger.add("   Menu: '%s'    Item count: %d" %
                (name, menu.MenuItemCount))
     Logger.add("        Id   Label                      Text")
     Logger.add(
         "      ----   ------------------------   ---------------------")
     for item in menu.MenuItems:
         self.describe_menu_item(item)
         if item.SubMenu is not None and item.SubMenu.MenuItemCount > 0:
             self.describe_submenu(item.SubMenu)
Beispiel #8
0
 def describe_submenu(self, submenu):
     Logger.add(" ")
     Logger.add("        Submenu Item count: %d" % (submenu.MenuItemCount))
     Logger.add("             Id   Label                      Text")
     Logger.add("           ----   ------------------------   ---------------------")
     for item in submenu.MenuItems:
         Logger.add("           %4d   %-24.24s  '%s' " % (item.Id, item.Label, item.Text) )
     Logger.add(" ")
Beispiel #9
0
 def describe_menu_item(self, item):
     Logger.add("      %4d   %-24.24s  '%s' " % (item.Id, item.Label, item.Text) )
Beispiel #10
0
 def describe_children(self, hwnd):
     Logger.add("    hwnd     Classname                 Label")
     Logger.add("    -------  ------------------------  ------------------")
     children = win.get_children(hwnd)
     for hwnd, class_name, text in children:
         Logger.add("   %8d  %-24.24s  '%s'" % (hwnd, class_name, text))
 def describe_submenu(self, submenu):
     Logger.add(" ")
     Logger.add("        Submenu Item count: %d" % (submenu.MenuItemCount))
     Logger.add("             Id   Label                      Text")
     Logger.add(
         "           ----   ------------------------   ---------------------"
     )
     for item in submenu.MenuItems:
         Logger.add("           %4d   %-24.24s  '%s' " %
                    (item.Id, item.Label, item.Text))
     Logger.add(" ")
 def describe_menu_item(self, item):
     Logger.add("      %4d   %-24.24s  '%s' " %
                (item.Id, item.Label, item.Text))