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 319 of file Project.h.

Member Function Documentation

wxString AudacityProject::FoundTrack::ComposeTrackName ( ) const

Definition at line 7838 of file Menus.cpp.

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

7839 {
7840  auto name = waveTrack->GetName();
7841  auto shortName = name == waveTrack->GetDefaultName()
7842  /* i18n-hint: compose a name identifying an unnamed track by number */
7843  ? wxString::Format( _("Track %d"), trackNum )
7844  : name;
7845  auto longName = shortName;
7846  if (channel) {
7847  if ( waveTrack->GetLinked() )
7848  /* i18n-hint: given the name of a track, specify its left channel */
7849  longName = wxString::Format(_("%s left"), shortName);
7850  else
7851  /* i18n-hint: given the name of a track, specify its right channel */
7852  longName = wxString::Format(_("%s right"), shortName);
7853  }
7854  return longName;
7855 }
const WaveTrack * waveTrack
Definition: Project.h:320
bool GetLinked() const
Definition: Track.h:283
wxString GetDefaultName() const
Definition: Track.h:277
wxString GetName() const
Definition: Track.h:275
_("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 322 of file Project.h.

Referenced by ComposeTrackName().

int AudacityProject::FoundTrack::trackNum {}

Definition at line 321 of file Project.h.

Referenced by ComposeTrackName().

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

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