Cut shell/panel comment bloat ~47% (comments only, zero code change)
This commit is contained in:
@@ -1,42 +1,29 @@
|
||||
#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.
|
||||
// panel_window — window-lifecycle seam of the docked bank panel: owns the SWELL
|
||||
// dialog (dock/undock, toggle), the drop-target opt-in, and the dialog proc that
|
||||
// routes to the input/drag/render seams. Panel never inserts into the arrange or
|
||||
// mutates the project. Header is REAPER-free; main.cpp drives it via these
|
||||
// free functions.
|
||||
|
||||
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.
|
||||
// `session` must outlive the panel (extension-lifetime g_session). Call once
|
||||
// after API pointers load, before the toggle action registers.
|
||||
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.
|
||||
// Creates+docks if hidden, hides+undocks if shown.
|
||||
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.
|
||||
// Feeds the toggle action's checked-state.
|
||||
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.
|
||||
// No-op if closed. Called after a mode change so the footer reflects it without
|
||||
// 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.
|
||||
// Mirror of bankPanelInit; safe if never opened.
|
||||
void bankPanelShutdown();
|
||||
|
||||
} // namespace reasampler
|
||||
|
||||
Reference in New Issue
Block a user