feat(m11): native OS drag-out of bank samples (copy-only)

Pure drag_out (gesture boundary + path-list assembly) + Windows OLE
CF_HDROP / SWELL file-list shell; bank_panel hands off when a dragged
selection leaves the client area. COPY-ONLY mask; internal drag intact.
This commit is contained in:
2026-07-26 20:02:46 -04:00
parent 73f81ffbb7
commit 34df2563e4
7 changed files with 738 additions and 1 deletions
+20 -1
View File
@@ -315,6 +315,20 @@ target_include_directories(provenance PUBLIC src)
add_library(action_buttons STATIC src/action_buttons.cpp)
target_include_directories(action_buttons PUBLIC src)
# ---------------------------------------------------------------------------
# 2l) Pure drag_out library — NO REAPER, NO SWELL, NO OS/OLE. The Milestone 11
# native-OS-drag-out decision core: the gesture-boundary decision (drag state +
# pointer + panel rect -> internal drag / OS drag / none — the invariant-#4 seam
# that keeps the internal bank-to-bank drag byte-identical) and the drag path-list
# assembly (resolved sample paths -> de-duped, existing-only absolute path list with
# an explicit skip-missing / skip-unresolved policy). Split out so the boundary +
# set algebra are unit-tested outside the DAW; the OLE DoDragDrop / SWELL file-list
# initiation (drag_out_win) and the bank_panel gesture hook are DAW-verified. Mirror
# of action_buttons / mode_switch.
# ---------------------------------------------------------------------------
add_library(drag_out STATIC src/drag_out.cpp)
target_include_directories(drag_out PUBLIC src)
# ---------------------------------------------------------------------------
# 3) Standalone tests for the pure modules (run without launching REAPER).
# ---------------------------------------------------------------------------
@@ -413,6 +427,10 @@ add_executable(action_buttons_tests tests/test_action_buttons.cpp)
target_link_libraries(action_buttons_tests PRIVATE action_buttons)
add_test(NAME action_buttons_tests COMMAND action_buttons_tests)
add_executable(drag_out_tests tests/test_drag_out.cpp)
target_link_libraries(drag_out_tests PRIVATE drag_out)
add_test(NAME drag_out_tests COMMAND drag_out_tests)
# ---------------------------------------------------------------------------
# 4) The REAPER extension — a loadable module (dlopen'd by REAPER, not linked).
# ---------------------------------------------------------------------------
@@ -450,8 +468,9 @@ add_library(reaper_reasampler MODULE
src/actions.cpp
src/bank_book.cpp
src/owned_manifest.cpp
src/drag_out_win.cpp
)
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid mode_switch tab_strip view_mode_model insert_plan render_settings batch_capture tail_control realtime_record bank_book wav_trim owned_manifest prune_reconcile prune_button app_version provenance action_buttons)
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid mode_switch tab_strip view_mode_model insert_plan render_settings batch_capture tail_control realtime_record bank_book wav_trim owned_manifest prune_reconcile prune_button app_version provenance action_buttons drag_out)
target_include_directories(reaper_reasampler PRIVATE ${SDK_INC} ${WDL_INC})
# OUTPUT_NAME is channel-derived (Phase V, V4): "reaper_reasampler" (stable, default) or
# "reaper_reasampler_beta" (beta). REAPER dlopen's any reaper_* module, so both channels'