feat(panel): add Insert as FX — ReaSampler 9000 onto the selected track, preloaded with the focused capture, over the existing instrument-drop body

This commit is contained in:
2026-08-03 16:06:22 -04:00
parent 5042e2709b
commit fcd1ed022c
14 changed files with 323 additions and 18 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ VST3 editor (`shell/instrument/`).
Pure layout/hit-test/palette modules the panel draws through (`theme`,
`component_geometry`, `bank_grid`, `tab_strip`, `mode_switch`, `action_bar`,
`footer_bar`, `overflow_menu`, `prune_button`, `mode_enable`, `tooltip`, `card_drag`,
`card_meta`) live in `core/ui` / `core/model` and are documented there — this
`footer_bar`, `overflow_menu`, `prune_button`, `mode_enable`, `insert_fx_enable`,
`tooltip`, `card_drag`, `card_meta`) live in `core/ui` / `core/model` and are documented there — this
directory consumes them but does not own them. The promptless bank-mutation verbs
(`bankOpCreate`/`Rename`/`Delete`/… + `persistBankOp`) that `panel_bank_ops` skins
live in `shell/bank_ops`, a sibling directory, not here.
+8
View File
@@ -128,6 +128,14 @@ std::vector<ActionBarRow> topBarRows() {
rows.push_back({"INSERT_SELECTED_CONFORM", "Insert Conform",
"insert selected sample at edit cursor (conform to tempo)",
ActionCluster::Placement, true});
// The one top-bar row with a live/dead gate: it places the PLAYER, and one instance
// holds one capture. Only the payload half of the fold is knowable at draw time —
// core/ui/insert_fx_enable.h states why the track half stays a press-time message.
rows.push_back({"INSERT_AS_FX", "Insert as FX",
"insert selected sample as ReaSampler 9000 on the selected track",
ActionCluster::Placement,
insertFxButtonEnabled(
static_cast<int>(g_panel.selection.indices.size()))});
return rows;
}
+5 -2
View File
@@ -41,6 +41,7 @@
#include "core/ui/component_geometry.h"
#include "core/ui/drag_out.h"
#include "core/ui/footer_bar.h"
#include "core/ui/insert_fx_enable.h"
#include "core/ui/mode_enable.h"
#include "core/ui/overflow_menu.h"
#include "core/ui/prune_button.h"
@@ -133,6 +134,7 @@ using ui::hitTestMenuButton;
using ui::hitTestPruneButton;
using ui::hitTestSlot;
using ui::hitTestTabStrip;
using ui::insertFxButtonEnabled;
using ui::kCardNameScrimAlpha;
using ui::kCardStripHeight;
using ui::kCardStripPad;
@@ -401,8 +403,9 @@ struct ActionBarRow {
std::string shortLabel;
std::string fullName;
ActionCluster cluster = ActionCluster::Capture;
bool enabled = true; // opposite-mode gate for bottom-bar tag buttons; always true
// for the top bar (unconditional triggers)
bool enabled = true; // opposite-mode gate for the bottom-bar tag buttons, and the
// payload gate for the top bar's Insert as FX; every other top-
// bar row is an unconditional trigger and stays true
};
// Modifier state at event time. Alt = the replace modifier.