11#ifndef __AUDACITY_SELECT_HANDLE__
12#define __AUDACITY_SELECT_HANDLE__
14#include "../../UIHandle.h"
38 const std::shared_ptr<ChannelView> &pChannelView,
bool useSnap,
45 std::weak_ptr<SelectHandle> &holder,
47 const std::shared_ptr<ChannelView> &pChannelView);
53 std::shared_ptr<const Track>
FindTrack()
const override;
77 wxWindow *pParent)
override;
86 std::shared_ptr<Channel> FindChannel();
95 ViewInfo &viewInfo,
int mouseXCoordinate,
int trackLeftEdge,
97 void AssignSelection(
ViewInfo &viewInfo,
double selend);
99 void StartFreqSelection(
100 ViewInfo &viewInfo,
int mouseYCoordinate,
int trackTopEdge,
103 ViewInfo &viewInfo,
int mouseYCoordinate,
int trackTopEdge,
106 void HandleCenterFrequencyClick(
107 const ViewInfo &viewInfo,
bool shiftDown,
108 const std::shared_ptr<const WaveChannel> &pWc,
double value);
111 void MoveSnappingFreqSelection(
124 const wxRect &rect,
unsigned iPass )
override;
128 const wxRect &rect,
const wxRect &panelRect,
unsigned iPass )
override;
140 bool mUseSnap{
true };
142 bool mSelStartValid{};
143 double mSelStart{ 0.0 };
145 int mSelectionBoundary{ 0 };
157 } mFreqSelMode{ FREQ_SEL_INVALID };
165 double mFreqSelPin{ -1.0 };
168 int mMostRecentX{ -1 }, mMostRecentY{ -1 };
170 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 WaveChannel > 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 Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0
virtual std::shared_ptr< const Track > FindTrack() const =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.