Audacity  3.0.3
Classes | Namespaces | Functions | Variables
TracksPrefs.cpp File Reference
#include "TracksPrefs.h"
#include "Prefs.h"
#include "../ShuttleGui.h"
#include "../tracks/playabletrack/wavetrack/ui/WaveTrackViewConstants.h"
Include dependency graph for TracksPrefs.cpp:

Go to the source code of this file.

Classes

class  TracksViewModeEnumSetting
 

Namespaces

 anonymous_namespace{TracksPrefs.cpp}
 

Functions

const wxChar * anonymous_namespace{TracksPrefs.cpp}::PinnedHeadPreferenceKey ()
 
bool anonymous_namespace{TracksPrefs.cpp}::PinnedHeadPreferenceDefault ()
 
const wxChar * anonymous_namespace{TracksPrefs.cpp}::PinnedHeadPositionPreferenceKey ()
 
double anonymous_namespace{TracksPrefs.cpp}::PinnedHeadPositionPreferenceDefault ()
 
static TracksViewModeEnumSetting viewModeSetting ()
 

Variables

const auto anonymous_namespace{TracksPrefs.cpp}::waveformScaleKey = wxT("/GUI/DefaultWaveformScaleChoice")
 
const auto anonymous_namespace{TracksPrefs.cpp}::dbValueString = wxT("dB")
 
static EnumSetting< WaveformSettings::ScaleTypeValueswaveformScaleSetting
 
const auto anonymous_namespace{TracksPrefs.cpp}::key0 = wxT("/GUI/DefaultViewMode")
 
const auto anonymous_namespace{TracksPrefs.cpp}::key1 = wxT("/GUI/DefaultViewModeNew")
 
const auto anonymous_namespace{TracksPrefs.cpp}::key2 = wxT("/GUI/DefaultViewModeChoice")
 
const auto anonymous_namespace{TracksPrefs.cpp}::key3 = wxT("/GUI/DefaultViewModeChoiceNew")
 
const wxString anonymous_namespace{TracksPrefs.cpp}::obsoleteValue { wxT("WaveformDB") }
 
static EnumSetting< WaveTrackViewConstants::SampleDisplaysampleDisplaySetting
 
static const std::initializer_list< EnumValueSymbolchoicesZoom
 
static auto enumChoicesZoom
 
static EnumSetting< WaveTrackViewConstants::ZoomPresetszoom1Setting
 
static EnumSetting< WaveTrackViewConstants::ZoomPresetszoom2Setting
 
PrefsPanel::Registration anonymous_namespace{TracksPrefs.cpp}::sAttachment
 

Function Documentation

◆ viewModeSetting()

static TracksViewModeEnumSetting viewModeSetting ( )
static

Definition at line 146 of file TracksPrefs.cpp.

147 {
148  // Do a delayed computation, so that registration of sub-view types completes
149  // first
150  const auto &types = WaveTrackSubViewType::All();
151  auto symbols = transform_container< EnumValueSymbols >(
152  types, std::mem_fn( &WaveTrackSubViewType::name ) );
153  auto ids = transform_container< std::vector< WaveTrackSubViewType::Display > >(
154  types, std::mem_fn( &WaveTrackSubViewType::id ) );
155 
156  // Special entry for multi
157  symbols.push_back( WaveTrackViewConstants::MultiViewSymbol );
158  ids.push_back( WaveTrackViewConstants::MultiView );
159 
160  return {
161  key3,
162  symbols,
163  0, // Waveform
164  ids
165  };
166 }

References WaveTrackSubViewType::All(), WaveTrackSubViewType::id, anonymous_namespace{TracksPrefs.cpp}::key3, WaveTrackViewConstants::MultiView, WaveTrackViewConstants::MultiViewSymbol, and WaveTrackSubViewType::name.

Referenced by TracksPrefs::PopulateOrExchange(), and TracksPrefs::ViewModeChoice().

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

Variable Documentation

◆ choicesZoom

const std::initializer_list<EnumValueSymbol> choicesZoom
static
Initial value:
{
{ wxT("FitToWidth"), XO("Fit to Width") },
{ wxT("ZoomToSelection"), XO("Zoom to Selection") },
{ wxT("ZoomDefault"), XO("Zoom Default") },
{ XO("Minutes") },
{ XO("Seconds") },
{ wxT("FifthsOfSeconds"), XO("5ths of Seconds") },
{ wxT("TenthsOfSeconds"), XO("10ths of Seconds") },
{ wxT("TwentiethsOfSeconds"), XO("20ths of Seconds") },
{ wxT("FiftiethsOfSeconds"), XO("50ths of Seconds") },
{ wxT("HundredthsOfSeconds"), XO("100ths of Seconds") },
{ wxT("FiveHundredthsOfSeconds"), XO("500ths of Seconds") },
{ XO("MilliSeconds") },
{ XO("Samples") },
{ wxT("FourPixelsPerSample"), XO("4 Pixels per Sample") },
{ wxT("MaxZoom"), XO("Max Zoom") },
}

Definition at line 202 of file TracksPrefs.cpp.

◆ enumChoicesZoom

auto enumChoicesZoom
static

◆ sampleDisplaySetting

EnumSetting< WaveTrackViewConstants::SampleDisplay > sampleDisplaySetting
static
Initial value:
{
wxT("/GUI/SampleViewChoice"),
{
{ wxT("ConnectDots"), XO("Connect dots") },
{ wxT("StemPlot"), XO("Stem plot") }
},
1,
{
},
wxT("/GUI/SampleView")
}

Definition at line 180 of file TracksPrefs.cpp.

Referenced by TracksPrefs::PopulateOrExchange(), and TracksPrefs::SampleViewChoice().

◆ waveformScaleSetting

EnumSetting< WaveformSettings::ScaleTypeValues > waveformScaleSetting
static
Initial value:
{
{
{ XO("Linear") },
{ dbValueString, XO("Logarithmic (dB)") },
},
0,
{
}
}

Definition at line 60 of file TracksPrefs.cpp.

Referenced by TracksPrefs::PopulateOrExchange(), and TracksPrefs::WaveformScaleChoice().

◆ zoom1Setting

Initial value:
{
wxT("/GUI/ZoomPreset1Choice"),
2,
wxT("/GUI/ZoomPreset1")
}

Definition at line 237 of file TracksPrefs.cpp.

Referenced by TracksPrefs::PopulateOrExchange(), and TracksPrefs::Zoom1Choice().

◆ zoom2Setting

Initial value:
{
wxT("/GUI/ZoomPreset2Choice"),
13,
wxT("/GUI/ZoomPreset2")
}

Definition at line 247 of file TracksPrefs.cpp.

Referenced by TracksPrefs::PopulateOrExchange(), and TracksPrefs::Zoom2Choice().

WaveTrackViewConstants::kZoomToSelection
@ kZoomToSelection
Definition: WaveTrackViewConstants.h:53
WaveTrackSubViewType::id
Display id
Definition: WaveTrackViewConstants.h:96
enumChoicesZoom
static auto enumChoicesZoom
Definition: TracksPrefs.cpp:219
WaveTrackViewConstants::kZoomSeconds
@ kZoomSeconds
Definition: WaveTrackViewConstants.h:56
WaveTrackViewConstants::kZoomDefault
@ kZoomDefault
Definition: WaveTrackViewConstants.h:54
XO
#define XO(s)
Definition: Internat.h:31
WaveformSettings::stLogarithmic
@ stLogarithmic
Definition: WaveformSettings.h:60
WaveTrackViewConstants::kZoom500ths
@ kZoom500ths
Definition: WaveTrackViewConstants.h:62
choicesZoom
static const std::initializer_list< EnumValueSymbol > choicesZoom
Definition: TracksPrefs.cpp:202
WaveTrackViewConstants::kZoom5ths
@ kZoom5ths
Definition: WaveTrackViewConstants.h:57
WaveTrackViewConstants::MultiViewSymbol
AUDACITY_DLL_API const EnumValueSymbol MultiViewSymbol
String identifier for a preference for one of each type of view.
Definition: WaveTrackViewConstants.cpp:105
WaveTrackViewConstants::kZoomSamples
@ kZoomSamples
Definition: WaveTrackViewConstants.h:64
WaveTrackSubViewType::All
static const std::vector< WaveTrackSubViewType > & All()
Discover all registered types.
Definition: WaveTrackViewConstants.cpp:90
anonymous_namespace{TracksPrefs.cpp}::waveformScaleKey
const auto waveformScaleKey
Definition: TracksPrefs.cpp:56
WaveTrackViewConstants::kZoom100ths
@ kZoom100ths
Definition: WaveTrackViewConstants.h:61
WaveTrackViewConstants::kZoomMinutes
@ kZoomMinutes
Definition: WaveTrackViewConstants.h:55
WaveTrackViewConstants::kZoomMilliSeconds
@ kZoomMilliSeconds
Definition: WaveTrackViewConstants.h:63
WaveTrackViewConstants::kZoom10ths
@ kZoom10ths
Definition: WaveTrackViewConstants.h:58
WaveTrackViewConstants::kZoom20ths
@ kZoom20ths
Definition: WaveTrackViewConstants.h:59
WaveTrackSubViewType::name
EnumValueSymbol name
Definition: WaveTrackViewConstants.h:99
anonymous_namespace{TracksPrefs.cpp}::key3
const auto key3
Definition: TracksPrefs.cpp:81
WaveTrackViewConstants::StemPlot
@ StemPlot
Definition: WaveTrackViewConstants.h:47
anonymous_namespace{TracksPrefs.cpp}::dbValueString
const auto dbValueString
Definition: TracksPrefs.cpp:57
WaveTrackViewConstants::kMaxZoom
@ kMaxZoom
Definition: WaveTrackViewConstants.h:66
WaveTrackViewConstants::LinearInterpolate
@ LinearInterpolate
Definition: WaveTrackViewConstants.h:46
WaveTrackViewConstants::kZoom50ths
@ kZoom50ths
Definition: WaveTrackViewConstants.h:60
WaveTrackViewConstants::kZoom4To1
@ kZoom4To1
Definition: WaveTrackViewConstants.h:65
WaveformSettings::stLinear
@ stLinear
Definition: WaveformSettings.h:59
WaveTrackViewConstants::MultiView
@ MultiView
"Multi" is special, not really a view type on par with the others.
Definition: WaveTrackViewConstants.h:20
WaveTrackViewConstants::kZoomToFit
@ kZoomToFit
Definition: WaveTrackViewConstants.h:52