Audacity  2.2.2
Public Member Functions | Public Attributes | List of all members
AudacityProject::FoundTrack Struct Reference

#include <Project.h>

Inheritance diagram for AudacityProject::FoundTrack:
AudacityProject::FoundClip AudacityProject::FoundClipBoundary

Public Member Functions

wxString ComposeTrackName () const
 

Public Attributes

const WaveTrackwaveTrack {}
 
int trackNumber {}
 
bool channel {}
 

Detailed Description

Definition at line 311 of file Project.h.

Member Function Documentation

wxString AudacityProject::FoundTrack::ComposeTrackName ( ) const

Definition at line 7428 of file Menus.cpp.

References _(), channel, Track::GetDefaultName(), Track::GetLinked(), Track::GetName(), name, trackNumber, and waveTrack.

7429 {
7430  auto name = waveTrack->GetName();
7431  auto shortName = name == waveTrack->GetDefaultName()
7432  /* i18n-hint: compose a name identifying an unnamed track by number */
7433  ? wxString::Format( _("Track %d"), trackNumber )
7434  : name;
7435  auto longName = shortName;
7436  if (channel) {
7437  if ( waveTrack->GetLinked() )
7438  /* i18n-hint: given the name of a track, specify its left channel */
7439  longName = wxString::Format(_("%s left"), shortName);
7440  else
7441  /* i18n-hint: given the name of a track, specify its right channel */
7442  longName = wxString::Format(_("%s right"), shortName);
7443  }
7444  return longName;
7445 }
const WaveTrack * waveTrack
Definition: Project.h:312
bool GetLinked() const
Definition: Track.h:218
wxString GetDefaultName() const
Definition: Track.h:214
wxString GetName() const
Definition: Track.h:212
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
const wxChar * name
Definition: Distortion.cpp:94

Member Data Documentation

bool AudacityProject::FoundTrack::channel {}

Definition at line 314 of file Project.h.

Referenced by ComposeTrackName().

int AudacityProject::FoundTrack::trackNumber {}

Definition at line 313 of file Project.h.

Referenced by ComposeTrackName().

const WaveTrack* AudacityProject::FoundTrack::waveTrack {}

The documentation for this struct was generated from the following files: