feat(banks): bindable multi-bank action family — create/rename/delete/evacuate/activate/move/copy + full-height toggles (B3)

This commit is contained in:
2026-07-24 05:35:16 -04:00
parent 288c1e44e4
commit cbfc13c4e0
8 changed files with 546 additions and 1 deletions
+31
View File
@@ -194,6 +194,13 @@ struct PanelState {
// persistence is a noted follow-on. Mutated ONLY by a click in the footer strip.
TailSetting tail;
// --- Vertical-split full-height layout (Phase B3) -------------------------
// Which region(s) the vertical split shows: both (Split, default), pool only,
// or named-banks only. B3 actions flip it (bankPanelToggled*FullHeight); B4's
// panel renders from it. In-memory only (a UI-layout preference, not project
// state — it must not travel with the .rpp); resets to Split on unload.
BankPanelFullHeight fullHeight = BankPanelFullHeight::Split;
// --- Audition preview (Wave B) --------------------------------------------
//
// The stock preview register we hand to PlayPreview/StopPreview. Its cs/mutex
@@ -999,6 +1006,30 @@ TailSetting bankPanelTailSetting() {
return s;
}
BankPanelFullHeight bankPanelFullHeight() {
// In-memory for the extension's lifetime (g_panel is static), like the tail
// setting: survives panel open/close and bank changes, resets to Split on unload.
return g_panel.fullHeight;
}
// Shared toggle body: enter `target` from any other state, or fall back to Split when
// already at `target` (a second press restores the split). Requests a repaint via the
// same InvalidateRect the refresh path uses, so an open panel reflects the change; a
// closed panel (hwnd null) simply stores the bit for B4 to render when it opens.
static void setFullHeight(BankPanelFullHeight target) {
g_panel.fullHeight =
(g_panel.fullHeight == target) ? BankPanelFullHeight::Split : target;
if (g_panel.hwnd) InvalidateRect(g_panel.hwnd, nullptr, FALSE);
}
void bankPanelToggledPoolFullHeight() {
setFullHeight(BankPanelFullHeight::PoolOnly);
}
void bankPanelToggledBanksFullHeight() {
setFullHeight(BankPanelFullHeight::BanksOnly);
}
void bankPanelShutdown() {
closePanel(); // stops audition + destroys the window
deinitPreview(); // destroy the preview lock (after the last stop)