Audacity  2.3.1
ThemePrefs.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  ThemePrefs.h
6 
7  James Crook
8 
9  Audacity is free software.
10  This file is licensed under the wxWidgets license, see License.txt
11 
12 **********************************************************************/
13 
14 #ifndef __AUDACITY_THEME_PREFS__
15 #define __AUDACITY_THEME_PREFS__
16 
17 #include <wx/defs.h>
18 #include <wx/window.h>
19 
20 #include "PrefsPanel.h"
21 
22 class ShuttleGui;
23 
24 class ThemePrefs final : public PrefsPanel
25 {
26  public:
27  ThemePrefs(wxWindow * parent, wxWindowID winid);
28  ~ThemePrefs(void);
29  bool Commit() override;
30 
31  private:
32  void Populate();
33  void PopulateOrExchange(ShuttleGui & S) override;
34  void OnLoadThemeComponents(wxCommandEvent & e);
35  void OnSaveThemeComponents(wxCommandEvent & e);
36  void OnLoadThemeCache(wxCommandEvent & e);
37  void OnSaveThemeCache(wxCommandEvent & e);
38  void OnReadThemeInternal(wxCommandEvent & e);
39  void OnSaveThemeAsCode(wxCommandEvent & e);
40 
41  DECLARE_EVENT_TABLE()
42 };
43 
45 {
46 public:
47  PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
48 };
49 #endif
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void Populate()
Creates the dialog and its contents.
Definition: ThemePrefs.cpp:74
void OnSaveThemeAsCode(wxCommandEvent &e)
Save Theme as C source code.
Definition: ThemePrefs.cpp:189
void OnSaveThemeCache(wxCommandEvent &e)
Save Theme to single png file.
Definition: ThemePrefs.cpp:175
bool Commit() override
Update the preferences stored on disk.
Definition: ThemePrefs.cpp:196
void OnLoadThemeCache(wxCommandEvent &e)
Load Theme from single png file.
Definition: ThemePrefs.cpp:168
ThemePrefs(wxWindow *parent, wxWindowID winid)
Definition: ThemePrefs.cpp:59
PrefsPanel * operator()(wxWindow *parent, wxWindowID winid) override
Definition: ThemePrefs.cpp:204
void OnReadThemeInternal(wxCommandEvent &e)
Read Theme from internal storage.
Definition: ThemePrefs.cpp:182
Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
Definition: PrefsPanel.h:45
~ThemePrefs(void)
Definition: ThemePrefs.cpp:69
A PrefsPanel that configures dynamic loading of Theme icons and colours.
Definition: ThemePrefs.h:24
void OnSaveThemeComponents(wxCommandEvent &e)
Save Theme to multiple png files.
Definition: ThemePrefs.cpp:162
void PopulateOrExchange(ShuttleGui &S) override
Create the dialog contents, or exchange data with it.
Definition: ThemePrefs.cpp:88
void OnLoadThemeComponents(wxCommandEvent &e)
Load Theme from multiple png files.
Definition: ThemePrefs.cpp:155