Q-W4: split actions.cpp into design_view_actions/bank_actions/prune_action + shared action_registry; bank verbs deduped into promptless bankOp* inner verbs in panel_bank_ops (one mutation home, two UX skins); command-id strings byte-identical; actions.h shim carrier retired

This commit is contained in:
2026-07-29 12:56:02 -04:00
parent 5232227323
commit 430e117620
24 changed files with 1353 additions and 1241 deletions
+29
View File
@@ -0,0 +1,29 @@
#pragma once
// action_registry — shared registration plumbing for the bindable action families
// (Q-W4 split of actions.cpp). Owns the durable interned-string store both the
// Design View and multi-bank families register through, so a composed command id
// keeps ONE stable pointer from register to the mirror-unregister, and the
// register-a-command_id-then-gaccel sequence has one implementation.
//
// Includes reaper_plugin.h (gaccel_register_t / reaper_plugin_info_t full defs);
// only the action-family TUs include this header. Q-W6's registration table
// subsumes this helper when the hand-written blocks become data.
#include "reaper_plugin.h" // reaper_plugin_info_t, gaccel_register_t
namespace reasampler {
// Returns the channel-qualified command id for `suffix`, interning it once for the
// process lifetime. Called by BOTH registerAction and each family's unregister path,
// so a '-command_id' presents the IDENTICAL string pointer registered earlier.
const char* channelIdFor(const char* suffix);
// Mints a command id from a channel-qualified SUFFIX and registers its gaccel
// (Actions-list entry with a channel-qualified label PHRASE). Returns the command id
// (0 on failure). Both the composed id and label are interned durably — REAPER holds
// the desc pointer, and the id must survive to the mirror-unregister. The gaccel
// storage itself is caller-owned (file-scope in the family TU).
int registerAction(reaper_plugin_info_t* rec, const char* suffix,
gaccel_register_t& accel, const char* phrase);
} // namespace reasampler