def nav_colorizer(self, ea, nbytes): # if the function is marked as binaryai one, we want also to display it in the navigator if self.mgr.is_function_marked_binaryai(ea): return int(self.mgr.get_binaryai_function_color()) else: # Otherwise we use the original navigator color orig = ida_kernwin.call_nav_colorizer( self._ida_nav_colorizer, ea, nbytes ) return int(orig)
def cust_colorizer(self, users, ea, nbytes): self._nbytes = nbytes orig = ida_kernwin.call_nav_colorizer(self.ida_colorizer, ea, nbytes) for color, user_ea in users.items(): if ea - nbytes * 2 <= user_ea <= ea + nbytes * 2: return long(color) if ea - nbytes * 4 <= user_ea <= ea - nbytes * 2: return long(0) if ea + nbytes * 2 <= user_ea <= ea + nbytes * 4: return long(0) return long(orig)
def custom_nav_colorizer(self, ea, nbytes): """This is the custom nav colorizer used by the painter.""" # There is a bug in IDA: with a huge number of segments, all the navbar # is colored with the user color. This will be resolved in IDA 7.2. if self._plugin.config["user"]["navbar_colorizer"]: for infos in self._users_positions.values(): if ea - nbytes * 2 <= infos["address"] <= ea + nbytes * 2: return long(infos["color"]) if ea - nbytes * 4 <= infos["address"] <= ea + nbytes * 4: return long(0) orig = ida_kernwin.call_nav_colorizer(self._ida_nav_colorizer, ea, nbytes) return long(orig)
def nav_colorizer(self, ea, nbytes): """This is the custom nav colorizer used by the painter.""" self._nbytes = nbytes # There is a bug in IDA: with a huge number of segments, all the navbar # is colored with the user color. This will be resolved in IDA 7.2. cursors = self._plugin.config["cursors"] if cursors["navbar"]: for user in self._plugin.core.get_users().values(): # Cursor color if ea - nbytes * 2 <= user["ea"] <= ea + nbytes * 2: return long(user["color"]) # Cursor borders if ea - nbytes * 4 <= user["ea"] <= ea + nbytes * 4: return long(0) orig = ida_kernwin.call_nav_colorizer(self._ida_nav_colorizer, ea, nbytes) return long(orig)
def custom_nav_colorizer(self, ea, nbytes): """ Custom navbar colorizer. It adds users positions in the navbar. """ # # to ajust the black band with the navband zoom level # there is a bug in IDA, with huge segment number, all the navbar takes # the color provided by the user, this will be resolved in IDA 7.2 # if not self.noNavbarColorizer: for color, infos in self.users_positions.items(): if ea - nbytes * 2 <= infos['address'] <= ea + nbytes * 2: return long(color) if ea - nbytes * 4 <= infos['address'] <= ea + nbytes * 4: return long(0) orig = ida_kernwin.call_nav_colorizer(self.ida_nav_colorizer, ea, nbytes) return long(orig)
def colorizer(self, ea, nbytes): orig = ida_kernwin.call_nav_colorizer(self.ida_colorizer, ea, nbytes) return long(orig)