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
19#include "PrefsPanel.h"
20
21class ShuttleGui;
22
23#define THEME_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Theme") }
24
25class ThemePrefs final : public PrefsPanel
26{
27 public:
28 ThemePrefs(wxWindow * parent, wxWindowID winid);
29 ~ThemePrefs(void);
30 ComponentInterfaceSymbol GetSymbol() const override;
31 TranslatableString GetDescription() const override;
32
33 bool Commit() override;
34 void Cancel() override;
35 ManualPageID HelpPageName() override;
36
37 private:
38 void Populate();
39 void PopulateOrExchange(ShuttleGui & S) override;
40 void OnLoadThemeComponents(wxCommandEvent & e);
41 void OnSaveThemeComponents(wxCommandEvent & e);
42 void OnLoadThemeCache(wxCommandEvent & e);
43 void OnSaveThemeCache(wxCommandEvent & e);
44 void OnReadThemeInternal(wxCommandEvent & e);
45 void OnSaveThemeAsCode(wxCommandEvent & e);
46
47 DECLARE_EVENT_TABLE()
48};
49
50#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:640
A PrefsPanel that configures dynamic loading of Theme icons and colours.
Definition: ThemePrefs.h:26
void OnReadThemeInternal(wxCommandEvent &e)
Read Theme from internal storage.
Definition: ThemePrefs.cpp:205
void PopulateOrExchange(ShuttleGui &S) override
Create the dialog contents, or exchange data with it.
Definition: ThemePrefs.cpp:104
bool Commit() override
Update the preferences stored on disk.
Definition: ThemePrefs.cpp:221
ComponentInterfaceSymbol GetSymbol() const override
Definition: ThemePrefs.cpp:74
void OnSaveThemeComponents(wxCommandEvent &e)
Save Theme to multiple png files.
Definition: ThemePrefs.cpp:182
void OnSaveThemeAsCode(wxCommandEvent &e)
Save Theme as C source code.
Definition: ThemePrefs.cpp:213
void OnLoadThemeComponents(wxCommandEvent &e)
Load Theme from multiple png files.
Definition: ThemePrefs.cpp:174
~ThemePrefs(void)
Definition: ThemePrefs.cpp:70
void OnLoadThemeCache(wxCommandEvent &e)
Load Theme from single png file.
Definition: ThemePrefs.cpp:189
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: ThemePrefs.cpp:84
ThemePrefs(wxWindow *parent, wxWindowID winid)
Definition: ThemePrefs.cpp:60
void OnSaveThemeCache(wxCommandEvent &e)
Save Themes, each to a single png file.
Definition: ThemePrefs.cpp:197
void Cancel() override
Definition: ThemePrefs.cpp:232
TranslatableString GetDescription() const override
Definition: ThemePrefs.cpp:79
void Populate()
Creates the dialog and its contents.
Definition: ThemePrefs.cpp:90
Holds a msgid for the translation catalog; may also bind format arguments.