Thin canvas state, tools menu, and node canvas draw

This commit is contained in:
2026-06-16 10:13:59 +02:00
parent d68c97e609
commit 4a5bb68fe2
7 changed files with 729 additions and 521 deletions

View File

@@ -87,11 +87,18 @@ looks like a wrapper around the old renderer shell.
#### ARC-RND-001 - Split `canvas.cpp` Into Document State And Render Execution Shells
Status: Ready
Status: In Progress
Why now:
`src/canvas.cpp` is still the biggest single architectural blocker at about
4128 lines.
3622 lines.
Current slice:
- Canvas state-management helpers for picking, clear/clear-all, layer
add/remove/order/lookups, animation frame control, resize, and snapshot
save/restore now live in `src/legacy_canvas_state_services.cpp` instead of
staying inline in `src/canvas.cpp`, but the file still owns the larger
document-plus-render shell.
Write scope:
- `src/canvas.cpp`
@@ -171,6 +178,11 @@ Current slice:
now also routes through `execute_legacy_canvas_draw_merge_layer_plane(...)`,
but the node still owns substantial live layer traversal and renderer state
orchestration.
- `NodeCanvas` post-draw callback assembly now also routes through
`execute_legacy_canvas_draw_merge_post_draw_callbacks(...)`, and the
remaining per-layer render-path orchestration now also routes through
`execute_legacy_canvas_draw_merge_layer_path(...)`, but the node still owns
broader draw-loop and renderer-state shell sequencing.
Write scope:
- `src/node_stroke_preview.cpp`
@@ -246,12 +258,18 @@ targets look like helpers under one old monolith.
#### ARC-APP-001 - Split `app_layout.cpp` Into UI Binding Modules
Status: Ready
Status: In Progress
Why now:
`src/app_layout.cpp` is still a 2026-line mixed file that builds menus,
`src/app_layout.cpp` is still a 1498-line mixed file that builds menus,
attaches callbacks, computes planner inputs, and mutates UI state directly.
Current slice:
- Tools-menu UI binding, including the nested panels/options submenu wiring,
now lives in `src/app_layout_tools_menu.cpp`, and `App::init_menu_tools()`
is now a thin call-through, but file/about/layer/sidebar and broader layout
composition are still inline in `src/app_layout.cpp`.
Write scope:
- `src/app_layout.cpp`
- `src/legacy_app_shell_services.*`