Audacity 3.2.0
LabelDefaultClickHandle.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5LabelDefaultClickHandle.h
6
7Paul Licameli split from TrackPanel.cpp
8
9**********************************************************************/
10
11#ifndef __AUDACITY_LABEL_DEFAULT_CLICK_HANDLE__
12#define __AUDACITY_LABEL_DEFAULT_CLICK_HANDLE__
13
14#include "../../../UIHandle.h"
15
16class wxMouseEvent;
17class LabelTrack;
18
19// Used as a base class.
20// Adds some behavior to clicks.
21class LabelDefaultClickHandle /* not final */ : public UIHandle
22{
23public:
26
28 (const LabelDefaultClickHandle&) = default;
29
31 (const TrackPanelMouseEvent &event, AudacityProject *pProject) override;
32
34 (const TrackPanelMouseEvent &event, AudacityProject *pProject) override;
35
36 // does not override Preview()
37
39 (const TrackPanelMouseEvent &event, AudacityProject *pProject,
40 wxWindow *pParent) override;
41
42 Result Cancel(AudacityProject *pProject) override;
43
44private:
45 struct LabelState;
46 std::shared_ptr< LabelState > mLabelState;
47 void SaveState( AudacityProject *pProject );
48 void RestoreState( AudacityProject *pProject );
49};
50
51#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
Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
std::shared_ptr< LabelState > mLabelState
Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
void RestoreState(AudacityProject *pProject)
Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
void SaveState(AudacityProject *pProject)
Result Cancel(AudacityProject *pProject) override
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:98
Short-lived drawing and event-handling object associated with a TrackPanelCell.
Definition: UIHandle.h:37
unsigned Result
Definition: UIHandle.h:40