MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / applyMarginText

Method applyMarginText

src/editor.cpp:419–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419void RcxEditor::applyMarginText(const QVector<LineMeta>& meta) {
420 if (m_relativeOffsets)
421 return reformatMargins();
422
423 m_sci->clearMarginText(-1);
424
425 for (int i = 0; i < meta.size(); i++) {
426 const auto& lm = meta[i];
427 if (lm.offsetText.isEmpty()) continue;
428
429 QByteArray text = lm.offsetText.toUtf8();
430 m_sci->SendScintilla(QsciScintillaBase::SCI_MARGINSETTEXT,
431 (uintptr_t)i, text.constData());
432 QByteArray styles(text.size(), '\0'); // style 0 = dim
433 m_sci->SendScintilla(QsciScintillaBase::SCI_MARGINSETSTYLES,
434 (uintptr_t)i, styles.constData());
435 }
436}
437
438void RcxEditor::reformatMargins() {
439 uint64_t base = m_layout.baseAddress;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected