Extract menu, stylus, and canvas draw helpers
This commit is contained in:
@@ -80,13 +80,13 @@ What is still carrying too much live ownership:
|
||||
Current hotspot files:
|
||||
|
||||
- `src/canvas.cpp`: 2645 lines
|
||||
- `src/app_layout.cpp`: 1360 lines
|
||||
- `src/app_layout.cpp`: 1249 lines
|
||||
- `src/canvas_modes.cpp`: 1798 lines
|
||||
- `src/node.cpp`: 1551 lines
|
||||
- `src/main.cpp`: 1181 lines
|
||||
- `src/main.cpp`: 1218 lines
|
||||
- `src/node_panel_brush.cpp`: 1197 lines
|
||||
- `src/node_stroke_preview.cpp`: 933 lines
|
||||
- `src/node_canvas.cpp`: 888 lines
|
||||
- `src/node_canvas.cpp`: 968 lines
|
||||
- `src/app.cpp`: 950 lines
|
||||
- `src/app_dialogs.cpp`: 908 lines
|
||||
|
||||
@@ -122,14 +122,19 @@ Current architecture mismatches that must be treated as real blockers:
|
||||
current-mode, and grid-mode callback setup now routed through the same
|
||||
retained helper family, while post-draw callback assembly and the remaining
|
||||
per-layer render-path orchestration now also route through retained
|
||||
draw-merge helpers even though the broader node draw loop is still inline.
|
||||
draw-merge helpers even though the broader node draw loop is still inline,
|
||||
with the non-`draw_merged` outer layer/plane traversal now also routing
|
||||
through `execute_legacy_canvas_draw_layer_traversal(...)` while the heavier
|
||||
per-layer GL setup and draw lambdas still live in `src/node_canvas.cpp`.
|
||||
- `app_layout.cpp` and `app_dialogs.cpp` are still mixed shell/controller files
|
||||
rather than thin composition/binding surfaces, even though tools-menu binding
|
||||
plus nested panels/options submenu wiring now live in
|
||||
`src/app_layout_tools_menu.cpp` and `App::init_menu_tools()` is now a thin
|
||||
call-through, while file-menu binding plus the export submenu wiring now also
|
||||
live in `src/app_layout_file_menu.cpp` and `App::init_menu_file()` is now a
|
||||
thin call-through.
|
||||
thin call-through, while about-menu and layer-menu wiring now also live in
|
||||
`src/app_layout_about_layer_menu.cpp` and `App::init_menu_about()` plus
|
||||
`App::init_menu_layer()` are now thin call-throughs.
|
||||
- `App`, `Canvas`, `Node`, retained workers, and platform entrypoints still use
|
||||
global singleton reach, raw observer pointers, retained static worker
|
||||
ownership in several app families, and ad hoc mutex/condition-variable
|
||||
@@ -153,7 +158,9 @@ Current architecture mismatches that must be treated as real blockers:
|
||||
live under `AppRuntime` instead of retained static app-events/canvas
|
||||
workers, and the splash-screen dialog loop, HWND ownership, and bitmap setup
|
||||
now live in `src/platform_windows/windows_splash.cpp` instead of
|
||||
`src/main.cpp`,
|
||||
`src/main.cpp`, while Win32 pointer API loading, stylus/ink timer decay,
|
||||
Wintab packet reset, and `WM_POINTERUPDATE` pen/touch handling now also live
|
||||
in `src/platform_windows/windows_stylus_input.cpp` instead of `src/main.cpp`,
|
||||
while `App::rec_loop()` now delegates worker-iteration orchestration into
|
||||
the retained recording bridge, `App::update_rec_frames()` now delegates
|
||||
recording label refresh through that same retained recording path, and the
|
||||
|
||||
@@ -193,6 +193,10 @@ Current slice:
|
||||
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.
|
||||
- `NodeCanvas` outer non-`draw_merged` layer/plane traversal, onion-range
|
||||
failure handling, and visit payload setup now also route through
|
||||
`execute_legacy_canvas_draw_layer_traversal(...)`, but the node still owns
|
||||
the heavier per-layer GL setup and draw lambdas.
|
||||
|
||||
Write scope:
|
||||
- `src/node_stroke_preview.cpp`
|
||||
@@ -271,7 +275,7 @@ targets look like helpers under one old monolith.
|
||||
Status: In Progress
|
||||
|
||||
Why now:
|
||||
`src/app_layout.cpp` is still a 1360-line mixed file that builds menus,
|
||||
`src/app_layout.cpp` is still a 1249-line mixed file that builds menus,
|
||||
attaches callbacks, computes planner inputs, and mutates UI state directly.
|
||||
|
||||
Current slice:
|
||||
@@ -283,6 +287,10 @@ Current slice:
|
||||
`src/app_layout_file_menu.cpp`, and `App::init_menu_file()` is now a thin
|
||||
call-through, but about/layer/sidebar and broader layout composition are
|
||||
still inline in `src/app_layout.cpp`.
|
||||
- About-menu and layer-menu wiring now also live in
|
||||
`src/app_layout_about_layer_menu.cpp`, and `App::init_menu_about()` plus
|
||||
`App::init_menu_layer()` are now thin call-throughs, but edit/sidebar and
|
||||
broader layout composition are still inline in `src/app_layout.cpp`.
|
||||
|
||||
Write scope:
|
||||
- `src/app_layout.cpp`
|
||||
@@ -405,6 +413,10 @@ Current slice:
|
||||
pair during initialization and context recreation
|
||||
- `main.cpp` main-thread queued task state now sits behind a narrow retained
|
||||
helper instead of `RetainedState.main_tasklist` / `main_task_mutex` directly
|
||||
- Win32 pointer API loading, stylus/ink timer ownership and decay, `WT_PACKET`
|
||||
reset, and `WM_POINTERUPDATE` pen/touch handling now live in
|
||||
`src/platform_windows/windows_stylus_input.cpp` instead of `src/main.cpp`,
|
||||
but broader retained Win32 shell state is still open
|
||||
- prepared-file background work now runs through an `AppRuntime`-owned worker
|
||||
queue instead of a retained static worker in `src/app_events.cpp`
|
||||
- canvas async import/export/save/open background work now also runs through an
|
||||
|
||||
Reference in New Issue
Block a user