MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / scrollLines

Method scrollLines

python/examples/triage/byte.py:364–378  ·  view source on GitHub ↗
(self, count)

Source from the content-addressed store, hash-verified

362 self.lines = self.lines[0:self.topLine + (self.visibleRows * 5)]
363
364 def scrollLines(self, count):
365 newOffset = self.topLine + count
366 if newOffset < 0:
367 self.topLine = 0
368 elif newOffset >= len(self.lines):
369 self.topLine = len(self.lines) - 1
370 else:
371 self.topLine = newOffset
372 self.updateCache()
373 self.viewport().update()
374 if self.topLine < len(self.lines):
375 self.updatingScrollBar = True
376 addr = self.lines[self.topLine].address
377 self.verticalScrollBar().setValue(self.getContiguousOffsetForAddress(addr) // self.scrollBarMultiplier)
378 self.updatingScrollBar = False
379
380 def showContextAroundTop(self):
381 scroll = self.visibleRows // 4

Callers 2

wheelEventMethod · 0.95
scrollBarActionMethod · 0.95

Calls 3

updateCacheMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected