mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-04 18:53:24 +01:00
Further regularize the odd case of hit-test on the resizer region
This commit is contained in:
@@ -11,6 +11,7 @@ Paul Licameli split from TrackPanel.cpp
|
||||
#ifndef __AUDACITY_TRACK_PANEL_RESIZE_HANDLE__
|
||||
#define __AUDACITY_TRACK_PANEL_RESIZE_HANDLE__
|
||||
|
||||
#include "CommonTrackPanelCell.h"
|
||||
#include "UIHandle.h"
|
||||
|
||||
struct HitTestResult;
|
||||
@@ -65,4 +66,23 @@ private:
|
||||
int mMouseClickY{};
|
||||
};
|
||||
|
||||
class TrackPanelResizerCell : public CommonTrackPanelCell
|
||||
{
|
||||
TrackPanelResizerCell() {}
|
||||
TrackPanelResizerCell(const TrackPanelResizerCell&) = delete;
|
||||
TrackPanelResizerCell &operator= (const TrackPanelResizerCell&) = delete;
|
||||
public:
|
||||
static TrackPanelResizerCell &Instance();
|
||||
|
||||
HitTestResult HitTest
|
||||
(const TrackPanelMouseEvent &event,
|
||||
const AudacityProject *pProject) override;
|
||||
|
||||
Track *FindTrack() override { return mpTrack; };
|
||||
private:
|
||||
friend class TrackPanel;
|
||||
Track *mpTrack {};
|
||||
bool mBetweenTracks {};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user