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

Method updateCaret

python/examples/triage/byte.py:422–429  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

420 UIContext.updateStatus()
421
422 def updateCaret(self):
423 # Rerender both the old caret position and the new caret position
424 render = self.createRenderContext()
425 for i in range(self.topLine, min(len(self.lines), self.topLine + self.visibleRows)):
426 if (((self.prevCursorAddr >= self.lines[i].address) and (self.prevCursorAddr <= (self.lines[i].address + self.lines[i].length))) or
427 ((self.cursorAddr >= self.lines[i].address) and (self.cursorAddr <= (self.lines[i].address + self.lines[i].length)))):
428 self.viewport().update(0, (i - self.topLine) * render.getFontHeight(),
429 self.viewport().size().width(), render.getFontHeight() + 3)
430
431 def resizeEvent(self, event):
432 self.adjustSize(event.size().width(), event.size().height())

Callers 4

repositionCaretMethod · 0.95
cursorTimerEventMethod · 0.95
focusInEventMethod · 0.95
focusOutEventMethod · 0.95

Calls 4

createRenderContextMethod · 0.95
updateMethod · 0.45
widthMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected