Add C++ code generator, rendered view, fix Hex node display

- Add generator.h/cpp: C++ struct emission with padding gaps, tail
  padding, pragma pack, static_assert, nested structs, pointers
- Add rendered view (QStackedWidget per tab, QsciScintilla + C++ lexer)
- View menu: C/C++ switches to rendered view, Reclass View switches back
- File > Export C++ Header writes full SDK to .h file
- Fix Hex8-Hex64 display: show name + value columns like normal types
  instead of hiding name behind ASCII preview (only Padding keeps that)
- Update column span detection, compose width calc, controller edit
  dispatch, and editor dimming to match new Hex layout
- Sample data: Entity struct with health, armor, speed, flags fields
- Add test_generator (21 tests) and test_validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
BBBBbbbb
2026-02-06 17:31:39 -07:00
committed by sysadmin
parent f1e3da6e95
commit 0069c942c7
12 changed files with 2549 additions and 362 deletions

View File

@@ -401,8 +401,8 @@ ComposeResult compose(const NodeTree& tree, const Provider& prov) {
// Include struct/array names - they now use columnar layout too
int maxNameLen = kMinNameW;
for (const Node& node : tree.nodes) {
// Skip hex/padding (they show ASCII preview, not name column)
if (isHexPreview(node.kind)) continue;
// Skip padding (it shows ASCII preview, not name column)
if (node.kind == NodeKind::Padding) continue;
maxNameLen = qMax(maxNameLen, (int)node.name.size());
}
state.nameW = qBound(kMinNameW, maxNameLen, kMaxNameW);
@@ -420,8 +420,8 @@ ComposeResult compose(const NodeTree& tree, const Provider& prov) {
const Node& child = tree.nodes[childIdx];
scopeMaxType = qMax(scopeMaxType, (int)nodeTypeName(child).size());
// Name width (skip hex/padding, but include containers)
if (!isHexPreview(child.kind)) {
// Name width (skip padding, but include hex and containers)
if (child.kind != NodeKind::Padding) {
scopeMaxName = qMax(scopeMaxName, (int)child.name.size());
}
}
@@ -439,8 +439,8 @@ ComposeResult compose(const NodeTree& tree, const Provider& prov) {
const Node& child = tree.nodes[childIdx];
rootMaxType = qMax(rootMaxType, (int)nodeTypeName(child).size());
// Name width (skip hex/padding, include containers)
if (!isHexPreview(child.kind)) {
// Name width (skip padding, include hex and containers)
if (child.kind != NodeKind::Padding) {
rootMaxName = qMax(rootMaxName, (int)child.name.size());
}
}