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 WaveTrack;
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, WaveTrack *wt);
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
52 WaveTrack *const mWt;
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(WaveTrack *wt)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
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:79
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
Definition: WaveTrack.h:57
A PrefsPanel for spectrum settings.
Definition: WaveformPrefs.h:26
virtual ~WaveformPrefs()
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
WaveTrack *const mWt
Definition: WaveformPrefs.h:52
WaveformPrefs(wxWindow *parent, wxWindowID winid, AudacityProject *pProject, WaveTrack *wt)
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.