Audacity 3.2.0
WaveformPrefs.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5WaveformPrefs.h
6
7Paul Licameli
8
9**********************************************************************/
10
11
12#ifndef __AUDACITY_WAVEFORM_PREFS__
13#define __AUDACITY_WAVEFORM_PREFS__
14
15#include "PrefsPanel.h"
16#include "WaveformSettings.h"
17
18class ShuttleGui;
19class WaveChannel;
20class wxCheckBox;
21class wxChoice;
22
23#define WAVEFORM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Waveform") }
24
25class WaveformPrefs final : public PrefsPanel
26{
27public:
28 WaveformPrefs(wxWindow * parent, wxWindowID winid,
29 AudacityProject *pProject, WaveChannel *wc);
30 virtual ~WaveformPrefs();
31 ComponentInterfaceSymbol GetSymbol() const override;
32 TranslatableString GetDescription() const override;
33 ManualPageID HelpPageName() override;
34
35 bool Commit() override;
36 bool ShowsPreviewButton() override;
37 bool Validate() override;
38 void PopulateOrExchange(ShuttleGui & S) override;
39
40private:
41 void Populate();
42
43 void OnControl(wxCommandEvent&);
44 void OnScale(wxCommandEvent&);
45 void OnDefaults(wxCommandEvent&);
46 DECLARE_EVENT_TABLE()
47
48 void EnableDisableRange();
49
51
54
55 wxCheckBox *mDefaultsCheckbox;
56 wxChoice *mScaleChoice;
57 wxChoice *mRangeChoice;
58
61
63
65};
66
71#endif
#define S(N)
Definition: ToChars.cpp:64
std::vector< TranslatableString > TranslatableStrings
PrefsPanel::Factory WaveformPrefsFactory(WaveChannel *wc)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
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
std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) > Factory
Definition: PrefsPanel.h:82
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
A PrefsPanel for spectrum settings.
Definition: WaveformPrefs.h:26
virtual ~WaveformPrefs()
WaveChannel *const mWc
Definition: WaveformPrefs.h:52
WaveformPrefs(wxWindow *parent, wxWindowID winid, AudacityProject *pProject, WaveChannel *wc)
bool ShowsPreviewButton() override
TranslatableStrings mRangeChoices
Definition: WaveformPrefs.h:60
void OnControl(wxCommandEvent &)
TranslatableString GetDescription() const override
void OnDefaults(wxCommandEvent &)
WaveformSettings mTempSettings
Definition: WaveformPrefs.h:62
ComponentInterfaceSymbol GetSymbol() const override
void EnableDisableRange()
AudacityProject * mProject
Definition: WaveformPrefs.h:50
void OnScale(wxCommandEvent &)
wxChoice * mRangeChoice
Definition: WaveformPrefs.h:57
bool Commit() override
wxChoice * mScaleChoice
Definition: WaveformPrefs.h:56
wxCheckBox * mDefaultsCheckbox
Definition: WaveformPrefs.h:55
void PopulateOrExchange(ShuttleGui &S) override
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
bool Validate() override
wxArrayStringEx mRangeCodes
Definition: WaveformPrefs.h:59
Waveform settings, either for one track or as defaults.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.