Audacity  3.0.3
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/event.h> // to declare a custom event type
19 
20 #include "PrefsPanel.h"
21 
22 class ShuttleGui;
23 
24 // An event sent to the application when the user changes choice of theme
25 wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
26  EVT_THEME_CHANGE, wxCommandEvent);
27 
28 #define THEME_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Theme") }
29 
30 class ThemePrefs final : public PrefsPanel
31 {
32  public:
33  ThemePrefs(wxWindow * parent, wxWindowID winid);
34  ~ThemePrefs(void);
37 
38  bool Commit() override;
39  void Cancel() override;
40  ManualPageID HelpPageName() override;
41 
42  static void ApplyUpdatedImages();
43 
44  private:
45  void Populate();
46  void PopulateOrExchange(ShuttleGui & S) override;
47  void OnLoadThemeComponents(wxCommandEvent & e);
48  void OnSaveThemeComponents(wxCommandEvent & e);
49  void OnLoadThemeCache(wxCommandEvent & e);
50  void OnSaveThemeCache(wxCommandEvent & e);
51  void OnReadThemeInternal(wxCommandEvent & e);
52  void OnSaveThemeAsCode(wxCommandEvent & e);
53 
54  DECLARE_EVENT_TABLE()
55 };
56 
57 #endif
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
ThemePrefs::Cancel
void Cancel() override
Definition: ThemePrefs.cpp:263
ThemePrefs::HelpPageName
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: ThemePrefs.cpp:101
ThemePrefs::OnSaveThemeCache
void OnSaveThemeCache(wxCommandEvent &e)
Save Themes, each to a single png file.
Definition: ThemePrefs.cpp:216
PrefsPanel.h
ThemePrefs::OnLoadThemeCache
void OnLoadThemeCache(wxCommandEvent &e)
Load Theme from single png file.
Definition: ThemePrefs.cpp:208
wxDECLARE_EXPORTED_EVENT
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_THEME_CHANGE, wxCommandEvent)
ThemePrefs::ThemePrefs
ThemePrefs(wxWindow *parent, wxWindowID winid)
Definition: ThemePrefs.cpp:77
ThemePrefs::Populate
void Populate()
Creates the dialog and its contents.
Definition: ThemePrefs.cpp:107
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
ThemePrefs::OnSaveThemeAsCode
void OnSaveThemeAsCode(wxCommandEvent &e)
Save Theme as C source code.
Definition: ThemePrefs.cpp:234
ThemePrefs::Commit
bool Commit() override
Update the preferences stored on disk.
Definition: ThemePrefs.cpp:252
ThemePrefs::~ThemePrefs
~ThemePrefs(void)
Definition: ThemePrefs.cpp:87
ThemePrefs::GetDescription
TranslatableString GetDescription() override
Definition: ThemePrefs.cpp:96
ThemePrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Create the dialog contents, or exchange data with it.
Definition: ThemePrefs.cpp:121
ThemePrefs::ApplyUpdatedImages
static void ApplyUpdatedImages()
Definition: ThemePrefs.cpp:243
ThemePrefs::OnReadThemeInternal
void OnReadThemeInternal(wxCommandEvent &e)
Read Theme from internal storage.
Definition: ThemePrefs.cpp:226
TaggedIdentifier< ManualPageIDTag >
ThemePrefs
A PrefsPanel that configures dynamic loading of Theme icons and colours.
Definition: ThemePrefs.h:31
ThemePrefs::OnLoadThemeComponents
void OnLoadThemeComponents(wxCommandEvent &e)
Load Theme from multiple png files.
Definition: ThemePrefs.cpp:191
PrefsPanel
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
ThemePrefs::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: ThemePrefs.cpp:91
ThemePrefs::OnSaveThemeComponents
void OnSaveThemeComponents(wxCommandEvent &e)
Save Theme to multiple png files.
Definition: ThemePrefs.cpp:199
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631