![]() |
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) 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) |
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 28 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 51 of file LabelTrack.h.
|
default |
LabelStruct::LabelStruct | ( | const SelectedRegion & | region, |
const wxString & | aTitle | ||
) |
Definition at line 306 of file LabelTrack.cpp.
LabelStruct::LabelStruct | ( | const SelectedRegion & | region, |
double | t0, | ||
double | t1, | ||
const wxString & | aTitle | ||
) |
Definition at line 319 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 355 of file LabelTrack.cpp.
References selectedRegion, SelectedRegion::setT0(), SelectedRegion::setT1(), and updated.
void LabelStruct::Export | ( | wxTextFile & | file | ) | const |
Definition at line 493 of file LabelTrack.cpp.
References getT0(), getT1(), anonymous_namespace{LabelTrack.cpp}::LabelStyleSetting, EnumSetting< Enum >::ReadEnum(), selectedRegion, title, Internat::ToString(), SelectedRegion::UndefinedFrequency, and wxT().
|
inline |
Definition at line 38 of file LabelTrack.h.
Referenced by MoveLabel().
|
inline |
Definition at line 37 of file LabelTrack.h.
|
inline |
Definition at line 39 of file LabelTrack.h.
Referenced by LabelTrackView::DrawLines(), Export(), and anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel().
|
inline |
Definition at line 40 of file LabelTrack.h.
Referenced by LabelTrackView::DrawLines(), Export(), and anonymous_namespace{LabelMenus.cpp}::GetRegionsByLabel().
|
static |
Definition at line 421 of file LabelTrack.cpp.
References Internat::CompatibleToDouble(), SelectedRegion::setTimes(), title, and wxT().
Referenced by LabelTrack::Import().
void LabelStruct::MoveLabel | ( | int | iEdge, |
double | fNewTime | ||
) |
Definition at line 365 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 519 of file LabelTrack.cpp.
References gPrefs, audacity::BasicSettings::Read(), and wxT().
SelectedRegion LabelStruct::selectedRegion |
Definition at line 69 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 70 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 79 of file LabelTrack.h.
Referenced by AdjustEdge(), LabelStruct(), and MoveLabel().
|
mutable |
Text of the label.
Definition at line 71 of file LabelTrack.h.
Referenced by LabelTrackView::DrawText(), LabelTrackView::DrawTextBox(), LabelStruct(), and LabelTrackView::OverTextBox().
|
mutable |
width of the text in pixels.
Definition at line 74 of file LabelTrack.h.
Referenced by LabelTrackView::DrawBar(), LabelTrackView::DrawGlyphs(), LabelTrackView::DrawLines(), and LabelStruct().
|
mutable |
Pixel position of left hand glyph.
Definition at line 75 of file LabelTrack.h.
Referenced by LabelTrackView::DrawBar(), LabelTrackView::DrawGlyphs(), LabelTrackView::DrawLines(), and LabelStruct().
|
mutable |
Pixel position of right hand glyph.
Definition at line 76 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 77 of file LabelTrack.h.
Referenced by LabelTrackView::DrawBar(), LabelTrackView::DrawGlyphs(), LabelTrackView::DrawHighlight(), LabelTrackView::DrawLines(), LabelTrackView::DrawText(), LabelTrackView::DrawTextBox(), LabelStruct(), LabelTrackView::OverTextBox(), and LabelTrackView::ShowContextMenu().