Phase L L3: restyle VST editor + embed strip through the L1 kit (B pastel + spectral strip)
This commit is contained in:
@@ -100,6 +100,34 @@ private:
|
||||
// a different marker set; here it is start-point + the sustain loop's two ends.
|
||||
enum class WaveMarker { kStart = 0, kLoopStart = 1, kLoopEnd = 2, kCount = 3 };
|
||||
|
||||
// --- Hover model (Phase L, L3) ------------------------------------------------
|
||||
//
|
||||
// The interactive element under the pointer, resolved live in WM_MOUSEMOVE so the kit
|
||||
// draws its hover state on that element only ("hover on every interactive element" +
|
||||
// "sub-frame feedback = the perception of speed", §3.3/§3.5). Cleared to kNone on
|
||||
// WM_MOUSELEAVE (tracked via TrackMouseEvent). `index` disambiguates within a kind
|
||||
// (tab ordinal, visible-card index, control-row id); -1 when not applicable. Mirror of
|
||||
// bank_panel's L2 hover model.
|
||||
enum class HoverKind {
|
||||
kNone,
|
||||
kToggleBrowser, // the Browser toggle segment
|
||||
kToggleZones, // the Zones toggle segment
|
||||
kSearchBox, // the browser search box
|
||||
kFilterTab, // a bank-filter tab (index = tab ordinal, 0 = All)
|
||||
kCard, // a capture card (index = visible_ index)
|
||||
kChanMono, // the mono channel-mode segment
|
||||
kChanStereo, // the stereo channel-mode segment
|
||||
kAddZone, // the "+ Add Zone" button
|
||||
kDeleteZone, // the "Delete" zone button
|
||||
kControl, // a param-panel control row (index = ControlDesc id)
|
||||
};
|
||||
struct HoverTarget {
|
||||
HoverKind kind = HoverKind::kNone;
|
||||
int index = -1;
|
||||
bool operator==(const HoverTarget& o) const { return kind == o.kind && index == o.index; }
|
||||
bool operator!=(const HoverTarget& o) const { return !(*this == o); }
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
void paint(HDC hdc);
|
||||
void paintBrowser(LICE_IBitmap* bmp, int w, int h);
|
||||
@@ -111,6 +139,17 @@ private:
|
||||
void onMouseDown(int x, int y);
|
||||
void onMouseMove(int x, int y);
|
||||
void onMouseUp(int x, int y);
|
||||
|
||||
// Resolve the interactive element under (x, y) into hover_ (Phase L, L3). Called from
|
||||
// WM_MOUSEMOVE (also while a drag is in flight — the resolved element just isn't used
|
||||
// for a hover repaint mid-drag). Repaints only when the hovered element changed, so an
|
||||
// idle mouse-move is free. Windows-only (the hit-tests use the shell's Win32 client rect).
|
||||
void resolveHover(int x, int y);
|
||||
// True iff element (kind, index) is the live hover_ target — the shell maps this to the
|
||||
// kit's Hover interaction state when the element has no more-specific state (Active, etc.).
|
||||
bool isHovered(HoverKind kind, int index) const {
|
||||
return hover_.kind == kind && hover_.index == index;
|
||||
}
|
||||
void onMouseWheel(int delta); // S12 browser scroll (wheel)
|
||||
void onSearchChar(unsigned int ch); // S12 type-to-filter search keystroke
|
||||
|
||||
@@ -242,6 +281,12 @@ private:
|
||||
int entryField_ = -1;
|
||||
std::string entryText_;
|
||||
|
||||
// --- Hover state (Phase L, L3; transient, never persisted) --------------------
|
||||
HoverTarget hover_; // the interactive element under the pointer
|
||||
#ifdef _WIN32
|
||||
bool mouseTracking_ = false; // TrackMouseEvent armed for WM_MOUSELEAVE this "over" cycle
|
||||
#endif
|
||||
|
||||
// --- Drag-state machine ------------------------------------------------------
|
||||
DragKind drag_ = DragKind::kNone;
|
||||
int dragStartX_ = 0; // grab x (px), for the pixel-delta resolver
|
||||
|
||||
Reference in New Issue
Block a user