Audacity  3.0.3
Functions | Variables
SpectrumVZoomHandle.cpp File Reference
#include "SpectrumVZoomHandle.h"
#include "WaveTrackVZoomHandle.h"
#include "../../../../HitTestResult.h"
#include "NumberScale.h"
#include "Prefs.h"
#include "../../../../ProjectHistory.h"
#include "../../../../RefreshCode.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "../../../../WaveTrack.h"
#include "../../../../prefs/SpectrogramSettings.h"
Include dependency graph for SpectrumVZoomHandle.cpp:

Go to the source code of this file.

Functions

 BeginSection ("Scales")
 
 for (int ii=0, nn=names.size();ii< nn;++ii)
 
 EndSection ()
 
 BeginSection ("Zoom")
 
gPrefs Read (wxT("/GUI/VerticalZooming"), &bVZoom, false)
 
 AppendItem ("Reset", OnZoomResetID, XXO("Zoom Reset"), POPUP_MENU_FN(OnZoomReset))
 
 AppendItem ("Fit", OnZoomFitVerticalID, MakeLabel(XXO("Zoom to Fit"), bVZoom, XXO("Shift-Right-Click")), POPUP_MENU_FN(OnZoomFitVertical))
 
 AppendItem ("In", OnZoomInVerticalID, MakeLabel(XXO("Zoom In"), bVZoom, XXO("Left-Click/Left-Drag")), POPUP_MENU_FN(OnZoomInVertical))
 
 AppendItem ("Out", OnZoomOutVerticalID, MakeLabel(XXO("Zoom Out"), bVZoom, XXO("Shift-Left-Click")), POPUP_MENU_FN(OnZoomOutVertical))
 

Variables

bool bVZoom
 

Function Documentation

◆ AppendItem() [1/4]

AppendItem ( "Fit"  ,
OnZoomFitVerticalID  ,
MakeLabel(XXO("Zoom to Fit"), bVZoom, XXO("Shift-Right-Click"))  ,
POPUP_MENU_FN(OnZoomFitVertical)   
)

◆ AppendItem() [2/4]

AppendItem ( "In"  ,
OnZoomInVerticalID  ,
MakeLabel(XXO("Zoom In"), bVZoom, XXO("Left-Click/Left-Drag"))  ,
POPUP_MENU_FN(OnZoomInVertical)   
)

◆ AppendItem() [3/4]

AppendItem ( "Out"  ,
OnZoomOutVerticalID  ,
MakeLabel(XXO("Zoom Out"), bVZoom, XXO("Shift-Left-Click"))  ,
POPUP_MENU_FN(OnZoomOutVertical)   
)

◆ AppendItem() [4/4]

AppendItem ( "Reset"  ,
OnZoomResetID  ,
XXO("Zoom Reset")  ,
POPUP_MENU_FN(OnZoomReset)   
)

◆ BeginSection() [1/2]

BeginSection ( "Scales"  )

References SpectrogramSettings::GetScaleNames(), and names.

Here is the call graph for this function:

◆ BeginSection() [2/2]

BeginSection ( "Zoom"  )

◆ EndSection()

EndSection ( )

◆ for()

for ( int  ii = 0)

Definition at line 276 of file SpectrumVZoomHandle.cpp.

276  {
278  OnFirstSpectrumScaleID + ii, names[ii].Msgid(),
279  POPUP_MENU_FN( OnSpectrumScaleType ),
280  []( PopupMenuHandler &handler, wxMenu &menu, int id ){
281  WaveTrack *const wt =
282  static_cast<SpectrumVRulerMenuTable&>( handler )
283  .mpData->pTrack;
284  if ( id ==
286  (int)(wt->GetSpectrogramSettings().scaleType ) )
287  menu.Check(id, true);
288  }
289  );
290  }

References AppendRadioItem(), WaveTrack::GetSpectrogramSettings(), Internal, names, OnFirstSpectrumScaleID, POPUP_MENU_FN, and SpectrogramSettings::scaleType.

Referenced by ProjectFileManager::AddImportedTracks(), and ProjectWindow::RedrawProject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Read()

gPrefs Read ( wxT("/GUI/VerticalZooming")  ,
bVZoom,
false   
)

Variable Documentation

◆ bVZoom

bool bVZoom

Definition at line 297 of file SpectrumVZoomHandle.cpp.

WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:70
AppendRadioItem
AppendRadioItem("Instrument1", OnInstrument1ID, GetWaveColorStr(0), POPUP_MENU_FN(OnWaveColorChange), fn)
WaveTrack::GetSpectrogramSettings
const SpectrogramSettings & GetSpectrogramSettings() const
Definition: WaveTrack.cpp:788
SpectrogramSettings::scaleType
ScaleType scaleType
Definition: SpectrogramSettings.h:147
POPUP_MENU_FN
#define POPUP_MENU_FN(memFn)
Definition: PopupMenuTable.h:324
PopupMenuHandler
Definition: PopupMenuTable.h:85
names
static TranslatableStrings names
Definition: Tags.cpp:738
ExceptionType::Internal
@ Internal
Indicates internal failure from Audacity.
SpectrumVRulerMenuTable
Definition: SpectrumVZoomHandle.h:79
OnFirstSpectrumScaleID
@ OnFirstSpectrumScaleID
Definition: WaveTrackVZoomHandle.h:121