Audacity  2.2.2
Classes | Enumerations | Functions | Variables
WaveTrackControls.cpp File Reference
#include "../../../../Audacity.h"
#include "../../../../Experimental.h"
#include "WaveTrackControls.h"
#include "../../ui/PlayableTrackButtonHandles.h"
#include "WaveTrackSliderHandles.h"
#include "../../../../AudioIO.h"
#include "../../../../HitTestResult.h"
#include "../../../../MixerBoard.h"
#include "../../../../Project.h"
#include "../../../../RefreshCode.h"
#include "../../../../WaveTrack.h"
#include "../../../../ShuttleGui.h"
#include "../../../../TrackPanel.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "../../../../widgets/PopupMenuTable.h"
#include "../../../../ondemand/ODManager.h"
#include "../../../../prefs/PrefsDialog.h"
#include "../../../../prefs/SpectrumPrefs.h"
#include "../../../../prefs/TracksBehaviorsPrefs.h"
#include "../../../../prefs/WaveformPrefs.h"
#include "../../../../widgets/ErrorDialog.h"
#include <wx/combobox.h>

Go to the source code of this file.

Classes

class  WaveColorMenuTable
 
class  FormatMenuTable
 
class  RateMenuTable
 
class  WaveTrackMenuTable
 

Enumerations

enum  {
  OnRate8ID = 30000, OnRate11ID, OnRate16ID, OnRate22ID,
  OnRate44ID, OnRate48ID, OnRate88ID, OnRate96ID,
  OnRate176ID, OnRate192ID, OnRate352ID, OnRate384ID,
  OnRateOtherID, On16BitID, On24BitID, OnFloatID,
  OnWaveformID, OnWaveformDBID, OnSpectrumID, OnSpectrogramSettingsID,
  OnChannelLeftID, OnChannelRightID, OnChannelMonoID, OnMergeStereoID,
  OnWaveColorID, OnInstrument1ID, OnInstrument2ID, OnInstrument3ID,
  OnInstrument4ID, OnSwapChannelsID, OnSplitStereoID, OnSplitStereoMonoID,
  ChannelMenuID
}
 

Functions

const wxString GetWaveColorStr (int colorIndex)
 
 POPUP_MENU_RADIO_ITEM (OnInstrument1ID, GetWaveColorStr(0), OnWaveColorChange) POPUP_MENU_RADIO_ITEM(OnInstrument2ID
 
 GetWaveColorStr (1)
 
OnWaveColorChange POPUP_MENU_RADIO_ITEM (OnInstrument3ID, GetWaveColorStr(2), OnWaveColorChange) POPUP_MENU_RADIO_ITEM(OnInstrument4ID
 
OnWaveColorChange GetWaveColorStr (3)
 
 POPUP_MENU_RADIO_ITEM (On16BitID, GetSampleFormatStr(int16Sample), OnFormatChange) POPUP_MENU_RADIO_ITEM(On24BitID
 
 GetSampleFormatStr (int24Sample)
 
OnFormatChange POPUP_MENU_RADIO_ITEM (OnFloatID, GetSampleFormatStr(floatSample), OnFormatChange) int FormatMenuTable
 Converts a format enumeration to a wxWidgets menu item Id. More...
 
 POPUP_MENU_RADIO_ITEM (OnWaveformDBID, _("&Waveform (dB)"), OnSetDisplay) WaveTrack *const pTrack
 
 if (pTrack &&pTrack->GetDisplay()!=WaveTrack::Spectrum)
 

Variables

const int nRates = 12
 
static int gRates [nRates]
 

Enumeration Type Documentation

anonymous enum
Enumerator
OnRate8ID 
OnRate11ID 
OnRate16ID 
OnRate22ID 
OnRate44ID 
OnRate48ID 
OnRate88ID 
OnRate96ID 
OnRate176ID 
OnRate192ID 
OnRate352ID 
OnRate384ID 
OnRateOtherID 
On16BitID 
On24BitID 
OnFloatID 
OnWaveformID 
OnWaveformDBID 
OnSpectrumID 
OnSpectrogramSettingsID 
OnChannelLeftID 
OnChannelRightID 
OnChannelMonoID 
OnMergeStereoID 
OnWaveColorID 
OnInstrument1ID 
OnInstrument2ID 
OnInstrument3ID 
OnInstrument4ID 
OnSwapChannelsID 
OnSplitStereoID 
OnSplitStereoMonoID 
ChannelMenuID 

Definition at line 96 of file WaveTrackControls.cpp.

96  {
97  OnRate8ID = 30000, // <---
98  OnRate11ID, // |
99  OnRate16ID, // |
100  OnRate22ID, // |
101  OnRate44ID, // |
102  OnRate48ID, // | Leave these in order
103  OnRate88ID, // |
104  OnRate96ID, // |
105  OnRate176ID, // |
106  OnRate192ID, // |
107  OnRate352ID, // |
108  OnRate384ID, // |
109  OnRateOtherID, // |
110  // |
111  On16BitID, // |
112  On24BitID, // |
113  OnFloatID, // <---
114 
115  OnWaveformID,
117  OnSpectrumID,
119 
123 
130 
134 
136 };

Function Documentation

GetSampleFormatStr ( int24Sample  )
const wxString GetWaveColorStr ( int  colorIndex)

Definition at line 183 of file WaveTrackControls.cpp.

References _().

Referenced by WaveColorMenuTable::OnWaveColorChange().

184 {
185  return wxString::Format( _("Instrument %i"), colorIndex+1 );
186 }
_("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 &)
GetWaveColorStr ( )
OnWaveColorChange GetWaveColorStr ( )
if ( pTrack &&pTrack->GetDisplay()!  = WaveTrack::Spectrum)

Definition at line 699 of file WaveTrackControls.cpp.

References _(), OnWaveColorID, POPUP_MENU_SEPARATOR, and POPUP_MENU_SUB_MENU.

Referenced by audacityAudioCallback(), KeyView::CmpKeyNodeByTree(), TimeShiftHandle::DoSlideHorizontal(), TrackArtist::DrawBackgroundWithSelection(), WaveClip::GetWaveDisplay(), SampleHandle::HitTest(), EffectNoiseReduction::Dialog::OnNoiseReductionChoice(), LadspaEffect::OnTextCtrl(), ToolBarConfiguration::Iterator::operator++(), PluginRegistrationDialog::SetState(), and NyquistEffect::TransferDataToEffectWindow().

699  {
702  }
#define POPUP_MENU_SEPARATOR()
#define POPUP_MENU_SUB_MENU(id, string, classname)
_("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 &)
POPUP_MENU_RADIO_ITEM ( OnInstrument1ID  ,
GetWaveColorStr(0)  ,
OnWaveColorChange   
)
OnWaveColorChange POPUP_MENU_RADIO_ITEM ( OnInstrument3ID  ,
GetWaveColorStr(2)  ,
OnWaveColorChange   
)
POPUP_MENU_RADIO_ITEM ( On16BitID  ,
GetSampleFormatStr(int16Sample)  ,
OnFormatChange   
)
OnFormatChange POPUP_MENU_RADIO_ITEM ( OnFloatID  ,
GetSampleFormatStr(floatSample)  ,
OnFormatChange   
)

Converts a format enumeration to a wxWidgets menu item Id.

Definition at line 287 of file WaveTrackControls.cpp.

References On16BitID, On24BitID, and OnFloatID.

293 {
294  switch (format) {
295  case int16Sample:
296  return On16BitID;
297  case int24Sample:
298  return On24BitID;
299  case floatSample:
300  return OnFloatID;
301  default:
302  // ERROR -- should not happen
303  wxASSERT(false);
304  break;
305  }
306  return OnFloatID;// Compiler food.
307 }
int format
Definition: ExportPCM.cpp:56
POPUP_MENU_RADIO_ITEM ( OnWaveformDBID  ,
_("&Waveform (dB)")  ,
OnSetDisplay   
) const

Variable Documentation

int gRates[nRates]
static
Initial value:
= { 8000, 11025, 16000, 22050, 44100, 48000, 88200, 96000,
176400, 192000, 352800, 384000 }

gRates MUST CORRESPOND DIRECTLY TO THE RATES AS LISTED IN THE MENU!! IN THE SAME ORDER!!

Definition at line 424 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate(), and RateMenuTable::OnRateChange().

const int nRates = 12

Definition at line 420 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate().