Audacity 3.2.0
GUIPrefs.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 GUIPrefs.h
6
7 Brian Gunlogson
8 Joshua Haberman
9 James Crook
10
11**********************************************************************/
12
13#ifndef __AUDACITY_GUI_PREFS__
14#define __AUDACITY_GUI_PREFS__
15
16#include <wx/defs.h>
17
18#include "PrefsPanel.h"
19
20class ChoiceSetting;
21class BoolSetting;
22class ShuttleGui;
23
24#define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") }
25
26class AUDACITY_DLL_API GUIPrefs final : public PrefsPanel
27{
28 public:
29 GUIPrefs(wxWindow * parent, wxWindowID winid);
30 ~GUIPrefs();
31 ComponentInterfaceSymbol GetSymbol() const override;
32 TranslatableString GetDescription() const override;
33
34 bool Commit() override;
35 ManualPageID HelpPageName() override;
36 void PopulateOrExchange(ShuttleGui & S) override;
37
38 static void GetRangeChoices(
39 TranslatableStrings *pChoices,
40 wxArrayStringEx *pCodes,
41 int *pDefaultRangeIndex = nullptr
42 );
43
44 private:
45 void Populate();
46
49
53};
54
55AUDACITY_DLL_API
57
58AUDACITY_DLL_API BoolSetting& ShowRMSPref();
59
60#endif
AUDACITY_DLL_API int ShowClippingPrefsID()
Definition: GUIPrefs.cpp:225
AUDACITY_DLL_API BoolSetting & ShowRMSPref()
Definition: GUIPrefs.cpp:231
#define S(N)
Definition: ToChars.cpp:64
std::vector< TranslatableString > TranslatableStrings
This specialization of Setting for bool adds a Toggle method to negate the saved value.
Definition: Prefs.h:346
virtual ComponentInterfaceSymbol GetSymbol() const =0
virtual TranslatableString GetDescription() const =0
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
A PrefsPanel for general GUI preferences.
Definition: GUIPrefs.h:27
int mDefaultRangeIndex
Definition: GUIPrefs.h:52
wxArrayStringEx mRangeCodes
Definition: GUIPrefs.h:50
wxArrayStringEx mLangCodes
Definition: GUIPrefs.h:47
TranslatableStrings mLangNames
Definition: GUIPrefs.h:48
TranslatableStrings mRangeChoices
Definition: GUIPrefs.h:51
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
virtual ManualPageID HelpPageName()
If not empty string, the Help button is added below the panel.
Definition: PrefsPanel.cpp:60
virtual bool Commit()=0
virtual void PopulateOrExchange(ShuttleGui &WXUNUSED(S))
Definition: PrefsPanel.h:120
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.