14#include "../../widgets/ASlider.h"
15#include "../../HitTestResult.h"
16#include "../../RefreshCode.h"
18#include "../../TrackPanelMouseEvent.h"
21(
SliderFn sliderFn,
const wxRect &rect,
const std::shared_ptr<Track> &pTrack )
24 , mSliderFn{ sliderFn }
50 wxMouseEvent &
event = evt.
event;
52 if (!event.Button(wxMOUSE_BTN_LEFT))
58 slider->OnMouseEvent(event);
59 const float newValue = slider->Get();
62 auto result =
SetValue(pProject, newValue);
64 if (event.ButtonDClick())
77 wxMouseEvent &
event = evt.
event;
93 return { message, {}, message };
101 wxMouseEvent &
event = evt.
event;
108 result |=
SetValue(pProject, newValue);
117 wxMouseEvent event(wxEVT_LEFT_UP);
declares abstract base class Track, TrackList, and iterators over TrackList
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Lightweight version of ASlider. In other words it does not have a window permanently associated with ...
void OnMouseEvent(wxMouseEvent &event)
float Get(bool convert=true)
Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject) final override
virtual Result SetValue(AudacityProject *pProject, float newValue)=0
LWSlider *(*)(AudacityProject *, const wxRect &, Track *) SliderFn
HitTestPreview Preview(const TrackPanelMouseState &state, AudacityProject *pProject) final override
Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject) final override
bool IsDragging() const override
Result Cancel(AudacityProject *pProject) final override
SliderHandle(const SliderHandle &)=delete
virtual TranslatableString Tip(const wxMouseState &state, AudacityProject &project) const =0
LWSlider * GetSlider(AudacityProject *pProject)
void Enter(bool forward, AudacityProject *) override
virtual Result CommitChanges(const wxMouseEvent &event, AudacityProject *pProject)=0
virtual float GetValue()=0
Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) final override
std::shared_ptr< const Track > FindTrack() const override
std::weak_ptr< Track > mpTrack
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
static TrackList & Get(AudacityProject &project)
Holds a msgid for the translation catalog; may also bind format arguments.
Namespace containing an enum 'what to do on a refresh?'.