36 const wxString &aTitle);
38 double getDuration()
const {
return selectedRegion.duration(); }
39 double getT0()
const {
return selectedRegion.t0(); }
40 double getT1()
const {
return selectedRegion.t1(); }
42 bool AdjustEdge(
int iEdge,
double fNewTime);
43 void MoveLabel(
int iEdge,
double fNewTime);
46 static LabelStruct Import(wxTextFile &file,
int &index);
48 void Export(wxTextFile &file)
const;
65 TimeRelations RegionRelation(
double reg_t0,
double reg_t1,
89 static wxString GetDefaultName();
111 void SetLabel(
size_t iLabel,
const LabelStruct &newLabel );
113 void MoveTo(
double dOffset)
override;
115 void SetSelected(
bool s)
override;
117 using Holder = std::shared_ptr<LabelTrack>;
121 void DoOnProjectTempoChange(
122 const std::optional<double>& oldTempo,
double newTempo)
override;
125 bool HandleXMLTag(
const std::string_view& tag,
const AttributesList& attrs)
override;
126 XMLTagHandler *HandleXMLChild(
const std::string_view& tag)
override;
127 void WriteXML(
XMLWriter &xmlFile)
const override;
132 void Clear(
double t0,
double t1)
override;
133 void Paste(
double t,
const Track &src)
override;
134 bool Repeat(
double t0,
double t1,
int n);
135 void SyncLockAdjust(
double oldT1,
double newT1)
override;
138 Silence(
double t0,
double t1,
ProgressReporter reportProgress = {})
override;
139 void InsertSilence(
double t,
double len)
override;
141 void Import(wxTextFile & f);
142 void Export(wxTextFile & f)
const;
144 int GetNumLabels()
const;
153 void DeleteLabel(
int index);
156 bool PasteOver(
double t,
const Track &src);
162 void ShiftLabelsOnInsert(
double length,
double pt);
163 void ChangeLabelsOnReverse(
double b,
double e);
164 void ScaleLabels(
double b,
double e,
double change);
165 double AdjustTimeStampOnScale(
double t,
double b,
double e,
double change);
169 wxString GetTextOfLabels(
double t0,
double t1)
const;
174 const TypeInfo &GetTypeInfo()
const override;
175 static const TypeInfo &ClassTypeInfo();
182 double start,
double end,
size_t index
188 std::shared_ptr<ChannelInterval> DoGetChannel(
size_t iChannel)
override;
192 std::shared_ptr<Interval> MakeInterval(
size_t index);
197 size_t NIntervals()
const override;
200 std::shared_ptr<WideChannelGroupInterval> DoGetInterval(
size_t iInterval)
234 const wxString &
title,
const TranslatableString name
std::vector< LabelStruct > LabelArray
ENUMERATE_TRACK_TYPE(LabelTrack)
declares abstract base class Track, TrackList, and iterators over TrackList
std::function< void(double)> ProgressReporter
std::shared_ptr< TrackList > TrackListHolder
std::vector< Attribute > AttributesList
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Main class to control the export function.
A LabelStruct holds information for ONE label in a LabelTrack.
const SelectedRegion & getSelectedRegion() const
TimeRelations
Relationships between selection region and labels.
SelectedRegion selectedRegion
double getDuration() const
A LabelTrack is a Track that holds labels (LabelStruct).
const LabelArray & GetLabels() const
std::shared_ptr< LabelTrack > Holder
void OnLabelAdded(const wxString &title, int pos)
An object that sends messages to an open-ended list of subscribed callbacks.
Defines a selected portion of a project.
Transforms one point in time to another point. For example, a time stretching effect might use one to...
Abstract base class for an object holding data associated with points on a time axis.
std::shared_ptr< Track > Holder
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Generates overrides of channel-related functions.
This class is an interface which should be implemented by classes which wish to be able to load and s...
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Interval(const ChannelGroup &group, double start, double end, size_t index)
LabelTrackEvent(Type type, const std::shared_ptr< LabelTrack > &pTrack, const wxString &title, int formerPosition, int presentPosition)
const std::weak_ptr< Track > mpTrack
enum LabelTrackEvent::Type type
Empty argument passed to some public constructors.