Cut shell/actions, bank_ops, app comment bloat ~48% (comments only, zero code change)

This commit is contained in:
2026-07-29 20:49:31 -04:00
parent 1f24c4b095
commit 58c6d49261
19 changed files with 514 additions and 1074 deletions
+11 -23
View File
@@ -1,38 +1,26 @@
#pragma once
// design_view_actions — the Design View action family (Phase D4; Q-W4 split of
// actions.h). Registers the bindable actions that drive the mode workflow and wires
// them end-to-end: toggle/activate a mode, tag/untag/show-both the current track
// selection, and the item-level mode moves (D2 W3-B). Each action mutates the
// session's ViewModeModel (D1, via persist's ReaSamplerSession) and then reapplies
// the active mode through the view shell (D2) so the change takes effect immediately.
//
// REAPER-facing shell: the .cpp includes reaper_plugin_functions.h WITHOUT
// REAPERAPI_IMPLEMENT (main.cpp owns the API pointers — CLAUDE.md §contract). This
// header is SDK-free; main.cpp calls register/handle/unregister and nothing else.
// design_view_actions — the Design View bindable action family: toggle/activate a
// mode, tag/untag/show-both the current track selection, and the item-level mode
// moves. Each action mutates the session's ViewModeModel then reapplies the active
// mode through the view shell so the change takes effect immediately. SDK-free
// header; main.cpp calls register/handle/unregister and nothing else.
// Forward-declared at GLOBAL scope (matches reaper_plugin.h's typedef struct
// reaper_plugin_info_t) so this header stays SDK-free; the .cpp includes the real
// definition. Declared before the namespace so it is the global type, not a
// namespace-local shadow.
// Forward-declared at GLOBAL scope (matches reaper_plugin.h's typedef) so this
// header stays SDK-free; the .cpp includes the real definition.
struct reaper_plugin_info_t;
namespace reasampler {
class ReaSamplerSession;
// Registers the Design View action family against `rec` (command_id + gaccel +
// hookcommand-routing is owned by the caller's single hookcommand). `session` is the
// live session the actions mutate; it must outlive the registration. Idempotent is
// NOT promised — call exactly once at load, mirror-unregister once at unload.
// `session` must outlive registration. Not idempotent — call exactly once at load,
// mirror-unregister once at unload.
void designViewRegisterActions(reaper_plugin_info_t* rec, ReaSamplerSession* session);
// Services one fired command. Returns true iff `command` is one of this module's
// action ids (and it was handled); false otherwise so the caller's hookcommand keeps
// looking (per the contract: claim only our own ids). Safe to call for any command.
// True iff `command` is one of this module's ids (and handled); false otherwise so
// the caller's hookcommand keeps looking.
bool designViewHandleCommand(int command);
// Mirror-unregisters everything designViewRegisterActions registered, with the
// '-'-prefixed strings (per the contract's unload rule). Call once on rec==nullptr.
void designViewUnregisterActions(reaper_plugin_info_t* rec);
} // namespace reasampler