2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
GUIPrefs.h
|
|
|
|
|
|
|
|
Brian Gunlogson
|
|
|
|
Joshua Haberman
|
|
|
|
James Crook
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_GUI_PREFS__
|
|
|
|
#define __AUDACITY_GUI_PREFS__
|
|
|
|
|
|
|
|
#include <wx/defs.h>
|
|
|
|
|
|
|
|
#include "PrefsPanel.h"
|
|
|
|
|
2019-04-02 22:40:42 +00:00
|
|
|
class ChoiceSetting;
|
2015-06-18 14:24:36 +00:00
|
|
|
class ShuttleGui;
|
|
|
|
|
2019-04-15 12:01:24 +00:00
|
|
|
#define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") }
|
|
|
|
|
2020-09-28 12:50:18 +00:00
|
|
|
class AUDACITY_DLL_API GUIPrefs final : public PrefsPanel
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-10-28 00:35:52 +00:00
|
|
|
GUIPrefs(wxWindow * parent, wxWindowID winid);
|
2010-01-23 19:44:49 +00:00
|
|
|
~GUIPrefs();
|
2019-04-19 18:20:57 +00:00
|
|
|
ComponentInterfaceSymbol GetSymbol() override;
|
2019-12-08 18:53:48 +00:00
|
|
|
TranslatableString GetDescription() override;
|
2019-04-15 12:01:24 +00:00
|
|
|
|
2017-06-25 14:57:26 +00:00
|
|
|
bool Commit() override;
|
2017-05-14 15:19:54 +00:00
|
|
|
wxString HelpPageName() override;
|
2018-02-24 19:39:58 +00:00
|
|
|
void PopulateOrExchange(ShuttleGui & S) override;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2019-02-12 21:30:22 +00:00
|
|
|
static void GetRangeChoices(
|
2019-12-18 03:52:42 +00:00
|
|
|
TranslatableStrings *pChoices,
|
2019-02-26 10:56:27 +00:00
|
|
|
wxArrayStringEx *pCodes,
|
|
|
|
int *pDefaultRangeIndex = nullptr
|
|
|
|
);
|
2015-08-15 22:07:29 +00:00
|
|
|
|
2019-04-25 20:34:34 +00:00
|
|
|
// If no input language given, defaults first to choice in preferences, then
|
|
|
|
// to system language.
|
|
|
|
// Returns the language actually used which is not lang if lang cannot be found.
|
|
|
|
static wxString InitLang( wxString lang = {} );
|
|
|
|
|
|
|
|
// If no input language given, defaults to system language.
|
|
|
|
// Returns the language actually used which is not lang if lang cannot be found.
|
|
|
|
static wxString SetLang( const wxString & lang );
|
|
|
|
|
|
|
|
// Returns the last language code that was set
|
|
|
|
static wxString GetLang();
|
2020-03-06 12:06:17 +00:00
|
|
|
// Returns the last language code that was set
|
|
|
|
// Unlike GetLang, gives en rather than en_GB or en_US for result.
|
|
|
|
static wxString GetLangShort();
|
2019-04-25 20:34:34 +00:00
|
|
|
|
2021-04-02 08:37:23 +00:00
|
|
|
static wxString GetLocaleName();
|
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
private:
|
|
|
|
void Populate();
|
|
|
|
|
2019-02-12 21:30:22 +00:00
|
|
|
wxArrayStringEx mLangCodes;
|
2019-11-30 22:56:51 +00:00
|
|
|
TranslatableStrings mLangNames;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2019-02-12 21:30:22 +00:00
|
|
|
wxArrayStringEx mRangeCodes;
|
2019-11-30 22:56:51 +00:00
|
|
|
TranslatableStrings mRangeChoices;
|
2019-02-26 10:56:27 +00:00
|
|
|
int mDefaultRangeIndex;
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
2020-09-28 12:50:18 +00:00
|
|
|
AUDACITY_DLL_API
|
2018-02-17 22:42:14 +00:00
|
|
|
int ShowClippingPrefsID();
|
2021-04-24 11:20:18 +00:00
|
|
|
int ShowTrackNameInWaveformPrefsID();
|
2018-02-17 22:42:14 +00:00
|
|
|
|
2020-09-28 12:50:18 +00:00
|
|
|
extern AUDACITY_DLL_API ChoiceSetting
|
2019-04-02 22:40:42 +00:00
|
|
|
GUIManualLocation
|
|
|
|
;
|
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
#endif
|