28#include "../ShuttleGui.h"
29#include "../WaveTrack.h"
36 return wxT(
"/AudioIO/PinnedHead");
46 return wxT(
"/AudioIO/PinnedHeadPosition");
79 const auto key0 =
wxT(
"/GUI/DefaultViewMode");
80 const auto key1 =
wxT(
"/GUI/DefaultViewModeNew");
81 const auto key2 =
wxT(
"/GUI/DefaultViewModeChoice");
82 const auto key3 =
wxT(
"/GUI/DefaultViewModeChoiceNew");
88 :
public EnumSetting< WaveTrackViewConstants::Display > {
111 return spectrumSymbol.Internal();
115 return waveformSymbol.Internal();
123 newValue = stringValue( viewMode );
129 newValue = stringValue( viewMode );
136 newValue = waveformSymbol.Internal();
140 Write( value = newValue );
152 auto symbols = transform_container< EnumValueSymbols >(
154 auto ids = transform_container< std::vector< WaveTrackSubViewType::Display > >(
182 wxT(
"/GUI/SampleViewChoice"),
184 {
wxT(
"ConnectDots"),
XO(
"Connect dots") },
185 {
wxT(
"StemPlot"),
XO(
"Stem plot") }
194 wxT(
"/GUI/SampleView")
204 {
wxT(
"FitToWidth"),
XO(
"Fit to Width") },
205 {
wxT(
"ZoomToSelection"),
XO(
"Zoom to Selection") },
206 {
wxT(
"ZoomDefault"),
XO(
"Zoom Default") },
209 {
wxT(
"FifthsOfSeconds"),
XO(
"5ths of Seconds") },
210 {
wxT(
"TenthsOfSeconds"),
XO(
"10ths of Seconds") },
211 {
wxT(
"TwentiethsOfSeconds"),
XO(
"20ths of Seconds") },
212 {
wxT(
"FiftiethsOfSeconds"),
XO(
"50ths of Seconds") },
213 {
wxT(
"HundredthsOfSeconds"),
XO(
"100ths of Seconds") },
214 {
wxT(
"FiveHundredthsOfSeconds"),
XO(
"500ths of Seconds") },
215 {
XO(
"MilliSeconds") },
217 {
wxT(
"FourPixelsPerSample"),
XO(
"4 Pixels per Sample") },
218 {
wxT(
"MaxZoom"),
XO(
"Max Zoom") },
239 wxT(
"/GUI/ZoomPreset1Choice"),
245 wxT(
"/GUI/ZoomPreset1")
249 wxT(
"/GUI/ZoomPreset2Choice"),
255 wxT(
"/GUI/ZoomPreset2")
289 return XO(
"Preferences for Tracks");
294 return "Tracks_Preferences";
322 S.StartStatic(
XO(
"Display"));
324 S.TieCheckBox(
XXO(
"Auto-&fit track height"),
325 {
wxT(
"/GUI/TracksFitVerticallyZoomed"),
327 S.TieCheckBox(
XXO(
"Sho&w track name as overlay"),
328 {
wxT(
"/GUI/ShowTrackNameInWaveform"),
330#ifdef EXPERIMENTAL_HALF_WAVE
331 S.TieCheckBox(
XXO(
"Use &half-wave display when collapsed"),
332 {
wxT(
"/GUI/CollapseToHalfWave"),
335#ifdef SHOW_PINNED_UNPINNED_IN_PREFS
336 S.TieCheckBox(
XXO(
"&Pinned Recording/Playback head"),
340 S.TieCheckBox(
XXO(
"A&uto-scroll if head unpinned"),
341 {
wxT(
"/GUI/AutoScroll"),
346 S.StartMultiColumn(2);
348#ifdef SHOW_PINNED_POSITION_IN_PREFS
350 XXO(
"Pinned &head position"),
357 S.TieChoice(
XXO(
"Default &view mode:"),
360 S.TieChoice(
XXO(
"Default Waveform scale:"),
363 S.TieChoice(
XXO(
"Display &samples:"),
366 S.TieTextBox(
XXO(
"Default audio track &name:"),
374 S.StartStatic(
XO(
"Zoom Toggle"));
376 S.StartMultiColumn(4);
378 S.TieChoice(
XXO(
"Preset 1:"),
381 S.TieChoice(
XXO(
"Preset 2:"),
410 auto value =
gPrefs->ReadDouble(
413 return std::max(0.0,
std::min(1.0, value));
418 value = std::max(0.0,
std::min(1.0, value));
XXO("&Cut/Copy/Paste Toolbar")
static EnumSetting< WaveTrackViewConstants::ZoomPresets > zoom2Setting
static const std::initializer_list< EnumValueSymbol > choicesZoom
static EnumSetting< WaveTrackViewConstants::ZoomPresets > zoom1Setting
static TracksViewModeEnumSetting ViewModeSetting()
static EnumSetting< WaveTrackViewConstants::SampleDisplay > sampleDisplaySetting
static EnumSetting< WaveformSettings::ScaleTypeValues > waveformScaleSetting
static auto enumChoicesZoom
#define TRACKS_PREFS_PLUGIN_SYMBOL
static const AudacityProject::AttachedObjects::RegisteredFactory key2
StringSetting AudioTrackNameSetting
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
bool Write(const wxString &value)
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Adapts EnumSettingBase to a particular enumeration type.
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
bool Delete()
Delete the key if present, and return true iff it was.
void Invalidate() override
const T & GetDefault() const
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
A PrefsPanel for track display and behavior properties.
static WaveformSettings::ScaleTypeValues WaveformScaleChoice()
TracksPrefs(wxWindow *parent, wxWindowID winid)
static void SetPinnedHeadPreference(bool value, bool flush=false)
static bool GetPinnedHeadPreference()
TranslatableString GetDescription() const override
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
static double GetPinnedHeadPositionPreference()
static WaveTrackViewConstants::ZoomPresets Zoom1Choice()
void PopulateOrExchange(ShuttleGui &S) override
static void SetPinnedHeadPositionPreference(double value, bool flush=false)
static int iPreferencePinned
static WaveTrackViewConstants::ZoomPresets Zoom2Choice()
static WaveTrackViewConstants::SampleDisplay SampleViewChoice()
ComponentInterfaceSymbol GetSymbol() const override
static WaveTrackViewConstants::Display ViewModeChoice()
void Migrate(wxString &value) override
Holds a msgid for the translation catalog; may also bind format arguments.
static wxString GetDefaultAudioTrackNamePreference()
@ MultiView
"Multi" is special, not really a view type on par with the others.
@ obsoleteWaveformDBDisplay
AUDACITY_DLL_API const EnumValueSymbol MultiViewSymbol
String identifier for a preference for one of each type of view.
Display ConvertLegacyDisplayValue(int oldValue)
const wxChar * PinnedHeadPositionPreferenceKey()
const auto waveformScaleKey
const wxString obsoleteValue
const wxChar * PinnedHeadPreferenceKey()
double PinnedHeadPositionPreferenceDefault()
bool PinnedHeadPreferenceDefault()
PrefsPanel::Registration sAttachment
static const std::vector< WaveTrackSubViewType > & All()
Discover all registered types.