Q-W1 pt2: core/shell/app relocation + sub-namespaces; one concrete ui::Rect (LTRB fork retired); slot_map split from bank_book; BankIndex→BankModel; 59/59 green

This commit is contained in:
2026-07-28 20:48:56 -04:00
parent 67a41728f3
commit 847936f813
222 changed files with 2247 additions and 2079 deletions
+35
View File
@@ -0,0 +1,35 @@
#include "core/namespaces.h"
#pragma once
// item_read — the ONE place a MediaItem* is read for its canonical GUID string and for
// the durable P_LANENAME of the fixed lane it sits on. Before this seam, view.cpp and
// bank_panel.cpp each carried a near-identical private itemGuid / itemLaneName pair
// (both files' comments acknowledged the deliberate copy); the D2 Wave-3-B item actions
// need the same two reads, so the duplication is extracted here — the item-read analog
// of track_guid's single MediaTrack* -> GUID-key formatter.
//
// REAPER-facing shell: the .cpp includes reaper_plugin_functions.h WITHOUT
// REAPERAPI_IMPLEMENT (main.cpp owns the API pointers; here they are extern —
// CLAUDE.md §contract). MediaItem / MediaTrack are forward-declared so this header
// stays SDK-lite. These are shell reads (REAPER string/value getters); the managed/
// manual DECISION that consumes the lane name stays pure in lane_keys (isOnManualLane).
#include <string>
class MediaItem;
class MediaTrack;
namespace reasampler {
// An item's canonical GUID string via GetSetMediaItemInfo_String("GUID"). Empty on a
// read failure (an empty GUID must never be tagged — every caller skips empties).
std::string itemGuid(MediaItem* it);
// The durable P_LANENAME of the fixed lane item `it` currently sits on (read via the
// item's I_FIXEDLANE ordinal, then P_LANENAME:n on `tr`). Empty if the lane is unnamed
// or the param is unavailable. Callers must already know `tr` is a fixed-lane track
// (I_FREEMODE==2) before calling — I_FIXEDLANE is meaningless otherwise; the pure
// isOnManualLane predicate handles the non-fixed-lane case via its own argument, so
// callers should not call this at all for a normal track.
std::string itemLaneName(MediaTrack* tr, MediaItem* it);
} // namespace reasampler