Audacity 3.2.0
|
#include <Prefs.h>
Public Member Functions | |
ChoiceSetting (const SettingPath &, EnumValueSymbols, long=-1)=delete | |
ChoiceSetting (TransactionalSettingBase &key, EnumValueSymbols symbols, long defaultSymbol=-1) | |
ChoiceSetting (const SettingBase &key, EnumValueSymbols symbols, long defaultSymbol=-1) | |
const wxString & | Key () const |
const EnumValueSymbol & | Default () const |
const EnumValueSymbols & | GetSymbols () const |
wxString | Read () const |
wxString | ReadWithDefault (const wxString &) const |
bool | Write (const wxString &value) |
void | SetDefault (long value) |
Protected Member Functions | |
size_t | Find (const wxString &value) const |
virtual void | Migrate (wxString &) |
Protected Attributes | |
const wxString | mKey |
const EnumValueSymbols | mSymbols |
TransactionalSettingBase *const | mpOtherSettings {} |
bool | mMigrated { false } |
long | mDefaultSymbol |
Packages a table of user-visible choices each with an internal code string, a preference key path, and a default choice
|
delete |
Disallow construction from the GetPath() of another SettingBase object; instead require that object to be passed as reference to the next ctor
|
inline |
defaultSymbol < static_cast<long>(mSymbols.size())
Definition at line 419 of file Prefs.h.
|
inline |
const EnumValueSymbol & ChoiceSetting::Default | ( | ) | const |
Definition at line 380 of file Prefs.cpp.
References mDefaultSymbol, and mSymbols.
Referenced by Read(), HelpSystem::ShowHelp(), ShuttleGuiBase::TieChoice(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieChoice().
|
protected |
Definition at line 411 of file Prefs.cpp.
References details::end(), and GetSymbols().
Referenced by EnumSettingBase::ReadInt(), EnumSettingBase::ReadIntWithDefault(), ReadWithDefault(), and Write().
|
inline |
Definition at line 441 of file Prefs.h.
Referenced by Find(), AudioPasteDialog::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), ShuttleGuiBase::TieChoice(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieChoice().
|
inline |
Definition at line 439 of file Prefs.h.
Referenced by ShuttleGuiBase::TieChoice(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieChoice().
|
protectedvirtual |
Reimplemented in EnumSettingBase, SpectrogramSettings::ColorSchemeEnumSetting, and TracksViewModeEnumSetting.
Definition at line 419 of file Prefs.cpp.
Referenced by ReadWithDefault().
wxString ChoiceSetting::Read | ( | ) | const |
Definition at line 388 of file Prefs.cpp.
References Default(), ComponentInterfaceSymbol::Internal(), and ReadWithDefault().
Referenced by anonymous_namespace{PluginMenus.cpp}::AnalyzeMenu(), anonymous_namespace{PluginMenus.cpp}::EffectMenu(), ExportAudioDialog::ExportAudioDialog(), anonymous_namespace{EditMenus.cpp}::FindSourceTracks(), anonymous_namespace{PluginMenus.cpp}::GenerateMenu(), ThemeBase::LoadPreferredTheme(), AudioPasteDialog::OnContinue(), EnumSettingBase::ReadInt(), AudacityMirProject::ShouldBeReconfigured(), ThemeBase::SwitchTheme(), ShuttleGuiBase::TieChoice(), anonymous_namespace{PluginMenus.cpp}::ToolsMenu(), and anonymous_namespace{RealtimeEffectPanel.cpp}::EffectsMenuHelper::UpdateEffectMenuItems().
wxString ChoiceSetting::ReadWithDefault | ( | const wxString & | defaultValue | ) | const |
Definition at line 394 of file Prefs.cpp.
References Find(), gPrefs, Migrate(), mKey, mMigrated, mSymbols, and audacity::BasicSettings::Read().
Referenced by Read(), and EnumSettingBase::ReadIntWithDefault().
void ChoiceSetting::SetDefault | ( | long | value | ) |
defaultSymbol < static_cast<long>(GetSymbols().size())
Definition at line 439 of file Prefs.cpp.
References mDefaultSymbol.
bool ChoiceSetting::Write | ( | const wxString & | value | ) |
Definition at line 424 of file Prefs.cpp.
References Find(), gPrefs, TransactionalSettingBase::Invalidate(), mKey, mMigrated, mpOtherSettings, mSymbols, and audacity::BasicSettings::Write().
Referenced by EnumSettingBase::Migrate(), SpectrogramSettings::ColorSchemeEnumSetting::Migrate(), TracksViewModeEnumSetting::Migrate(), AudioPasteDialog::OnContinue(), AudacityMirProject::ShouldBeReconfigured(), HelpSystem::ShowHelp(), ShuttleGuiBase::TieChoice(), and EnumSettingBase::WriteInt().
|
protected |
Definition at line 466 of file Prefs.h.
Referenced by Default(), EnumSettingBase::Migrate(), and SetDefault().
|
protected |
Definition at line 459 of file Prefs.h.
Referenced by ReadWithDefault(), and Write().
|
mutableprotected |
Definition at line 464 of file Prefs.h.
Referenced by ReadWithDefault(), and Write().
|
protected |
|
protected |
Definition at line 460 of file Prefs.h.
Referenced by Default(), EnumSettingBase::Migrate(), EnumSettingBase::ReadIntWithDefault(), ReadWithDefault(), Write(), and EnumSettingBase::WriteInt().