Ψ-W1-T4: resolve drop targets per move, not once — every surface gets a defined outcome, a cue, and no silent no-op

This commit is contained in:
2026-08-01 19:43:37 -04:00
parent 8bf6841f7b
commit fe3ac79ab5
17 changed files with 842 additions and 398 deletions
+30
View File
@@ -0,0 +1,30 @@
#pragma once
// arrange_drop_win — the arrange outcome of the panel's drag-out gesture: places the dragged
// bank captures on the timeline at the track and time under the pointer.
//
// LOAD-BEARING: this is USER-INITIATED PLACEMENT, the same class of act as RunInsertSelected.
// Root CLAUDE.md's "capture and placement are separate acts" forbids a CAPTURE placing an item;
// a deliberate drop onto the timeline is placement on demand, and the user chose the spot.
// Nothing here captures or writes the bank.
#include <string>
#include <vector>
// Declared as a class (matching reaper_plugin.h) so the mangled name agrees, without pulling
// in the SDK.
class MediaTrack;
namespace reasampler {
// The arrange time under a screen X, via REAPER's own pixel-column -> time mapping. Times left
// of project start clamp to 0.
double arrangeTimeAtScreenX(int screenX);
// Places every path in `absolutePaths` on `track`, the first at `time` and each subsequent one
// after the previous (REAPER's own multi-file drop shape), inside ONE undo block. The drop time
// honors the project's snap setting. The caller's track selection and edit-cursor position are
// restored before returning. Returns the number of files handed to REAPER.
int performArrangeDrop(MediaTrack* track, double time,
const std::vector<std::string>& absolutePaths);
} // namespace reasampler