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

Go to the source code of this file.

Classes

class  TracksViewModeEnumSetting
 
struct  anonymous_namespace{TracksPrefs.cpp}::Handler
 Observer attached to each project applies the vertical zoom fit preference. More...
 

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
 
static const AudacityProject::AttachedObjects::RegisteredFactory anonymous_namespace{TracksPrefs.cpp}::key
 

Function Documentation

◆ ViewModeSetting()

static TracksViewModeEnumSetting ViewModeSetting ( )
static

Definition at line 156 of file TracksPrefs.cpp.

157{
158 // Do a delayed computation, so that registration of sub-view types completes
159 // first
160 const auto &types = WaveChannelSubViewType::All();
161 auto symbols = transform_container< EnumValueSymbols >(
162 types, std::mem_fn(&WaveChannelSubViewType::name));
163 auto ids = transform_container<std::vector<WaveChannelSubViewType::Display>>(
164 types, std::mem_fn(&WaveChannelSubViewType::id));
165
166 // Special entry for multi
169
170 return {
171 key3,
172 symbols,
173 0, // Waveform
174 ids
175 };
176}
@ 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 212 of file TracksPrefs.cpp.

◆ enumChoicesZoom

auto enumChoicesZoom
static
Initial value:
= {
}

Definition at line 229 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 190 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 247 of file TracksPrefs.cpp.

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

◆ zoom2Setting

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

Definition at line 257 of file TracksPrefs.cpp.

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