MCPcopy Index your code
hub / github.com/keystone-engine/keypatch / SearchResultChooser

Class SearchResultChooser

keypatch.py:1133–1165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131
1132# Search position chooser
1133class SearchResultChooser(idaapi.Choose2):
1134 def __init__(self, title, items, flags=0, width=None, height=None, embedded=False, modal=False):
1135 Choose2.__init__(
1136 self,
1137 title,
1138 [["Address", idaapi.Choose2.CHCOL_HEX|40]],
1139 flags = flags,
1140 width = width,
1141 height = height,
1142 embedded = embedded)
1143 self.n = 0
1144 self.items = items
1145 self.selcount = 0
1146 self.modal = modal
1147
1148 def OnClose(self):
1149 return
1150
1151 def OnSelectLine(self, n):
1152 self.selcount += 1
1153 idc.Jump(self.items[n][0])
1154
1155 def OnGetLine(self, n):
1156 res = self.items[n]
1157 res = [atoa(res[0])]
1158 return res
1159
1160 def OnGetSize(self):
1161 n = len(self.items)
1162 return n
1163
1164 def show(self):
1165 return self.Show(self.modal) >= 0
1166
1167
1168# Search form

Callers 1

OnFormChangeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected