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#ifdef EXPERIMENTAL_MIDI_OUT
15
16#include "../../../ui/SliderHandle.h"
17
18class NoteTrack;
19class wxMouseState;
20
21class VelocitySliderHandle final : public SliderHandle
22{
23 VelocitySliderHandle(const VelocitySliderHandle&) = delete;
24
25 std::shared_ptr<NoteTrack> GetNoteTrack() const;
26
27public:
28 explicit VelocitySliderHandle
29 ( SliderFn sliderFn, const wxRect &rect,
30 const std::shared_ptr<Track> &pTrack );
31
32 VelocitySliderHandle &operator=(const VelocitySliderHandle&) = default;
33
34 virtual ~VelocitySliderHandle();
35
36protected:
37 float GetValue() override;
39 (AudacityProject *pProject, float newValue) override;
41 (const wxMouseEvent &event, AudacityProject *pProject) override;
42
44 const wxMouseState &state, AudacityProject &) const override;
45
46 bool StopsOnKeystroke () override { return true; }
47
48public:
49 static UIHandlePtr HitTest
50 (std::weak_ptr<VelocitySliderHandle> &holder,
51 const wxMouseState &state, const wxRect &rect,
52 const std::shared_ptr<Track> &pTrack);
53};
54
55#endif
56
57#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:86
virtual Result SetValue(AudacityProject *pProject, float newValue)=0
SliderHandle & operator=(const SliderHandle &)=default
virtual TranslatableString Tip(const wxMouseState &state, AudacityProject &project) const =0
virtual Result CommitChanges(const wxMouseEvent &event, AudacityProject *pProject)=0
virtual float GetValue()=0
Holds a msgid for the translation catalog; may also bind format arguments.
virtual bool StopsOnKeystroke()
Definition: UIHandle.cpp:49
bool HitTest(const RectangleArgs &args, const wxPoint &mousePos)