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 SetOffset(
double dOffset)
override;
115 void SetSelected(
bool s)
override;
117 double GetOffset()
const override;
118 double GetStartTime()
const override;
119 double GetEndTime()
const override;
121 using Holder = std::shared_ptr<LabelTrack>;
127 bool HandleXMLTag(
const std::string_view& tag,
const AttributesList& attrs)
override;
128 XMLTagHandler *HandleXMLChild(
const std::string_view& tag)
override;
129 void WriteXML(
XMLWriter &xmlFile)
const override;
132 Track::Holder Copy (
double t0,
double t1,
bool forClipboard =
true)
const override;
133 void Clear(
double t0,
double t1)
override;
134 void Paste(
double t,
const Track * src)
override;
135 bool Repeat(
double t0,
double t1,
int n);
136 void SyncLockAdjust(
double oldT1,
double newT1)
override;
138 void Silence(
double t0,
double t1)
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();
183 ConstInterval MakeInterval (
size_t index )
const;
184 Interval MakeInterval (
size_t index );
185 ConstIntervals GetIntervals()
const override;
186 Intervals GetIntervals()
override;
223 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::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...
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...
IntervalData(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.
Optional extra information about an interval, appropriate to a subtype of Track.