Audacity 3.2.0
NoteTrackSliderHandles.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 NoteTrackSliderHandles.h
6
7 Paul Licameli split from TrackPanel.cpp
8
9 **********************************************************************/
10
11#ifndef __AUDACITY_NOTE_TRACK_SLIDER_HANDLES__
12#define __AUDACITY_NOTE_TRACK_SLIDER_HANDLES__
13
14#include "../../../ui/SliderHandle.h"
15
16class NoteTrack;
17class wxMouseState;
18
20{
22
23 std::shared_ptr<NoteTrack> GetNoteTrack() const;
24
25public:
27 ( SliderFn sliderFn, const wxRect &rect,
28 const std::shared_ptr<Track> &pTrack );
29
31
32 virtual ~VelocitySliderHandle();
33
34protected:
35 float GetValue() override;
37 (AudacityProject *pProject, float newValue) override;
39 (const wxMouseEvent &event, AudacityProject *pProject) override;
40
42 const wxMouseState &state, AudacityProject &) const override;
43
44 bool StopsOnKeystroke () override { return true; }
45
46public:
47 static UIHandlePtr HitTest
48 (std::weak_ptr<VelocitySliderHandle> &holder,
49 const wxMouseState &state, const wxRect &rect,
50 const std::shared_ptr<Track> &pTrack);
51};
52
53#endif
std::shared_ptr< UIHandle > UIHandlePtr
Definition: CellularPanel.h:28
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
A Track that is used for Midi notes. (Somewhat old code).
Definition: NoteTrack.h:78
LWSlider *(*)(AudacityProject *, const wxRect &, Track *) SliderFn
Definition: SliderHandle.h:27
Holds a msgid for the translation catalog; may also bind format arguments.
unsigned Result
Definition: UIHandle.h:40
VelocitySliderHandle & operator=(const VelocitySliderHandle &)=default
std::shared_ptr< NoteTrack > GetNoteTrack() const
TranslatableString Tip(const wxMouseState &state, AudacityProject &) const override
Result SetValue(AudacityProject *pProject, float newValue) override
Result CommitChanges(const wxMouseEvent &event, AudacityProject *pProject) override
VelocitySliderHandle(const VelocitySliderHandle &)=delete
bool StopsOnKeystroke() override
static UIHandlePtr HitTest(std::weak_ptr< VelocitySliderHandle > &holder, const wxMouseState &state, const wxRect &rect, const std::shared_ptr< Track > &pTrack)