1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-27 07:01:12 +01:00

TrackPanel simplifications; improved cursor handling...

... in cases such as:  dragging an envelope point, then hitting space to play,
which forces the drag to finish early.  If you move the mouse, cursor will
remain "ban", even while the mouse button remains down but no drag is really
happening.
This commit is contained in:
Paul Licameli
2017-06-08 17:27:41 -04:00
parent 114f5a4a63
commit d9a91c1431
3 changed files with 139 additions and 159 deletions

View File

@@ -44,6 +44,7 @@ class MixerBoard;
class AudacityProject;
class TrackPanelAx;
struct TrackPanelMouseEvent;
class ViewInfo;
@@ -302,6 +303,7 @@ class AUDACITY_DLL_API TrackPanel final : public OverlayPanel {
// void SetSnapTo(int snapto)
void HandleInterruptedDrag();
void Uncapture( wxMouseEvent *pEvent = nullptr );
void CancelDragging();
bool HandleEscapeKey(bool down);
void HandleAltKey(bool down);
@@ -336,7 +338,7 @@ class AUDACITY_DLL_API TrackPanel final : public OverlayPanel {
protected:
bool IsAudioActive();
void HandleTrackSpecificMouseEvent(wxMouseEvent & event);
void HandleClick( const TrackPanelMouseEvent &tpmEvent );
public:
size_t GetTrackCount() const;
@@ -349,10 +351,8 @@ public:
void UpdateAccessibility();
void MessageForScreenReader(const wxString& message);
void HandleCursor(wxMouseEvent & event);
// MM: Handle mouse wheel rotation
void HandleWheelRotation(wxMouseEvent & event);
void HandleWheelRotation( TrackPanelMouseEvent &tpmEvent );
void MakeParentRedrawScrollbars();
@@ -370,6 +370,11 @@ protected:
};
FoundCell FindCell(int mouseX, int mouseY);
void HandleCursor( wxMouseEvent *pEvent );
void HandleCursor
( const TrackPanelMouseEvent &tpmEvent,
CellType cellType = CellType::Background );
// If label, rectangle includes track control panel only.
// If !label, rectangle includes all of that, and the vertical ruler, and
// the proper track area.