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 trackNum {}
 
bool channel {}
 

Detailed Description

Definition at line 318 of file Project.h.

Member Function Documentation

wxString AudacityProject::FoundTrack::ComposeTrackName ( ) const

Definition at line 7740 of file Menus.cpp.

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

7741 {
7742  auto name = waveTrack->GetName();
7743  auto shortName = name == waveTrack->GetDefaultName()
7744  /* i18n-hint: compose a name identifying an unnamed track by number */
7745  ? wxString::Format( _("Track %d"), trackNum )
7746  : name;
7747  auto longName = shortName;
7748  if (channel) {
7749  if ( waveTrack->GetLinked() )
7750  /* i18n-hint: given the name of a track, specify its left channel */
7751  longName = wxString::Format(_("%s left"), shortName);
7752  else
7753  /* i18n-hint: given the name of a track, specify its right channel */
7754  longName = wxString::Format(_("%s right"), shortName);
7755  }
7756  return longName;
7757 }
const WaveTrack * waveTrack
Definition: Project.h:319
bool GetLinked() const
Definition: Track.h:278
wxString GetDefaultName() const
Definition: Track.h:272
wxString GetName() const
Definition: Track.h:270
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
const wxChar * name
Definition: Distortion.cpp:94

Member Data Documentation

bool AudacityProject::FoundTrack::channel {}

Definition at line 321 of file Project.h.

Referenced by ComposeTrackName().

int AudacityProject::FoundTrack::trackNum {}

Definition at line 320 of file Project.h.

Referenced by ComposeTrackName().

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

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