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 Channel;
17class Track;
18
20class TrackPanelResizeHandle final : public UIHandle
21{
23
24public:
28 TrackPanelResizeHandle(const std::shared_ptr<Channel> &pChannel, int y);
29
31
32 static HitTestPreview HitPreview(bool bLinked);
33
35
36 std::shared_ptr<const Track> FindTrack() const override;
37 std::shared_ptr<Channel> FindChannel();
38
40 (const TrackPanelMouseEvent &event, AudacityProject *pProject) override;
41
43 (const TrackPanelMouseEvent &event, AudacityProject *pProject) override;
44
46 (const TrackPanelMouseState &state, AudacityProject *pProject)
47 override;
48
50 (const TrackPanelMouseEvent &event, AudacityProject *pProject,
51 wxWindow *pParent) override;
52
53 Result Cancel(AudacityProject *pProject) override;
54
55private:
56 static Track &GetTrack(Channel &channel);
57 Channel *PrevChannel(Channel &channel);
58 Channel *NextChannel(Channel &channel);
59
60 enum Mode {
64 };
66
67 std::weak_ptr<Channel> mwChannel;
68
74
76};
77
78#endif
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:110
Constructed from one channel, but changes height of all channels in a track.
Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
std::weak_ptr< Channel > mwChannel
HitTestPreview Preview(const TrackPanelMouseState &state, AudacityProject *pProject) override
Channel * PrevChannel(Channel &channel)
TrackPanelResizeHandle(const TrackPanelResizeHandle &)=delete
static HitTestPreview HitPreview(bool bLinked)
std::shared_ptr< Channel > FindChannel()
Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
std::shared_ptr< const Track > FindTrack() const override
Result Cancel(AudacityProject *pProject) override
Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
TrackPanelResizeHandle & operator=(const TrackPanelResizeHandle &)=default
static Track & GetTrack(Channel &channel)
Channel * NextChannel(Channel &channel)
Short-lived drawing and event-handling object associated with a TrackPanelCell.
Definition: UIHandle.h:37
unsigned Result
Definition: UIHandle.h:40