#pragma once // panel_input — the input + detection seam of the bank panel (Q-W2 split of // bank_panel.h). The .cpp owns mouse-click / wheel / keyboard routing (plain // free-function calls per T4-28 — no interface on the per-event path) plus the // timer-driven detection passes: new-content auto-tag (D2 Wave 2) and the // hover-delay tooltip latch. This header carries the timer/lifecycle surface // main.cpp drives and the tail-setting read seam the capture actions consume. // // REAPER-free as practical: TailSetting is the pure capture-side type. #include "core/capture/tail_control.h" // capture::TailSetting — the panel's tail-mode toggle state namespace reasampler { // Requests a repaint if the bank changed since the last paint (generation bump). // Cheap when nothing changed. Driven by the timer so a capture / project load is // reflected without the panel diffing the bank itself. Also hosts the every-tick // new-content auto-tag detection (runs whether or not the dock is visible) and the // tooltip hover-delay latch. void bankPanelRefresh(); // Notifies the panel that persist just (re)loaded a project's view model (membership + // active mode). main.cpp calls this on the exact tick it drains persist's load signal // and reapplies the active mode. It re-arms the new-content detector so the just-loaded // project's PRE-EXISTING content is taken as the baseline (reported as nothing new), // never diffed against the previously-open project and mass-tagged into the active mode. // This coordinates the detector's project-identity signal with persist's authoritative // (GUID-primary) one — the two can no longer diverge on a recycled ReaProject* address, // which is what caused a project opened in Design to mis-tag its Arrange tracks. READ/ // arm of panel state only; no project or bank mutation. void bankPanelNotifyProjectLoaded(); // The panel's current tail-mode setting (mode + Manual length), read by the plain // CAPTURE_ITEM / CAPTURE_TRACK actions when building a CaptureRequest so a capture // applies whatever the panel toggle is set to. Default None (exact bounds) — a // capture with no explicit choice stays byte-identical to today. The authoritative // setting lives in ReaSamplerSession (it travels inside the .rpp); the panel mutates // it via the footer Tail button (cycle) and scroll-wheel (Manual fine-adjust), both // owned by this input seam. Safe to call before the panel has ever opened (returns // the default). READ of panel state only. capture::TailSetting bankPanelTailSetting(); } // namespace reasampler