Audacity 3.2.0
WaveTrackUtils.cpp
Go to the documentation of this file.
1/*!********************************************************************
2*
3 Audacity: A Digital Audio Editor
4
5 @file WaveTrackUtils.cpp
6
7 Vitaly Sverchinsky
8
9 **********************************************************************/
10
11#include "WaveTrackUtils.h"
12#include "ViewInfo.h"
13#include "WaveClip.h"
14
15
16bool WaveTrackUtils::IsClipSelected(const ViewInfo& viewInfo, const WaveClip& clip)
17{
18 return clip.GetPlayStartTime() == viewInfo.selectedRegion.t0() &&
19 clip.GetPlayEndTime() == viewInfo.selectedRegion.t1();
20}
Contains some useful wave track external routines grouped into a single namespace.
double t1() const
Definition: ViewInfo.h:36
double t0() const
Definition: ViewInfo.h:35
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:215
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:138
double GetPlayStartTime() const noexcept override
Definition: WaveClip.cpp:1343
double GetPlayEndTime() const override
Definition: WaveClip.cpp:1353
bool IsClipSelected(const ViewInfo &viewInfo, const WaveClip &waveClip)
Decide whether a clip is selected from its start and end times (only)