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

Method updateCaret

examples/triage/byte.cpp:513–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511
512
513void ByteView::updateCaret()
514{
515 // Rerender both the old caret position and the new caret position
516 for (size_t i = m_topLine; (i < m_lines.size()) && (i < (m_topLine + m_visibleRows)); i++)
517 {
518 if (((m_prevCursorAddr >= m_lines[i].address) && (m_prevCursorAddr <= (m_lines[i].address + m_lines[i].length)))
519 || ((m_cursorAddr >= m_lines[i].address) && (m_cursorAddr <= (m_lines[i].address + m_lines[i].length))))
520 {
521 viewport()->update(0, (int)(i - m_topLine) * m_render.getFontHeight(), viewport()->size().width(),
522 m_render.getFontHeight() + 3);
523 }
524 }
525}
526
527
528void ByteView::resizeEvent(QResizeEvent* event)

Callers

nothing calls this directly

Calls 4

viewportFunction · 0.85
sizeMethod · 0.45
updateMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected