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

Method mouseMoveEvent

examples/triage/byte.cpp:1042–1055  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1040
1041
1042void ByteView::mouseMoveEvent(QMouseEvent* event)
1043{
1044 if (event->buttons() != Qt::LeftButton)
1045 return;
1046 int x = (event->pos().x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2);
1047 int y = (event->pos().y() - 2) / m_render.getFontHeight();
1048 if ((x == m_lastMouseX) && (y == m_lastMouseY))
1049 return;
1050 m_lastMouseX = x;
1051 m_lastMouseY = y;
1052 m_cursorAddr = addressFromLocation(x, y);
1053 repositionCaret();
1054 viewport()->update();
1055}
1056
1057
1058ByteViewType::ByteViewType() : ViewType("Bytes", "Byte Overview") {}

Callers

nothing calls this directly

Calls 4

viewportFunction · 0.85
xMethod · 0.80
yMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected