Audacity 3.2.0
Classes | Namespaces | Functions | Variables
TracksPrefs.cpp File Reference
#include "TracksPrefs.h"
#include "MemoryX.h"
#include "Prefs.h"
#include "ShuttleGui.h"
#include "WaveTrack.h"
Include dependency graph for TracksPrefs.cpp:

Go to the source code of this file.

Classes

class  TracksViewModeEnumSetting
 

Namespaces

namespace  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}::dbLogValueString = wxT("dB")
 
const auto anonymous_namespace{TracksPrefs.cpp}::dbLinValueString = wxT("dBLin")
 
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< WaveChannelViewConstants::SampleDisplaysampleDisplaySetting
 
static const std::initializer_list< EnumValueSymbolchoicesZoom
 
static auto enumChoicesZoom
 
static EnumSetting< WaveChannelViewConstants::ZoomPresetszoom1Setting
 
static EnumSetting< WaveChannelViewConstants::ZoomPresetszoom2Setting
 
PrefsPanel::Registration anonymous_namespace{TracksPrefs.cpp}::sAttachment
 

Function Documentation

◆ ViewModeSetting()

static TracksViewModeEnumSetting ViewModeSetting ( )
static

Definition at line 150 of file TracksPrefs.cpp.

151{
152 // Do a delayed computation, so that registration of sub-view types completes
153 // first
154 const auto &types = WaveChannelSubViewType::All();
155 auto symbols = transform_container< EnumValueSymbols >(
156 types, std::mem_fn(&WaveChannelSubViewType::name));
157 auto ids = transform_container<std::vector<WaveChannelSubViewType::Display>>(
158 types, std::mem_fn(&WaveChannelSubViewType::id));
159
160 // Special entry for multi
163
164 return {
165 key3,
166 symbols,
167 0, // Waveform
168 ids
169 };
170}
@ MultiView
"Multi" is special, not really a view type on par with the others.
AUDACITY_DLL_API const EnumValueSymbol MultiViewSymbol
String identifier for a preference for one of each type of view.
static const std::vector< WaveChannelSubViewType > & All()
Discover all registered types.

References WaveChannelSubViewType::All(), WaveChannelSubViewType::id, anonymous_namespace{TracksPrefs.cpp}::key3, WaveChannelViewConstants::MultiView, WaveChannelViewConstants::MultiViewSymbol, and WaveChannelSubViewType::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") },
}
wxT("CloseDown"))
XO("Cut/Copy/Paste")

Definition at line 206 of file TracksPrefs.cpp.

◆ enumChoicesZoom

auto enumChoicesZoom
static
Initial value:
= {
}

Definition at line 223 of file TracksPrefs.cpp.

◆ sampleDisplaySetting

Initial value:
{
wxT("/GUI/SampleViewChoice"),
{
{ wxT("ConnectDots"), XO("Connect dots") },
{ wxT("StemPlot"), XO("Stem plot") }
},
1,
{
},
wxT("/GUI/SampleView")
}

Definition at line 184 of file TracksPrefs.cpp.

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

◆ waveformScaleSetting

EnumSetting< WaveformSettings::ScaleTypeValues > waveformScaleSetting
static

◆ zoom1Setting

Initial value:
{
wxT("/GUI/ZoomPreset1Choice"),
2,
wxT("/GUI/ZoomPreset1")
}
static const std::initializer_list< EnumValueSymbol > choicesZoom
static auto enumChoicesZoom

Definition at line 241 of file TracksPrefs.cpp.

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

◆ zoom2Setting

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

Definition at line 251 of file TracksPrefs.cpp.

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