35 lines
1.7 KiB
C++
35 lines
1.7 KiB
C++
#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 GetSet_ArrangeView2's one-pixel-column reading —
|
|
// inferred behavior, not SDK-documented (see the .cpp's assumption D). Times left of project
|
|
// start clamp to 0.
|
|
double arrangeTimeAtScreenX(int screenX);
|
|
|
|
// Places every path in `absolutePaths` on `track`, inside ONE undo block. The first lands at
|
|
// `time`; whether REAPER's own cursor advance lands the rest end-to-end, or stacks them at one
|
|
// position instead, is assumption B in the .cpp (visible, one Ctrl-Z away, either way). The
|
|
// drop time is assumed to honor the project's snap setting (assumption C). The caller's track
|
|
// selection and edit-cursor position are restored before returning. Returns the number of files
|
|
// InsertMedia reported inserting successfully — its return isn't SDK-documented; treated as
|
|
// 0=failure (assumption E in the .cpp).
|
|
int performArrangeDrop(MediaTrack* track, double time,
|
|
const std::vector<std::string>& absolutePaths);
|
|
|
|
} // namespace reasampler
|