11#ifndef __AUDACITY_SELECT_HANDLE__
12#define __AUDACITY_SELECT_HANDLE__
14#include "../../UIHandle.h"
36 const std::shared_ptr<ChannelView> &pChannelView,
bool useSnap,
43 std::weak_ptr<SelectHandle> &holder,
45 const std::shared_ptr<ChannelView> &pChannelView);
51 std::shared_ptr<const Channel>
FindChannel()
const override;
75 wxWindow *pParent)
override;
91 ViewInfo &viewInfo,
int mouseXCoordinate,
int trackLeftEdge,
93 void AssignSelection(
ViewInfo &viewInfo,
double selend,
Track *pTrack);
95 void StartFreqSelection(
96 ViewInfo &viewInfo,
int mouseYCoordinate,
int trackTopEdge,
98 void AdjustFreqSelection(
100 ViewInfo &viewInfo,
int mouseYCoordinate,
int trackTopEdge,
103 void HandleCenterFrequencyClick(
104 const ViewInfo &viewInfo,
bool shiftDown,
106 static void StartSnappingFreqSelection(
109 void MoveSnappingFreqSelection(
115 static void SnapCenterOnce(
123 const wxRect &rect,
unsigned iPass )
override;
127 const wxRect &rect,
const wxRect &panelRect,
unsigned iPass )
override;
139 bool mUseSnap{
true };
141 bool mSelStartValid{};
142 double mSelStart{ 0.0 };
144 int mSelectionBoundary{ 0 };
156 } mFreqSelMode{ FREQ_SEL_INVALID };
164 double mFreqSelPin{ -1.0 };
167 int mMostRecentX{ -1 }, mMostRecentY{ -1 };
169 bool mAutoScrolling{};
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...
SelectHandle(const SelectHandle &)
std::weak_ptr< const WaveTrack > mFreqSelTrack
SelectHandle & operator=(const SelectHandle &)=default
std::shared_ptr< TimerHandler > mTimerHandler
std::shared_ptr< SelectionStateChanger > mSelectionStateChanger
std::weak_ptr< ChannelView > mpView
std::shared_ptr< SpectrumAnalyst > mFrequencySnapper
std::shared_ptr< SnapManager > mSnapManager
@ FREQ_SEL_SNAPPING_CENTER
Defines a selected portion of a project.
Used for finding the peaks, for snapping to peaks.
Abstract base class for an object holding data associated with points on a time axis.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
virtual void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass)
virtual wxRect DrawingArea(TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass)
Short-lived drawing and event-handling object associated with a TrackPanelCell.
virtual void Enter(bool forward, AudacityProject *pProject)
virtual Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject)=0
virtual std::shared_ptr< const Channel > FindChannel() const =0
virtual Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0
virtual bool IsDragging() const
static UIHandle::Result NeedChangeHighlight(const UIHandle &, const UIHandle &)
virtual HitTestPreview Preview(const TrackPanelMouseState &state, AudacityProject *pProject)=0
virtual bool HasEscape(AudacityProject *pProject) const
virtual bool Escape(AudacityProject *pProject)
virtual Result Cancel(AudacityProject *pProject)=0
virtual Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject)=0
A Track that contains audio waveform data.
std::shared_ptr< Track > FindTrack(TrackPanelCell *pCell)