11#ifndef __AUDACITY_SAMPLE_HANDLE__
12#define __AUDACITY_SAMPLE_HANDLE__
14#include "../../../../UIHandle.h"
29 (
const wxMouseState &state,
const AudacityProject *pProject,
bool unsafe);
32 explicit SampleHandle(
const std::shared_ptr<WaveChannel> &pTrack);
37 std::weak_ptr<SampleHandle> &holder,
38 const wxMouseState &state,
const std::shared_ptr<WaveChannel> &pChannel);
40 std::weak_ptr<SampleHandle> &holder,
41 const wxMouseState &state,
const wxRect &rect,
43 const std::shared_ptr<WaveChannel> &pChannel);
47 std::shared_ptr<const Track>
FindTrack()
const override;
63 wxWindow *pParent)
override;
71 (
const wxMouseEvent &event,
const ViewInfo &viewInfo,
double t0);
std::shared_ptr< UIHandle > UIHandlePtr
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
std::shared_ptr< WaveClipChannel > mClickedClip
Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
float FindSampleEditingLevel(const wxMouseEvent &event, const ViewInfo &viewInfo, double t0)
float mLastDragSampleValue
std::shared_ptr< WaveChannel > mClickedTrack
Result Cancel(AudacityProject *pProject) override
bool StopsOnKeystroke() override
static HitTestPreview HitPreview(const wxMouseState &state, const AudacityProject *pProject, bool unsafe)
static UIHandlePtr HitAnywhere(std::weak_ptr< SampleHandle > &holder, const wxMouseState &state, const std::shared_ptr< WaveChannel > &pChannel)
void Enter(bool forward, AudacityProject *) override
Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
SampleHandle & operator=(const SampleHandle &)=default
std::shared_ptr< const Track > FindTrack() const override
HitTestPreview Preview(const TrackPanelMouseState &state, AudacityProject *pProject) override
Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
static UIHandlePtr HitTest(std::weak_ptr< SampleHandle > &holder, const wxMouseState &state, const wxRect &rect, const AudacityProject *pProject, const std::shared_ptr< WaveChannel > &pChannel)
SampleHandle(const SampleHandle &)=delete
Abstract base class for an object holding data associated with points on a time axis.
Short-lived drawing and event-handling object associated with a TrackPanelCell.