Commit Graph

39 Commits

Author SHA1 Message Date
IChooseYou
3a5d03fae0 feat: add Import from Source parser for C/C++ struct definitions
Adds a new "Import from Source..." menu item that opens a QScintilla
editor dialog where users can paste C/C++ struct definitions. The parser
tokenizes and parses the source using recursive descent, supporting
stdint.h types, Windows types (BYTE/DWORD/PVOID/etc), multi-word C
types, pointers, arrays, Vec2/3/4/Mat4x4 detection, unions (first
member), padding fields, typedefs, forward declarations, static_assert
size checks, and auto-detection of comment offset mode vs computed
offsets. Also removes the flaky test_editor cursor shape tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:08:12 -07:00
IChooseYou
d937d2f42e fix: Qt5 compat - fix ambiguous QByteRef comparison in test_windbg_provider 2026-02-16 10:37:49 -07:00
IChooseYou
f9b33f2ba7 fix: options dialog test segfault from dangling ref to themes() temporary 2026-02-15 13:53:59 -07:00
IChooseYou
9d22a5ed69 fix: Options dialog - remove CSS overrides, fix title case, add show icon checkbox, add Generator page 2026-02-15 13:41:13 -07:00
sysadmin
1473a58742 IChooseYou 2026-02-15 09:23:17 -07:00
IChooseYOu
0a8244dad4 Single-click type chooser, popup warmup fix, rename ProcessMemory plugin
- Type chooser popup now opens on single click (no need to pre-select node)
- Fix ~170ms first-open delay by pre-initializing Qt popup subsystem at startup
- Rename ProcessMemoryWindows -> ProcessMemory (already supports Linux)
2026-02-14 16:08:44 -07:00
IChooseYou
c856ba2697 WinDbg plugin, ProcessMemoryWindows, dialog cleanup, and misc fixes
- Add WinDbgMemory plugin with debug server connection support
- Replace ProcessMemory plugin with Windows-specific ProcessMemoryWindows
- Simplify WinDbg dialog: single panel, no tabs, palette-based theming
- Fix example text visibility on dark themes (QPalette::Dark -> Disabled WindowText)
- Fix "file" -> "File" capitalization in source menu
- Add windbg_provider and com_security tests
2026-02-14 13:40:58 -07:00
IChooseYou
a86912add1 Theme system overhaul, UI polish, and VS2022 Dark theme
- Replaced hardcoded theme factories with JSON files + CMake build step
- Shared ThemeFieldMeta table for DRY serialization and editor UI
- Fixed live preview (auto-triggers on color change, no toggle button)
- Fixed duplicate theme entries when editing built-in themes
- Moved title bar from icon to bold "Reclass" text with View > Show Icon toggle
- MDI tabs: 24px height, unicode close button styled like TypeSelectorPopup
- Added VS2022 Dark theme with purple accent colors
- Status bar padding, removed monospace font overrides on tabs/statusbar
- Default startup opens Ball demo + Unnamed hex64 tabs
2026-02-13 16:23:12 -07:00
ichooseu
ffde3343dd Type chooser: fix composite type changes (struct, pointer, array modifiers) 2026-02-13 07:30:40 -07:00
IChooseYou
e73b783cda QMenu + QMenuBar hover: amber indHoverSpan text via QProxyStyle
MenuBarStyle.drawControl overrides CE_MenuBarItem and CE_MenuItem:
- Menu bar: strips hover state flags, swaps ButtonText to Link (amber),
  delegates to Fusion for identical layout (no text shift)
- Popup menus: patches Highlight→Mid, HighlightedText→Link, delegates
  to Fusion for icons/shortcuts/checkmarks

Test: real QEvent::Enter + MouseMove delivery, QScreen::grabWindow
screenshot, pixel-scan for amber, always saves PNGs for inspection.
2026-02-12 10:22:00 -07:00
IChooseYou
db5d3ae311 Unified type popup: explicit TypeEntry model, modifier toggles, section headers
- Replace sentinel-id scheme (kPrimBase) with TypeEntry::Kind discriminant
- Merge showTypeSelectorPopup + showTypePickerPopup into single showTypePopup
- Merge applyTypePickerResult into applyTypePopupResult matching on entryKind
- Add modifier toggle buttons (plain, *, **, [n]) with array count input
- Add section headers (primitives / project types) with dim centered styling
- Root mode shows project types first; non-Root sorts same-size primitives first
- Remove popup outside border, flat "Create new type" button
- Add parseTypeSpec parser, update tests with new TypeEntry API
2026-02-11 13:39:43 -07:00
batallaion caputa
33a093ae7d Widen value column to 96 chars, remove Mat4x4 truncation
kColValue 32 -> 96 to prevent float truncation with ellipsis.
Mat4x4 rows bypass fit() entirely so long matrix rows display fully.
Updated test expectations to use kColValue instead of hardcoded 32.
2026-02-11 10:44:24 -07:00
IChooseYou
df07b61144 Array element offset display, fold arrow UX, type picker popup, and provider cleanup
- Show relative hex offset on array element separators ([N] +0x...)
- Dim fold arrows and add hover highlight for better visibility
- Extend fold/chevron click areas for easier interaction
- Add type picker popup for array element type and pointer target editing
- Remove process_provider.h in favor of plugin-based provider system
- Expand compose/format to handle struct-of-array type names and widths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 09:13:17 -07:00
Duncan Ogilvie
0ffb7d6f58 Fix test_type_selector for Qt5 and stale expectation
- Register uint64_t metatype for QSignalSpy in Qt5 (not needed in Qt6)
- Update command row expectation: "NoName" matches controller output
2026-02-10 23:08:24 +01:00
Duncan Ogilvie
7194322831 Add support for Qt5 2026-02-10 23:06:55 +01:00
IChooseYou
24a7e68136 Add theme system with Reclass Dark and Warm built-in themes
Replaces ~40 hardcoded color values with 27 semantic color roles.
Adds ThemeManager singleton, theme editor dialog, View > Theme menu,
JSON persistence for user themes, and fixes inline edit selection
color from blue #264f78 to #2b2b2b.
2026-02-10 07:46:18 -07:00
IChooseYou
1d6fddb51e Replace Iosevka with JetBrains Mono, fix scrollbar and inline edit UX
- Replace embedded Iosevka font with JetBrains Mono as default font
- Fix wide horizontal scrollbar by enabling SCI_SETSCROLLWIDTHTRACKING
- Remove 28-char trailing whitespace padding from all lines
- Fix arrow keys not collapsing selection in inline edit mode
- Dim struct/array braces ({ and };) to match hex node styling
- Resize margin immediately on font change
2026-02-10 06:00:17 -07:00
batallion2
f4149faa9a Add type selector popup, view root switching, and new type creation
- Type selector chevron [▸] on command row opens searchable popup
- Popup lists all root structs with filter, keyboard nav, side-triangle indicator
- Selecting a type switches the editor view via setViewRootId
- "Create new type" inserts a new root struct with no name
- Command row displays the active view root's name
- Tests for chevron detection, span compatibility, view switching, undo
2026-02-09 12:21:03 -07:00
Bojangles
f27848bf1a Dim command row address, fix source picker zoom/styling, lowercase menu items, margin spacing
- Apply IND_HEX_DIM to base address on command row so it matches source/struct grey
- Source picker QMenu respects Scintilla zoom level for font size
- Style source picker with dark theme selection color instead of system blue
- Disable blue selection background for picker-based edit targets (Source, Type, etc.)
- Rename menu items File/Process to file/process
- Add trailing space to margin offset text for breathing room
2026-02-08 14:10:26 -07:00
megablox
6a9641edc5 Fold arrows, pointer format, teal custom types, collapsed pointers by default
- Change fold indicators from +/- to arrow icons (▸ collapsed, ▾ expanded)
- Move ▾ dropdown arrow after text on command rows (source▾, struct▾)
- Change pointer display from ptr64<Type> to Type* format
- Color custom/user-defined types teal (#4EC9B0) via lexer GlobalClass
- Keep built-in types blue (#569cd6) via KeywordSet2
- Remove underline from root class name on CommandRow2
- Pointer children start collapsed by default (lazy expansion)
- Demo data updated accordingly
2026-02-08 11:00:11 -07:00
batallion caputa
105ad398b6 minorfixes 2026-02-08 05:59:50 -07:00
batallion caputa
18475d0570 minorfixes 2026-02-07 16:41:10 -07:00
megablocks(tm)
9962e55820 Fix cursor jump on command row edit, data-change highlighting for containers, invalid pointer expansion, cycle detection with node IDs, O(n²) addNode cache, duplicate struct in C++ export, collapse bug for non-first root structs, remove hardcoded demo data 2026-02-07 12:02:41 -07:00
megablocks(tm)
39cac316de added project open save new 2026-02-07 11:27:46 -07:00
MegaBlocksTM
9ec06d9658 Move alignas alignment to context menu, fix hover state across refreshes
Replace inline alignas() editing with a proper "Align Members" submenu
in the right-click context menu. Remove alignas display from command row
and all related span/hit-test/edit machinery. Preserve hover highlight
state across document refreshes.
2026-02-07 10:40:04 -07:00
sysadmin
d9fd01f1d1 Add class keyword picker, alignas alignment picker with member realignment
- Class keyword (struct/class/union/enum) persists in JSON, drives generator output
- CommandRow2 shows alignas(N) pill computed from struct member alignment
- Clicking alignas opens picker (1, 4, 8, 16) to realign all members
- Going up: members repositioned to N-byte boundaries, padding fills gaps
- Going down: excess padding removed, members pack tighter
- Add cmd::ChangeOffset for undoable offset repositioning
- All 11 tests pass

Co-Authored-By: combuter <combuter@users.noreply.github.com>
2026-02-07 10:07:38 -07:00
Ccccc
3cf9a311d2 Add context menu icons, expand empty-area menu, add test_context_menu
- Right-click on empty area: Add Hex64, Add Struct, Append 128 bytes,
  Undo/Redo, Copy All as Text (with icons for each)
- Right-click on node: icons for Edit Value, Rename, Change Type,
  Add Field, Add Child, Expand/Collapse, Duplicate, Delete,
  Copy Address, Copy Offset, Copy All as Text
- Multi-select menu: icons for batch delete and batch change type
- Add test_context_menu.cpp (20 tests): insert adds exactly one node,
  auto-offset placement, duplicate adds exactly one copy, duplicate
  preserves original, duplicate undo, struct duplicate no-op, root
  insert, append 128 bytes (16 nodes), append undo (macro), insert
  child, remove+undo, multiple duplicates, parent correctness, struct
  with children, batch remove, invalid parent, invalid index guards
- Add vsicons to qrc: trash, clippy, link, diff-added, expand-all,
  collapse-all, rename, whole-word, list-selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 17:38:02 -07:00
BBBBbbbb
0069c942c7 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>
2026-02-06 17:31:39 -07:00
DreamTeam2026
6852e0915e Fix 13 logic bugs and UI issues across editor, controller, and core
Round 1: Fix updateCommandRow offset, structTypeName undo, changeNodeKind
macro, shift-click kCommandRowId leak, type filter byte-vs-column bug.
Round 2: Move kFooterIdBit to core.h, add RcxEditor destructor for cursor
cleanup, defer refresh during batch ops, use newline separator in type
picker, narrow selection on double-click edit, clear hover on keyboard
scroll, guard 0x prefix from deletion, cap array count at 100k.
2026-02-06 12:57:01 -07:00
sysadmin
8daed45414 Remove ambient validation markers, show ptr64 as void*, add struct types to picker, add README
- Remove M_ERR and M_PTR0 ambient markers from compose (validation only during inline edit)
- Change ptr64 display name to void* in kKindMeta
- Type picker now includes custom struct type names from the tree
- Controller handles struct type selection from picker
- Add project README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 08:02:08 -07:00
sysadmin
44e4d88f58 Provider refactor: 2-method base class, ProcessProvider, ProcessPicker
Collapse Provider interface from 9 virtual methods to 2 (read + size),
move providers to src/providers/, add name()/kind()/getSymbol() virtuals.
Replace FileProvider with BufferProvider, add ProcessProvider (Win32)
with module-based symbol resolution, wire ProcessPicker dialog, and
integrate getSymbol into pointer display and command row.

- Fix isReadable overflow for large addresses
- Guard deferred showSourcePicker/showTypeAutocomplete against stale edits
- 7/7 tests pass including 3 new provider test suites

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 06:52:44 -07:00
sysadmin
82e1520ded CommandRow: * icon, SRC: label, remove separator, clean margins
- Replace diamond with * for pixel-perfect fold alignment
- Add SRC: label prefix to command row source field
- Remove vertical bar separator from command row
- Clear footer margin text (no more ---)
- Remove + prefix from offset margin (0x instead of +0x)
- Remove codicon font infrastructure (use editor font chars)
2026-02-05 17:25:51 -07:00
sysadmin
a0d6b769b6 Fix 7 data bugs: hex endian, signed hex, array span, UTF-8 positions, array undo, offset sign 2026-02-05 07:15:51 -07:00
IChooChoose
4d35db224e Condensed array display + per-scope column widths + MIT license
- Array element structs render without { } braces (condensed display)
- [N] separators show element indices within arrays
- Per-scope column width calculation (nested elements use tighter spacing)
- Array headers show struct[N] for struct arrays
- [N] separators are not interactive (no hover/click highlight)
- Dynamic type column width (min 8, max 14)
- PE32+ sample data with full headers, DataDirectory[16], SectionHeaders[4]
- Added MIT license

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 06:26:00 -07:00
sysadmin
490486ca7c Type picker refactor: use SCI_USERLISTSHOW, fix coordinate handling
- Switch type picker from SCI_AUTOCSHOW to SCI_USERLISTSHOW for proper
  signal handling (userListActivated now fires correctly)
- Fix coordinate system mixing by using posFromCol() consistently
- Skip 0x prefix in value/base address edit selection
- Dynamic hint positioning: 2 spaces after value with // prefix
- Clearer validation errors ("too large! max=0x..." instead of "max")
- Green colored hint text using IND_BASE_ADDR indicator

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 07:48:59 -07:00
sysadmin
06c3251f74 Inline edit UX improvements: selection clamping, auto-select, validation fixes
- Constrain selection/cursor to edit span boundaries during inline edit
- Auto-select entire text when entering edit mode (Name, Value, Type)
- Double-click during edit selects entire editable text
- Fix vector component validation (subLine >= 0 for x component)
- Accept EU decimal separator (comma) for float parsing
- Darker selection highlight (35,35,35) vs hover (43,43,43)
- Remove blue text indicator, use hidden style
- Fix validation error message display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:33:40 -07:00
sysadmin
a7e67b12fe Dynamic comment field for value editing with validation feedback
- Comment shows "Enter=Save Esc=Cancel" when valid, "! value" when invalid
- Only updates on validation state change to avoid lag
- Uses deferred timer for Scintilla document sync
- Added tests for comment echo and validation error display
2026-02-03 11:35:40 -07:00
sysadmin
af183f27f0 KindFlags refactor, indicator helpers, auto-padding, sizeof format fix
- Add KindFlags bitmask enum (KF_HexPreview, KF_Container, KF_String, KF_Vector)
- Add helper functions: isHexPreview(), flagsFor(), allTypeNamesForUI()
- Add editor helpers: clearIndicatorLine(), fillIndicatorCols(), resolvedSpanFor()
- Use SCI_FINDCOLUMN for UTF-8 safe column-to-position conversion
- Auto-emit hex padding nodes when changing type to smaller size
- Fix struct footer format: sizeof(Name)=0x... (no spaces)
- Add tests for sizeof recalculation after node deletion
- Add debug output to investigate sizeof refresh issue
- Replace icons.qrc with resources.qrc, add embedded fonts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 05:55:29 -07:00
sysadmin
0be67c8396 Initial commit: ReclassX structured binary editor 2026-02-01 11:37:32 -07:00