Q-W2: split bank_panel.cpp (3459 LOC) into eight shell/panel TUs — reasampler::panel internals, per-seam public headers, shim retired; zero behavior change, 60/60 green
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
// panel_window — the window-lifecycle seam of the docked bank panel (Q-W2 split of
|
||||
// bank_panel.h; M5, Wave A). REAPER-facing shell: the .cpp owns a SWELL dialog
|
||||
// (IDD_BANK_PANEL) docked via DockWindowAddEx / undocked via DockWindowRemove,
|
||||
// toggled open/closed, plus the OS drop-target opt-in (S8) and the dialog proc that
|
||||
// routes messages to the input/drag/render seams. The panel itself NEVER inserts
|
||||
// into the arrange or mutates the project (CONTEXT.md §load-bearing principle).
|
||||
//
|
||||
// The header is REAPER-free: main.cpp drives the panel through these free functions,
|
||||
// passing the live session so the panel reads the current bank. All SWELL / LICE /
|
||||
// PCM_source use is confined to the shell/panel/ .cpp seams.
|
||||
|
||||
namespace reasampler {
|
||||
|
||||
class ReaSamplerSession;
|
||||
|
||||
// Wires the panel into main.cpp's lifecycle. Called once after the API pointers
|
||||
// are loaded, BEFORE the toggle action is registered. `session` must outlive the
|
||||
// panel (it is the extension-lifetime g_session). Stores the session pointer the
|
||||
// panel reads on every repaint; does not create the window yet.
|
||||
void bankPanelInit(ReaSamplerSession* session);
|
||||
|
||||
// Toggles the docked window: creates+docks it if hidden, hides+undocks it if
|
||||
// shown. Bound to the "toggle bank panel" action. Safe to call before the first
|
||||
// timer tick.
|
||||
void bankPanelToggle();
|
||||
|
||||
// Whether the panel window is currently open/visible. Feeds the action's
|
||||
// checked-state (toggleaction) so REAPER shows a tick next to the menu entry.
|
||||
bool bankPanelIsOpen();
|
||||
|
||||
// Requests an immediate repaint of the panel if it is open. A no-op when the panel
|
||||
// is closed (safe to call unconditionally). Called by the actions layer after a
|
||||
// mode change so the footer [Arrange|Design] toggle reflects the new mode without
|
||||
// requiring a hide/reshow.
|
||||
void bankPanelInvalidate();
|
||||
|
||||
// Tears the panel down on extension unload: destroys the window and releases any
|
||||
// cached thumbnails / PCM handles. Mirror of bankPanelInit; safe if never opened.
|
||||
void bankPanelShutdown();
|
||||
|
||||
} // namespace reasampler
|
||||
Reference in New Issue
Block a user