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

Method pageUp

python/examples/triage/byte.py:646–673  ·  view source on GitHub ↗
(self, selecting)

Source from the content-addressed store, hash-verified

644 self.right(self.cols, selecting)
645
646 def pageUp(self, selecting):
647 for i in range(0, len(self.lines)):
648 if (((self.cursorAddr >= self.lines[i].address) and (self.cursorAddr < (self.lines[i].address + self.lines[i].length))) or
649 (((i + 1) == len(self.lines)) and (self.cursorAddr == (self.lines[i].address + self.lines[i].length)))):
650 if i < self.visibleRows:
651 self.cursorAddr = self.getStart()
652 else:
653 lineOfs = self.cursorAddr - self.lines[i].address
654 self.cursorAddr = self.lines[i - self.visibleRows].address + lineOfs
655 if self.cursorAddr < self.lines[i - self.visibleRows].address:
656 self.cursorAddr = self.lines[i - self.visibleRows].address
657 elif self.cursorAddr >= (self.lines[i - self.visibleRows].address + self.lines[i - self.visibleRows].length):
658 self.cursorAddr = self.lines[i - self.visibleRows].address + self.lines[i - self.visibleRows].length - 1
659 break
660 self.adjustAddressAfterBackwardMovement()
661 if self.topLine > self.visibleRows:
662 self.topLine -= self.visibleRows
663 else:
664 self.topLine = 0
665 if self.topLine < len(self.lines):
666 self.updatingScrollBar = True
667 addr = self.lines[self.topLine].address
668 self.verticalScrollBar().setValue(self.getContiguousOffsetForAddress(addr) // self.scrollBarMultiplier)
669 self.updatingScrollBar = False
670 if not selecting:
671 self.selectNone()
672 self.repositionCaret()
673 self.viewport().update()
674
675 def pageDown(self, selecting):
676 for i in range(0, len(self.lines)):

Callers 1

__init__Method · 0.95

Calls 6

getStartMethod · 0.95
selectNoneMethod · 0.95
repositionCaretMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected