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 7815 of file Menus.cpp.

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

7816 {
7817  auto name = waveTrack->GetName();
7818  auto shortName = name == waveTrack->GetDefaultName()
7819  /* i18n-hint: compose a name identifying an unnamed track by number */
7820  ? wxString::Format( _("Track %d"), trackNum )
7821  : name;
7822  auto longName = shortName;
7823  if (channel) {
7824  if ( waveTrack->GetLinked() )
7825  /* i18n-hint: given the name of a track, specify its left channel */
7826  longName = wxString::Format(_("%s left"), shortName);
7827  else
7828  /* i18n-hint: given the name of a track, specify its right channel */
7829  longName = wxString::Format(_("%s right"), shortName);
7830  }
7831  return longName;
7832 }
const WaveTrack * waveTrack
Definition: Project.h:319
bool GetLinked() const
Definition: Track.h:287
wxString GetDefaultName() const
Definition: Track.h:281
wxString GetName() const
Definition: Track.h:279
_("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: