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

Method pageDown

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

Source from the content-addressed store, hash-verified

673 self.viewport().update()
674
675 def pageDown(self, selecting):
676 for i in range(0, len(self.lines)):
677 if (((self.cursorAddr >= self.lines[i].address) and (self.cursorAddr < (self.lines[i].address + self.lines[i].length))) or
678 (((i + 1) == len(self.lines)) and (self.cursorAddr == (self.lines[i].address + self.lines[i].length)))):
679 if i >= (len(self.lines) - self.visibleRows):
680 self.cursorAddr = self.getEnd()
681 else:
682 lineOfs = self.cursorAddr - self.lines[i].address
683 self.cursorAddr = self.lines[i + self.visibleRows].address + lineOfs
684 if self.cursorAddr < self.lines[i + self.visibleRows].address:
685 self.cursorAddr = self.lines[i + self.visibleRows].address
686 elif self.cursorAddr >= (self.lines[i + self.visibleRows].address + self.lines[i + self.visibleRows].length):
687 self.cursorAddr = self.lines[i + self.visibleRows].address + self.lines[i + self.visibleRows].length - 1
688 break
689 self.adjustAddressAfterForwardMovement()
690 if (self.topLine + self.visibleRows) < len(self.lines):
691 self.topLine += self.visibleRows
692 elif len(self.lines) > 0:
693 self.topLine = len(self.lines) - 1
694 if self.topLine < len(self.lines):
695 self.updatingScrollBar = True
696 addr = self.lines[self.topLine].address
697 self.verticalScrollBar().setValue(self.getContiguousOffsetForAddress(addr) // self.scrollBarMultiplier)
698 self.updatingScrollBar = False
699 if not selecting:
700 self.selectNone()
701 self.repositionCaret()
702 self.viewport().update()
703
704 def moveToStartOfLine(self, selecting):
705 for i in self.lines:

Callers 1

__init__Method · 0.95

Calls 6

getEndMethod · 0.95
selectNoneMethod · 0.95
repositionCaretMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected