38 "/GUI/TracksFitVerticallyZoomed",
false };
43 return wxT(
"/AudioIO/PinnedHead");
53 return wxT(
"/AudioIO/PinnedHeadPosition");
65 const auto key0 =
wxT(
"/GUI/DefaultViewMode");
66 const auto key1 =
wxT(
"/GUI/DefaultViewModeNew");
67 const auto key2 =
wxT(
"/GUI/DefaultViewModeChoice");
68 const auto key3 =
wxT(
"/GUI/DefaultViewModeChoiceNew");
74 :
public EnumSetting<WaveChannelViewConstants::Display> {
97 return spectrumSymbol.Internal();
101 return waveformSymbol.Internal();
109 newValue = stringValue(viewMode);
115 newValue = stringValue(viewMode);
122 newValue = waveformSymbol.Internal();
128 Write( value = newValue );
140 auto symbols = transform_container< EnumValueSymbols >(
142 auto ids = transform_container<std::vector<WaveChannelSubViewType::Display>>(
165 wxT(
"/GUI/SampleViewChoice"),
167 {
wxT(
"ConnectDots"),
XO(
"Connect dots") },
168 {
wxT(
"StemPlot"),
XO(
"Stem plot") }
177 wxT(
"/GUI/SampleView")
187 {
wxT(
"FitToWidth"),
XO(
"Fit to Width") },
188 {
wxT(
"ZoomToSelection"),
XO(
"Zoom to Selection") },
189 {
wxT(
"ZoomDefault"),
XO(
"Zoom Default") },
192 {
wxT(
"FifthsOfSeconds"),
XO(
"5ths of Seconds") },
193 {
wxT(
"TenthsOfSeconds"),
XO(
"10ths of Seconds") },
194 {
wxT(
"TwentiethsOfSeconds"),
XO(
"20ths of Seconds") },
195 {
wxT(
"FiftiethsOfSeconds"),
XO(
"50ths of Seconds") },
196 {
wxT(
"HundredthsOfSeconds"),
XO(
"100ths of Seconds") },
197 {
wxT(
"FiveHundredthsOfSeconds"),
XO(
"500ths of Seconds") },
198 {
XO(
"MilliSeconds") },
200 {
wxT(
"FourPixelsPerSample"),
XO(
"4 Pixels per Sample") },
201 {
wxT(
"MaxZoom"),
XO(
"Max Zoom") },
222 wxT(
"/GUI/ZoomPreset1Choice"),
228 wxT(
"/GUI/ZoomPreset1")
232 wxT(
"/GUI/ZoomPreset2Choice"),
238 wxT(
"/GUI/ZoomPreset2")
272 return XO(
"Preferences for Tracks");
277 return "Tracks_Preferences";
305 S.StartStatic(
XO(
"Display"));
308 S.TieCheckBox(
XXO(
"Use &half-wave display when collapsed"),
309 {
wxT(
"/GUI/CollapseToHalfWave"),
311#ifdef SHOW_PINNED_UNPINNED_IN_PREFS
312 S.TieCheckBox(
XXO(
"&Pinned Recording/Playback head"),
316 S.TieCheckBox(
XXO(
"A&uto-scroll if head unpinned"),
317 {
wxT(
"/GUI/AutoScroll"),
322 S.StartMultiColumn(2);
324#ifdef SHOW_PINNED_POSITION_IN_PREFS
326 XXO(
"Pinned &head position"),
333 S.TieChoice(
XXO(
"Default &view mode:"),
337 XXO(
"Default Waveform scale:"),
340 S.TieChoice(
XXO(
"Display &samples:"),
343 S.TieTextBox(
XXO(
"Default audio track &name:"),
351 S.StartStatic(
XO(
"Zoom Toggle"));
353 S.StartMultiColumn(4);
355 S.TieChoice(
XXO(
"Preset 1:"),
358 S.TieChoice(
XXO(
"Preset 2:"),
390 return std::max(0.0,
std::min(1.0, value));
395 value = std::max(0.0,
std::min(1.0, value));
449 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 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 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.
WAVE_TRACK_API Display ConvertLegacyDisplayValue(int oldValue)
@ obsoleteWaveformDBDisplay
@ 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.
const wxChar * PinnedHeadPositionPreferenceKey()
static const AudacityProject::AttachedObjects::RegisteredFactory key
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