Audacity 3.2.0
|
Defines a selected portion of a project. More...
#include <SelectedRegion.h>
Public Member Functions | |
SelectedRegion () | |
SelectedRegion (double t0, double t1) | |
SelectedRegion (const SelectedRegion &x) | |
SelectedRegion & | operator= (const SelectedRegion &x) |
double | t0 () const |
double | t1 () const |
double | duration () const |
bool | isPoint () const |
double | f0 () const |
double | f1 () const |
double | fc () const |
bool | setT0 (double t, bool maySwap=true) |
bool | setT1 (double t, bool maySwap=true) |
bool | setTimes (double t0, double t1) |
bool | moveT0 (double delta, bool maySwap=true) |
bool | moveT1 (double delta, bool maySwap=true) |
void | move (double delta) |
void | collapseToT0 () |
void | collapseToT1 () |
bool | setF0 (double f, bool maySwap=true) |
bool | setF1 (double f, bool maySwap=true) |
bool | setFrequencies (double f0, double f1) |
void | WriteXMLAttributes (XMLWriter &xmlFile, const char *legacyT0Name=sDefaultT0Name, const char *legacyT1Name=sDefaultT1Name) const |
bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &value, const char *legacyT0Name=sDefaultT0Name, const char *legacyT1Name=sDefaultT1Name) |
bool | ensureOrdering () |
Static Public Member Functions | |
static XMLMethodRegistryBase::Mutators< SelectedRegion > | Mutators (const char *legacyT0Name, const char *legacyT1Name) |
Static Public Attributes | |
static const int | UndefinedFrequency = -1 |
static const char * | sDefaultT0Name = "selStart" |
static const char * | sDefaultT1Name = "selEnd" |
Private Member Functions | |
bool | ensureFrequencyOrdering () |
Private Attributes | |
double | mT0 |
double | mT1 |
double | mF0 |
double | mF1 |
Friends | |
bool | operator== (const SelectedRegion &lhs, const SelectedRegion &rhs) |
Defines a selected portion of a project.
This includes starting and ending times, and other optional information such as a frequency range, but not the set of selected tracks.
Maintains the invariants that ending time is not less than starting time and that starting and ending frequencies, when both defined, are also correctly ordered.
Definition at line 38 of file SelectedRegion.h.
|
inline |
Definition at line 46 of file SelectedRegion.h.
|
inline |
Definition at line 53 of file SelectedRegion.h.
|
inline |
|
inline |
Definition at line 150 of file SelectedRegion.h.
Referenced by NotifyingSelectedRegion::collapseToT0().
|
inline |
Definition at line 152 of file SelectedRegion.h.
Referenced by NotifyingSelectedRegion::collapseToT1().
|
inline |
Definition at line 88 of file SelectedRegion.h.
|
inlineprivate |
Definition at line 237 of file SelectedRegion.h.
|
inline |
|
inline |
Definition at line 91 of file SelectedRegion.h.
Referenced by LabelStruct::Export(), LabelDialog::OnChangeHfreq(), NotifyingSelectedRegion::setF0(), NotifyingSelectedRegion::setFrequencies(), and LabelDialog::TransferDataToWindow().
|
inline |
Definition at line 92 of file SelectedRegion.h.
Referenced by LabelStruct::Export(), LabelDialog::OnChangeLfreq(), NotifyingSelectedRegion::setF1(), NotifyingSelectedRegion::setFrequencies(), and LabelDialog::TransferDataToWindow().
|
inline |
Definition at line 93 of file SelectedRegion.h.
References staffpad::audio::simd::sqrt().
bool SelectedRegion::HandleXMLAttribute | ( | const std::string_view & | attr, |
const XMLAttributeValueView & | value, | ||
const char * | legacyT0Name = sDefaultT0Name , |
||
const char * | legacyT1Name = sDefaultT1Name |
||
) |
Definition at line 37 of file SelectedRegion.cpp.
References anonymous_namespace{SelectedRegion.cpp}::sDefaultF0Name, anonymous_namespace{SelectedRegion.cpp}::sDefaultF1Name, setF0(), setF1(), setT0(), setT1(), and XMLAttributeValueView::TryGet().
Referenced by LabelTrack::HandleXMLTag().
|
inline |
Definition at line 89 of file SelectedRegion.h.
Referenced by ExportAudioDialog::UpdateLabelExportSettings().
|
inline |
Definition at line 145 of file SelectedRegion.h.
Referenced by NotifyingSelectedRegion::move().
|
inline |
Definition at line 136 of file SelectedRegion.h.
|
inline |
Definition at line 141 of file SelectedRegion.h.
|
static |
Definition at line 66 of file SelectedRegion.cpp.
References anonymous_namespace{SelectedRegion.cpp}::sDefaultF0Name, and anonymous_namespace{SelectedRegion.cpp}::sDefaultF1Name.
Referenced by NotifyingSelectedRegion::Mutators().
|
inline |
|
inline |
Definition at line 155 of file SelectedRegion.h.
Referenced by HandleXMLAttribute(), LabelDialog::OnChangeLfreq(), and NotifyingSelectedRegion::setF0().
|
inline |
Definition at line 169 of file SelectedRegion.h.
Referenced by HandleXMLAttribute(), LabelDialog::OnChangeHfreq(), and NotifyingSelectedRegion::setF1().
|
inline |
Definition at line 183 of file SelectedRegion.h.
Referenced by LabelStruct::Import(), and NotifyingSelectedRegion::setFrequencies().
|
inline |
Definition at line 105 of file SelectedRegion.h.
Referenced by LabelStruct::AdjustEdge(), HandleXMLAttribute(), LabelDialog::OnChangeStime(), and NotifyingSelectedRegion::setT0().
|
inline |
Definition at line 117 of file SelectedRegion.h.
Referenced by LabelStruct::AdjustEdge(), HandleXMLAttribute(), LabelDialog::OnChangeEtime(), and NotifyingSelectedRegion::setT1().
|
inline |
Definition at line 129 of file SelectedRegion.h.
Referenced by LabelStruct::Import(), LabelStruct::LabelStruct(), LabelStruct::MoveLabel(), and NotifyingSelectedRegion::setTimes().
|
inline |
Definition at line 86 of file SelectedRegion.h.
Referenced by LabelTrack::AddLabel(), NotifyingSelectedRegion::collapseToT0(), NotifyingSelectedRegion::collapseToT1(), LabelTrackView::DialogForLabelName(), AdornedRulerPanel::DoSelectionChange(), LabelTrack::FindNextLabel(), LabelTrack::FindPrevLabel(), anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel(), anonymous_namespace{SpectrumView.cpp}::GetSelectedSampleIndices(), LabelDialog::OnChangeEtime(), SelectActions::Handler::OnSelectionRestore(), ProjectAudioManager::PlayPlayRegion(), TransportUtilities::PlayPlayRegionAndWait(), NotifyingSelectedRegion::setT0(), NotifyingSelectedRegion::setTimes(), LabelDialog::TransferDataToWindow(), and ExportAudioDialog::UpdateLabelExportSettings().
|
inline |
Definition at line 87 of file SelectedRegion.h.
Referenced by NotifyingSelectedRegion::collapseToT0(), NotifyingSelectedRegion::collapseToT1(), AdornedRulerPanel::DoSelectionChange(), anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel(), anonymous_namespace{SpectrumView.cpp}::GetSelectedSampleIndices(), LabelDialog::OnChangeStime(), SelectActions::Handler::OnSelectionRestore(), ProjectAudioManager::PlayPlayRegion(), TransportUtilities::PlayPlayRegionAndWait(), NotifyingSelectedRegion::setT1(), NotifyingSelectedRegion::setTimes(), LabelDialog::TransferDataToWindow(), and ExportAudioDialog::UpdateLabelExportSettings().
void SelectedRegion::WriteXMLAttributes | ( | XMLWriter & | xmlFile, |
const char * | legacyT0Name = sDefaultT0Name , |
||
const char * | legacyT1Name = sDefaultT1Name |
||
) | const |
Definition at line 24 of file SelectedRegion.cpp.
References anonymous_namespace{SelectedRegion.cpp}::sDefaultF0Name, and anonymous_namespace{SelectedRegion.cpp}::sDefaultF1Name.
|
friend |
|
private |
Definition at line 269 of file SelectedRegion.h.
Referenced by operator=().
|
private |
Definition at line 270 of file SelectedRegion.h.
Referenced by operator=().
|
private |
Definition at line 267 of file SelectedRegion.h.
Referenced by operator=().
|
private |
Definition at line 268 of file SelectedRegion.h.
Referenced by operator=().
|
static |
Definition at line 197 of file SelectedRegion.h.
|
static |
Definition at line 198 of file SelectedRegion.h.
|
static |
Definition at line 44 of file SelectedRegion.h.
Referenced by SelectHandle::AdjustFreqSelection(), NumericEditor::Create(), EffectBase::DoEffect(), anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), LabelStruct::Export(), SpectralSelectionBar::ModifySpectralSelection(), anonymous_namespace{SpectrumView.cpp}::Handler::OnToggleSpectralSelection(), SpectralSelectionBar::Populate(), and SelectHandle::StartFreqSelection().