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

Method scrollLines

examples/triage/byte.cpp:435–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433
434
435void ByteView::scrollLines(int count)
436{
437 int newOffset = (int)m_topLine + count;
438 if (newOffset < 0)
439 m_topLine = 0;
440 else if (newOffset >= (int)m_lines.size())
441 m_topLine = m_lines.size() - 1;
442 else
443 m_topLine = newOffset;
444 updateCache();
445 viewport()->update();
446 if (m_topLine < m_lines.size())
447 {
448 m_updatingScrollBar = true;
449 uint64_t addr = m_lines[m_topLine].address;
450 verticalScrollBar()->setValue((int)(getContiguousOffsetForAddress(addr) / m_scrollBarMultiplier));
451 m_updatingScrollBar = false;
452 }
453}
454
455
456void ByteView::showContextAroundTop()

Callers

nothing calls this directly

Calls 3

viewportFunction · 0.85
sizeMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected