37 "/GUI/TracksFitVerticallyZoomed",
false };
42 return wxT(
"/AudioIO/PinnedHead");
52 return wxT(
"/AudioIO/PinnedHeadPosition");
71 {
wxT(
"Linear"),
XO(
"Linear (amp)") },
88 const auto key0 =
wxT(
"/GUI/DefaultViewMode");
89 const auto key1 =
wxT(
"/GUI/DefaultViewModeNew");
90 const auto key2 =
wxT(
"/GUI/DefaultViewModeChoice");
91 const auto key3 =
wxT(
"/GUI/DefaultViewModeChoiceNew");
97 :
public EnumSetting<WaveChannelViewConstants::Display> {
120 return spectrumSymbol.Internal();
124 return waveformSymbol.Internal();
132 newValue = stringValue(viewMode);
138 newValue = stringValue(viewMode);
145 newValue = waveformSymbol.Internal();
149 Write( value = newValue );
161 auto symbols = transform_container< EnumValueSymbols >(
163 auto ids = transform_container<std::vector<WaveChannelSubViewType::Display>>(
191 wxT(
"/GUI/SampleViewChoice"),
193 {
wxT(
"ConnectDots"),
XO(
"Connect dots") },
194 {
wxT(
"StemPlot"),
XO(
"Stem plot") }
203 wxT(
"/GUI/SampleView")
213 {
wxT(
"FitToWidth"),
XO(
"Fit to Width") },
214 {
wxT(
"ZoomToSelection"),
XO(
"Zoom to Selection") },
215 {
wxT(
"ZoomDefault"),
XO(
"Zoom Default") },
218 {
wxT(
"FifthsOfSeconds"),
XO(
"5ths of Seconds") },
219 {
wxT(
"TenthsOfSeconds"),
XO(
"10ths of Seconds") },
220 {
wxT(
"TwentiethsOfSeconds"),
XO(
"20ths of Seconds") },
221 {
wxT(
"FiftiethsOfSeconds"),
XO(
"50ths of Seconds") },
222 {
wxT(
"HundredthsOfSeconds"),
XO(
"100ths of Seconds") },
223 {
wxT(
"FiveHundredthsOfSeconds"),
XO(
"500ths of Seconds") },
224 {
XO(
"MilliSeconds") },
226 {
wxT(
"FourPixelsPerSample"),
XO(
"4 Pixels per Sample") },
227 {
wxT(
"MaxZoom"),
XO(
"Max Zoom") },
248 wxT(
"/GUI/ZoomPreset1Choice"),
254 wxT(
"/GUI/ZoomPreset1")
258 wxT(
"/GUI/ZoomPreset2Choice"),
264 wxT(
"/GUI/ZoomPreset2")
298 return XO(
"Preferences for Tracks");
303 return "Tracks_Preferences";
331 S.StartStatic(
XO(
"Display"));
334 S.TieCheckBox(
XXO(
"Use &half-wave display when collapsed"),
335 {
wxT(
"/GUI/CollapseToHalfWave"),
337#ifdef SHOW_PINNED_UNPINNED_IN_PREFS
338 S.TieCheckBox(
XXO(
"&Pinned Recording/Playback head"),
342 S.TieCheckBox(
XXO(
"A&uto-scroll if head unpinned"),
343 {
wxT(
"/GUI/AutoScroll"),
348 S.StartMultiColumn(2);
350#ifdef SHOW_PINNED_POSITION_IN_PREFS
352 XXO(
"Pinned &head position"),
359 S.TieChoice(
XXO(
"Default &view mode:"),
362 S.TieChoice(
XXO(
"Default Waveform scale:"),
365 S.TieChoice(
XXO(
"Display &samples:"),
368 S.TieTextBox(
XXO(
"Default audio track &name:"),
376 S.StartStatic(
XO(
"Zoom Toggle"));
378 S.StartMultiColumn(4);
380 S.TieChoice(
XXO(
"Preset 1:"),
383 S.TieChoice(
XXO(
"Preset 2:"),
415 return std::max(0.0,
std::min(1.0, value));
420 value = std::max(0.0,
std::min(1.0, value));
474 Callable::UniqueMaker<Handler, AudacityProject &>()
XXO("&Cut/Copy/Paste Toolbar")
audacity::BasicSettings * gPrefs
static EnumSetting< WaveChannelViewConstants::ZoomPresets > zoom2Setting
static const std::initializer_list< EnumValueSymbol > choicesZoom
static EnumSetting< WaveChannelViewConstants::ZoomPresets > zoom1Setting
static EnumSetting< WaveChannelViewConstants::SampleDisplay > sampleDisplaySetting
static TracksViewModeEnumSetting ViewModeSetting()
static EnumSetting< WaveformSettings::ScaleTypeValues > waveformScaleSetting
static auto enumChoicesZoom
#define TRACKS_PREFS_PLUGIN_SYMBOL
StringSetting AudioTrackNameSetting
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
This specialization of Setting for bool adds a Toggle method to negate the saved value.
bool Write(const wxString &value)
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Adapts EnumSettingBase to a particular enumeration type.
A move-only handle representing a connection to a Publisher.
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
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined */
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()
static WaveChannelViewConstants::ZoomPresets Zoom1Choice()
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 WaveChannelViewConstants::ZoomPresets Zoom2Choice()
static double GetPinnedHeadPositionPreference()
static WaveChannelViewConstants::SampleDisplay SampleViewChoice()
void PopulateOrExchange(ShuttleGui &S) override
static BoolSetting TracksFitVerticallyZoomed
static WaveChannelViewConstants::Display ViewModeChoice()
static void SetPinnedHeadPositionPreference(double value, bool flush=false)
static int iPreferencePinned
ComponentInterfaceSymbol GetSymbol() const override
void Migrate(wxString &value) override
Holds a msgid for the translation catalog; may also bind format arguments.
Maintain a non-persistent list of states of the project, to support undo and redo commands.
static Viewport & Get(AudacityProject &project)
static wxString GetDefaultAudioTrackNamePreference()
virtual bool Flush() noexcept=0
double ReadDouble(const wxString &key, double defaultValue) const
virtual bool Write(const wxString &key, bool value)=0
bool ReadBool(const wxString &key, bool defaultValue) const
virtual bool Read(const wxString &key, bool *value) const =0
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Display ConvertLegacyDisplayValue(int oldValue)
@ obsoleteWaveformDBDisplay
@ 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.
const wxChar * PinnedHeadPositionPreferenceKey()
const auto waveformScaleKey
static const AudacityProject::AttachedObjects::RegisteredFactory key
const auto dbLogValueString
const auto dbLinValueString
const wxString obsoleteValue
const wxChar * PinnedHeadPreferenceKey()
double PinnedHeadPositionPreferenceDefault()
bool PinnedHeadPreferenceDefault()
PrefsPanel::Registration sAttachment
A convenient default parameter for class template Site.
Type of message published by UndoManager.
static const std::vector< WaveChannelSubViewType > & All()
Discover all registered types.
Observer attached to each project applies the vertical zoom fit preference.
const Observer::Subscription mUndoSubscription
Handler & operator=(const Handler &)=delete
Handler(AudacityProject &project)
AudacityProject & mProject
Handler(const Handler &)=delete