1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-03 17:39:25 +02:00
audacity/src/prefs/WaveformPrefs.h
Paul Licameli bf005c0dec PrefsPanel::Factory is a specialization of std::function...
... We don't need to define a class for it
2019-05-16 12:14:51 -04:00

71 lines
1.6 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
WaveformPrefs.h
Paul Licameli
**********************************************************************/
#ifndef __AUDACITY_WAVEFORM_PREFS__
#define __AUDACITY_WAVEFORM_PREFS__
#include "PrefsPanel.h"
#include "WaveformSettings.h"
class ShuttleGui;
class WaveTrack;
class wxCheckBox;
class wxChoice;
class wxArrayStringEx;
#define WAVEFORM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Waveform") }
class WaveformPrefs final : public PrefsPanel
{
public:
WaveformPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
virtual ~WaveformPrefs();
ComponentInterfaceSymbol GetSymbol() override;
wxString GetDescription() override;
wxString HelpPageName() override;
bool Commit() override;
bool ShowsPreviewButton() override;
bool Validate() override;
void PopulateOrExchange(ShuttleGui & S) override;
private:
void Populate();
void OnControl(wxCommandEvent&);
void OnScale(wxCommandEvent&);
void OnDefaults(wxCommandEvent&);
DECLARE_EVENT_TABLE()
void EnableDisableRange();
WaveTrack *const mWt;
bool mDefaulted;
wxCheckBox *mDefaultsCheckbox;
wxChoice *mScaleChoice;
wxChoice *mRangeChoice;
wxArrayStringEx mRangeCodes;
wxArrayStringEx mRangeChoices;
WaveformSettings mTempSettings;
bool mPopulating;
};
/// A PrefsPanel::Factory that creates one WaveformPrefs panel.
/// This factory can be parametrized by a single track, to change settings
/// non-globally
extern PrefsPanel::Factory WaveformPrefsFactory(WaveTrack *wt);
#endif