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 "WaveformSettings.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}::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 135 of file TracksPrefs.cpp.

136{
137 // Do a delayed computation, so that registration of sub-view types completes
138 // first
139 const auto &types = WaveChannelSubViewType::All();
140 auto symbols = transform_container< EnumValueSymbols >(
141 types, std::mem_fn(&WaveChannelSubViewType::name));
142 auto ids = transform_container<std::vector<WaveChannelSubViewType::Display>>(
143 types, std::mem_fn(&WaveChannelSubViewType::id));
144
145 // Special entry for multi
148
149 return {
150 key3,
151 symbols,
152 0, // Waveform
153 ids
154 };
155}
@ MultiView
"Multi" is special, not really a view type on par with the others.
WAVE_TRACK_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 186 of file TracksPrefs.cpp.

◆ enumChoicesZoom

auto enumChoicesZoom
static
Initial value:
= {
}

Definition at line 203 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 164 of file TracksPrefs.cpp.

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

◆ zoom1Setting

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

Definition at line 221 of file TracksPrefs.cpp.

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

◆ zoom2Setting

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

Definition at line 231 of file TracksPrefs.cpp.

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