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

Method mouseMoveEvent

python/examples/triage/byte.py:777–789  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

775 self.leftButtonDown = True
776
777 def mouseMoveEvent(self, event):
778 if not self.leftButtonDown:
779 return
780 render = self.createRenderContext()
781 x = (event.x() - 2) // render.getFontWidth() - (self.addrWidth + 2)
782 y = (event.y() - 2) // render.getFontHeight()
783 if (x == self.lastMouseX) and (y == self.lastMouseY):
784 return
785 self.lastMouseX = x
786 self.lastMouseY = y
787 self.cursorAddr = self.addressFromLocation(x, y)
788 self.repositionCaret()
789 self.viewport().update()
790
791 def mouseReleaseEvent(self, event):
792 if event.button() != Qt.LeftButton:

Callers

nothing calls this directly

Calls 6

createRenderContextMethod · 0.95
addressFromLocationMethod · 0.95
repositionCaretMethod · 0.95
xMethod · 0.80
yMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected