Audacity 3.2.0
TrackPanelResizeHandle.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5TrackPanelResizeHandle.h
6
7Paul Licameli split from TrackPanel.cpp
8
9**********************************************************************/
10
11#ifndef __AUDACITY_TRACK_PANEL_RESIZE_HANDLE__
12#define __AUDACITY_TRACK_PANEL_RESIZE_HANDLE__
13
14#include "UIHandle.h"
15
16class Track;
17
18class TrackPanelResizeHandle final : public UIHandle
19{
21
22public:
23 explicit TrackPanelResizeHandle( const std::shared_ptr<Track> &pTrack, int y );
24
26
27 static HitTestPreview HitPreview(bool bLinked);
28
30
31 std::shared_ptr<Track> GetTrack() const { return mpTrack.lock(); }
32
34 (const TrackPanelMouseEvent &event, AudacityProject *pProject) override;
35
37 (const TrackPanelMouseEvent &event, AudacityProject *pProject) override;
38
40 (const TrackPanelMouseState &state, AudacityProject *pProject)
41 override;
42
44 (const TrackPanelMouseEvent &event, AudacityProject *pProject,
45 wxWindow *pParent) override;
46
47 Result Cancel(AudacityProject *pProject) override;
48
49private:
50 enum Mode {
54 };
56
57 std::weak_ptr<Track> mpTrack;
58
64
66};
67
68#endif
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:225
Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
HitTestPreview Preview(const TrackPanelMouseState &state, AudacityProject *pProject) override
TrackPanelResizeHandle(const TrackPanelResizeHandle &)=delete
static HitTestPreview HitPreview(bool bLinked)
std::weak_ptr< Track > mpTrack
Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
Result Cancel(AudacityProject *pProject) override
Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
TrackPanelResizeHandle & operator=(const TrackPanelResizeHandle &)=default
std::shared_ptr< Track > GetTrack() const
Short-lived drawing and event-handling object associated with a TrackPanelCell.
Definition: UIHandle.h:35
unsigned Result
Definition: UIHandle.h:38