Audacity  3.0.3
WaveformPrefs.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 WaveformPrefs.h
6 
7 Paul 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 
18 class ShuttleGui;
19 class WaveTrack;
20 class wxCheckBox;
21 class wxChoice;
22 
23 #define WAVEFORM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Waveform") }
24 
25 class WaveformPrefs final : public PrefsPanel
26 {
27 public:
28  WaveformPrefs(wxWindow * parent, wxWindowID winid,
29  AudacityProject *pProject, WaveTrack *wt);
30  virtual ~WaveformPrefs();
33  ManualPageID HelpPageName() override;
34 
35  bool Commit() override;
36  bool ShowsPreviewButton() override;
37  bool Validate() override;
38  void PopulateOrExchange(ShuttleGui & S) override;
39 
40 private:
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;
53  bool mDefaulted;
54 
55  wxCheckBox *mDefaultsCheckbox;
56  wxChoice *mScaleChoice;
57  wxChoice *mRangeChoice;
58 
61 
63 
65 };
66 
71 #endif
WaveformPrefs::mDefaulted
bool mDefaulted
Definition: WaveformPrefs.h:53
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
WaveformPrefs::mWt
WaveTrack *const mWt
Definition: WaveformPrefs.h:52
WaveformPrefs::~WaveformPrefs
virtual ~WaveformPrefs()
Definition: WaveformPrefs.cpp:55
WaveformPrefs::mScaleChoice
wxChoice * mScaleChoice
Definition: WaveformPrefs.h:56
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
WaveformPrefs::OnScale
void OnScale(wxCommandEvent &)
Definition: WaveformPrefs.cpp:224
WaveformPrefs::mDefaultsCheckbox
wxCheckBox * mDefaultsCheckbox
Definition: WaveformPrefs.h:55
WaveformPrefs::Validate
bool Validate() override
Definition: WaveformPrefs.cpp:142
TranslatableStrings
std::vector< TranslatableString > TranslatableStrings
Definition: TranslatableString.h:295
PrefsPanel.h
WaveformPrefs::mTempSettings
WaveformSettings mTempSettings
Definition: WaveformPrefs.h:62
WaveformPrefs::Populate
void Populate()
Definition: WaveformPrefs.cpp:81
PrefsPanel::Factory
std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) > Factory
Definition: PrefsPanel.h:79
WaveformPrefs::mProject
AudacityProject * mProject
Definition: WaveformPrefs.h:50
wxArrayStringEx
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
Definition: wxArrayStringEx.h:18
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
WaveformPrefs::WaveformPrefs
WaveformPrefs(wxWindow *parent, wxWindowID winid, AudacityProject *pProject, WaveTrack *wt)
Definition: WaveformPrefs.cpp:33
WaveformPrefs::GetDescription
TranslatableString GetDescription() override
Definition: WaveformPrefs.cpp:64
WaveformSettings.h
WaveformPrefs::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: WaveformPrefs.cpp:59
WaveformPrefs
A PrefsPanel for spectrum settings.
Definition: WaveformPrefs.h:26
WaveformPrefs::OnControl
void OnControl(wxCommandEvent &)
Definition: WaveformPrefs.cpp:211
WaveformPrefs::mRangeChoices
TranslatableStrings mRangeChoices
Definition: WaveformPrefs.h:60
WaveformPrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: WaveformPrefs.cpp:93
WaveformPrefs::OnDefaults
void OnDefaults(wxCommandEvent &)
Definition: WaveformPrefs.cpp:232
WaveformPrefs::HelpPageName
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: WaveformPrefs.cpp:69
WaveformPrefs::mPopulating
bool mPopulating
Definition: WaveformPrefs.h:64
TaggedIdentifier< ManualPageIDTag >
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
WaveformPrefs::Commit
bool Commit() override
Definition: WaveformPrefs.cpp:158
WaveformPrefsFactory
PrefsPanel::Factory WaveformPrefsFactory(WaveTrack *wt)
Definition: WaveformPrefs.cpp:258
WaveformSettings
Waveform settings, either for one track or as defaults.
Definition: WaveformSettings.h:19
WaveformPrefs::ShowsPreviewButton
bool ShowsPreviewButton() override
Definition: WaveformPrefs.cpp:206
WaveformPrefs::mRangeCodes
wxArrayStringEx mRangeCodes
Definition: WaveformPrefs.h:59
PrefsPanel
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
WaveformPrefs::EnableDisableRange
void EnableDisableRange()
Definition: WaveformPrefs.cpp:243
WaveformPrefs::mRangeChoice
wxChoice * mRangeChoice
Definition: WaveformPrefs.h:57
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631