Audacity  2.2.0
ModulePrefs.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  ModulePrefs.h
6 
7  Brian Gunlogson
8  Joshua Haberman
9  James Crook
10 
11 **********************************************************************/
12 
13 #ifndef __AUDACITY_MODULE_PREFS__
14 #define __AUDACITY_MODULE_PREFS__
15 
16 #include <wx/defs.h>
17 
18 #include <wx/window.h>
19 
20 #include "PrefsPanel.h"
21 
22 
23 class ShuttleGui;
24 
25 enum {
28  kModuleAsk = 2, // Will ask, each time, when audacity starts.
29  kModuleFailed = 3, // Audacity thinks this is a bad module.
30  kModuleNew = 4 // Audacity will ask once, and remember the answer.
31 };
32 
33 
34 class ModulePrefs final : public PrefsPanel
35 {
36  public:
37  ModulePrefs(wxWindow * parent);
38  ~ModulePrefs();
39  bool Commit() override;
40  wxString HelpPageName() override;
41 
42  static int GetModuleStatus( const wxString &fname );
43  static void SetModuleStatus( const wxString &fname, int iStatus );
44 
45  private:
46  void GetAllModuleStatuses();
47  void Populate();
49  wxArrayString mModules;
50  wxArrayInt mStatuses;
51  wxArrayString mPaths;
52 };
53 
55 {
56 public:
57  PrefsPanel *Create(wxWindow *parent) override;
58 };
59 #endif
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:369
ModulePrefs(wxWindow *parent)
Definition: ModulePrefs.cpp:31
~ModulePrefs()
Definition: ModulePrefs.cpp:37
Definition: ModulePrefs.h:27
wxArrayString mModules
Definition: ModulePrefs.h:49
wxString HelpPageName() override
Definition: ModulePrefs.cpp:164
static void SetModuleStatus(const wxString &fname, int iStatus)
Definition: ModulePrefs.cpp:155
Definition: ModulePrefs.h:54
void PopulateOrExchange(ShuttleGui &S)
Definition: ModulePrefs.cpp:95
wxArrayInt mStatuses
Definition: ModulePrefs.h:50
void GetAllModuleStatuses()
Definition: ModulePrefs.cpp:41
static int GetModuleStatus(const wxString &fname)
Definition: ModulePrefs.cpp:141
Definition: ModulePrefs.h:28
bool Commit() override
Definition: ModulePrefs.cpp:129
Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
Definition: PrefsPanel.h:43
Definition: ModulePrefs.h:30
Definition: ModulePrefs.h:26
A PrefsPanel to enable/disable certain modules. 'Modules' are dynamically linked libraries that modif...
Definition: ModulePrefs.h:34
wxArrayString mPaths
Definition: ModulePrefs.h:51
Definition: PrefsPanel.h:70
void Populate()
Definition: ModulePrefs.cpp:83
Definition: ModulePrefs.h:29
PrefsPanel * Create(wxWindow *parent) override
Definition: ModulePrefs.cpp:169