![]() |
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 |
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 () |
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 Attributes | |
double | mT0 |
double | mT1 |
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 55 of file SelectedRegion.h.
|
inline |
|
inline |
Definition at line 160 of file SelectedRegion.h.
Referenced by NotifyingSelectedRegion::collapseToT0().
|
inline |
Definition at line 162 of file SelectedRegion.h.
Referenced by NotifyingSelectedRegion::collapseToT1().
|
inline |
Definition at line 96 of file SelectedRegion.h.
|
inline |
bool SelectedRegion::HandleXMLAttribute | ( | const std::string_view & | attr, |
const XMLAttributeValueView & | value, | ||
const char * | legacyT0Name = sDefaultT0Name , |
||
const char * | legacyT1Name = sDefaultT1Name |
||
) |
Definition at line 39 of file SelectedRegion.cpp.
References anonymous_namespace{SelectedRegion.cpp}::sDefaultF0Name, anonymous_namespace{SelectedRegion.cpp}::sDefaultF1Name, setT0(), setT1(), and XMLAttributeValueView::TryGet().
Referenced by LabelTrack::HandleXMLTag().
|
inline |
Definition at line 97 of file SelectedRegion.h.
Referenced by ExportAudioDialog::UpdateLabelExportSettings().
|
inline |
Definition at line 155 of file SelectedRegion.h.
Referenced by NotifyingSelectedRegion::move().
|
inline |
Definition at line 146 of file SelectedRegion.h.
|
inline |
Definition at line 151 of file SelectedRegion.h.
|
static |
Definition at line 70 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 115 of file SelectedRegion.h.
Referenced by LabelStruct::AdjustEdge(), HandleXMLAttribute(), LabelDialog::OnChangeStime(), and NotifyingSelectedRegion::setT0().
|
inline |
Definition at line 127 of file SelectedRegion.h.
Referenced by LabelStruct::AdjustEdge(), HandleXMLAttribute(), LabelDialog::OnChangeEtime(), and NotifyingSelectedRegion::setT1().
|
inline |
Definition at line 139 of file SelectedRegion.h.
Referenced by LabelStruct::Import(), LabelStruct::LabelStruct(), LabelStruct::MoveLabel(), and NotifyingSelectedRegion::setTimes().
|
inline |
Definition at line 94 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 95 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 283 of file SelectedRegion.h.
Referenced by operator=().
|
private |
Definition at line 284 of file SelectedRegion.h.
Referenced by operator=().
|
static |
Definition at line 209 of file SelectedRegion.h.
|
static |
Definition at line 210 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(), and SelectHandle::StartFreqSelection().