Struct headers: type+name format, auto-collapse, no footer when collapsed

- Add structTypeName field to Node for struct type names
- Struct headers now show: struct TYPENAME name {
- Auto-collapse structs/arrays by default
- Skip footer rendering when collapsed (cleaner view)
- Fix header span calculations for new format
- Disable brace matching (not needed for structured viewer)
- Change hover color to muted teal (distinct from keywords)
This commit is contained in:
sysadmin
2026-02-05 08:56:50 -07:00
parent a0d6b769b6
commit 6b9adf03fe
6 changed files with 90 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
#include "controller.h"
#include <Qsci/qsciscintilla.h>
#include <QSplitter>
#include <QFile>
#include <QJsonDocument>
@@ -338,8 +339,8 @@ void RcxController::insertNode(uint64_t parentId, int offset, NodeKind kind, con
n.offset = offset;
}
// Assign ID before storing
n.id = m_doc->tree.m_nextId;
// Reserve unique ID atomically before pushing command
n.id = m_doc->tree.reserveId();
m_doc->undoStack.push(new RcxCommand(this, cmd::Insert{n}));
}
@@ -627,6 +628,10 @@ void RcxController::showContextMenu(RcxEditor* editor, int line, int nodeIdx,
QStringLiteral("+0x") + QString::number(off, 16).toUpper().rightJustified(4, '0'));
});
menu.addAction("Copy All as &Text", [editor]() {
QApplication::clipboard()->setText(editor->scintilla()->text());
});
menu.exec(globalPos);
}