Audacity 3.2.0
|
A LabelStruct holds information for ONE label in a LabelTrack. More...
#include <LabelTrack.h>
Classes | |
struct | BadFormatException |
Public Types | |
enum | TimeRelations { BEFORE_LABEL , AFTER_LABEL , SURROUNDS_LABEL , WITHIN_LABEL , BEGINS_IN_LABEL , ENDS_IN_LABEL } |
Relationships between selection region and labels. More... | |
Public Member Functions | |
LabelStruct ()=default | |
LabelStruct (const SelectedRegion ®ion, const wxString &aTitle) | |
LabelStruct (const SelectedRegion ®ion, double t0, double t1, const wxString &aTitle) | |
const SelectedRegion & | getSelectedRegion () const |
double | getDuration () const |
double | getT0 () const |
double | getT1 () const |
bool | AdjustEdge (int iEdge, double fNewTime) |
void | MoveLabel (int iEdge, double fNewTime) |
void | Export (wxTextFile &file, LabelFormat format, int index) const |
TimeRelations | RegionRelation (double reg_t0, double reg_t1, const LabelTrack *parent=NULL) const |
Static Public Member Functions | |
static LabelStruct | Import (wxTextFile &file, int &index, LabelFormat format) |
Public Attributes | |
SelectedRegion | selectedRegion |
wxString | title |
int | width {} |
Text of the label. More... | |
int | x {} |
width of the text in pixels. More... | |
int | x1 {} |
Pixel position of left hand glyph. More... | |
int | xText {} |
Pixel position of right hand glyph. More... | |
int | y {} |
Pixel position of left hand side of text box. More... | |
bool | updated {} |
Pixel position of label. More... | |
A LabelStruct holds information for ONE label in a LabelTrack.
LabelStruct also has label specific functions, mostly functions for drawing different aspects of the label and its text box.
Definition at line 36 of file LabelTrack.h.
Relationships between selection region and labels.
Enumerator | |
---|---|
BEFORE_LABEL | |
AFTER_LABEL | |
SURROUNDS_LABEL | |
WITHIN_LABEL | |
BEGINS_IN_LABEL | |
ENDS_IN_LABEL |
Definition at line 59 of file LabelTrack.h.
|
default |
LabelStruct::LabelStruct | ( | const SelectedRegion & | region, |
const wxString & | aTitle | ||
) |
Definition at line 309 of file LabelTrack.cpp.
LabelStruct::LabelStruct | ( | const SelectedRegion & | region, |
double | t0, | ||
double | t1, | ||
const wxString & | aTitle | ||
) |
Definition at line 322 of file LabelTrack.cpp.
References selectedRegion, SelectedRegion::setTimes(), updated, width, x, x1, xText, and y.
bool LabelStruct::AdjustEdge | ( | int | iEdge, |
double | fNewTime | ||
) |
Definition at line 357 of file LabelTrack.cpp.
References selectedRegion, SelectedRegion::setT0(), SelectedRegion::setT1(), and updated.
void LabelStruct::Export | ( | wxTextFile & | file, |
LabelFormat | format, | ||
int | index | ||
) | const |
Definition at line 575 of file LabelTrack.cpp.
References SelectedRegion::f0(), SelectedRegion::f1(), anonymous_namespace{ExportPCM.cpp}::format, getT0(), getT1(), anonymous_namespace{LabelTrack.cpp}::LabelStyleSetting, EnumSetting< Enum >::ReadEnum(), selectedRegion, SUBRIP, SubRipTimestampFromDouble(), TEXT, title, Internat::ToString(), SelectedRegion::UndefinedFrequency, WEBVTT, and wxT().
|
inline |
Definition at line 46 of file LabelTrack.h.
Referenced by MoveLabel().
|
inline |
Definition at line 45 of file LabelTrack.h.
|
inline |
Definition at line 47 of file LabelTrack.h.
Referenced by LabelTrackView::DrawLines(), Export(), and anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel().
|
inline |
Definition at line 48 of file LabelTrack.h.
Referenced by LabelTrackView::DrawLines(), Export(), and anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel().
|
static |
Definition at line 439 of file LabelTrack.cpp.
References Internat::CompatibleToDouble(), anonymous_namespace{ExportPCM.cpp}::format, SelectedRegion::setFrequencies(), SelectedRegion::setTimes(), SUBRIP, SubRipTimestampToDouble(), TEXT, title, and wxT().
Referenced by LabelTrack::Import().
void LabelStruct::MoveLabel | ( | int | iEdge, |
double | fNewTime | ||
) |
Definition at line 367 of file LabelTrack.cpp.
References getDuration(), selectedRegion, SelectedRegion::setTimes(), and updated.
auto LabelStruct::RegionRelation | ( | double | reg_t0, |
double | reg_t1, | ||
const LabelTrack * | parent = NULL |
||
) | const |
Returns relationship between a region described and this label; if parent is set, it will consider point labels at the very beginning and end of parent to be within a region that borders them (this makes it possible to DELETE capture all labels with a Select All).
Definition at line 624 of file LabelTrack.cpp.
References gPrefs, audacity::BasicSettings::Read(), and wxT().
SelectedRegion LabelStruct::selectedRegion |
Definition at line 77 of file LabelTrack.h.
Referenced by LabelDialog::AddLabels(), AdjustEdge(), LabelTrack::Copy(), Export(), anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel(), LabelStruct(), LabelTrack::LabelTrack(), MoveLabel(), LabelTrack::PasteOver(), and ExportAudioDialog::UpdateLabelExportSettings().
wxString LabelStruct::title |
Definition at line 78 of file LabelTrack.h.
Referenced by LabelDialog::AddLabels(), LabelTrackView::DrawText(), Export(), anonymous_namespace{LabelTrackView.cpp}::getXPos(), Import(), and ExportAudioDialog::UpdateLabelExportSettings().
bool LabelStruct::updated {} |
Pixel position of label.
Definition at line 87 of file LabelTrack.h.
Referenced by AdjustEdge(), LabelStruct(), and MoveLabel().
|
mutable |
Text of the label.
Definition at line 79 of file LabelTrack.h.
Referenced by LabelTrackView::DrawText(), LabelTrackView::DrawTextBox(), LabelStruct(), and LabelTrackView::OverTextBox().
|
mutable |
width of the text in pixels.
Definition at line 82 of file LabelTrack.h.
Referenced by LabelTrackView::DrawBar(), LabelTrackView::DrawGlyphs(), LabelTrackView::DrawLines(), and LabelStruct().
|
mutable |
Pixel position of left hand glyph.
Definition at line 83 of file LabelTrack.h.
Referenced by LabelTrackView::DrawBar(), LabelTrackView::DrawGlyphs(), LabelTrackView::DrawLines(), and LabelStruct().
|
mutable |
Pixel position of right hand glyph.
Definition at line 84 of file LabelTrack.h.
Referenced by LabelTrackView::DrawText(), LabelTrackView::DrawTextBox(), anonymous_namespace{LabelTrackView.cpp}::getXPos(), LabelStruct(), and LabelTrackView::OverTextBox().
|
mutable |
Pixel position of left hand side of text box.
Definition at line 85 of file LabelTrack.h.
Referenced by LabelTrackView::DrawBar(), LabelTrackView::DrawGlyphs(), LabelTrackView::DrawHighlight(), LabelTrackView::DrawLines(), LabelTrackView::DrawText(), LabelTrackView::DrawTextBox(), LabelStruct(), LabelTrackView::OverTextBox(), and LabelTrackView::ShowContextMenu().