Audacity 3.2.0
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
22class ShuttleGui;
23
24#define THEME_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Theme") }
25
26class ThemePrefs final : public PrefsPanel
27{
28 public:
29 ThemePrefs(wxWindow * parent, wxWindowID winid);
30 ~ThemePrefs(void);
31 ComponentInterfaceSymbol GetSymbol() const override;
32 TranslatableString GetDescription() const override;
33
34 bool Commit() override;
35 void Cancel() override;
36 ManualPageID HelpPageName() override;
37
38 private:
39 void Populate();
40 void PopulateOrExchange(ShuttleGui & S) override;
41 void OnLoadThemeComponents(wxCommandEvent & e);
42 void OnSaveThemeComponents(wxCommandEvent & e);
43 void OnLoadThemeCache(wxCommandEvent & e);
44 void OnSaveThemeCache(wxCommandEvent & e);
45 void OnReadThemeInternal(wxCommandEvent & e);
46 void OnSaveThemeAsCode(wxCommandEvent & e);
47
48 DECLARE_EVENT_TABLE()
49};
50
51#endif
#define S(N)
Definition: ToChars.cpp:64
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
A PrefsPanel that configures dynamic loading of Theme icons and colours.
Definition: ThemePrefs.h:27
void OnReadThemeInternal(wxCommandEvent &e)
Read Theme from internal storage.
Definition: ThemePrefs.cpp:224
void PopulateOrExchange(ShuttleGui &S) override
Create the dialog contents, or exchange data with it.
Definition: ThemePrefs.cpp:119
bool Commit() override
Update the preferences stored on disk.
Definition: ThemePrefs.cpp:242
ComponentInterfaceSymbol GetSymbol() const override
Definition: ThemePrefs.cpp:89
void OnSaveThemeComponents(wxCommandEvent &e)
Save Theme to multiple png files.
Definition: ThemePrefs.cpp:197
void OnSaveThemeAsCode(wxCommandEvent &e)
Save Theme as C source code.
Definition: ThemePrefs.cpp:232
void OnLoadThemeComponents(wxCommandEvent &e)
Load Theme from multiple png files.
Definition: ThemePrefs.cpp:189
~ThemePrefs(void)
Definition: ThemePrefs.cpp:85
void OnLoadThemeCache(wxCommandEvent &e)
Load Theme from single png file.
Definition: ThemePrefs.cpp:206
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: ThemePrefs.cpp:99
ThemePrefs(wxWindow *parent, wxWindowID winid)
Definition: ThemePrefs.cpp:75
void OnSaveThemeCache(wxCommandEvent &e)
Save Themes, each to a single png file.
Definition: ThemePrefs.cpp:214
void Cancel() override
Definition: ThemePrefs.cpp:253
TranslatableString GetDescription() const override
Definition: ThemePrefs.cpp:94
void Populate()
Creates the dialog and its contents.
Definition: ThemePrefs.cpp:105
Holds a msgid for the translation catalog; may also bind format arguments.