1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-11 09:31:13 +02:00
audacity/src/widgets/MeterPanelBase.h
Paul Licameli 6adb2abc98 Keep EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT compilable...
... while not reintroducing bad dependencies, which explains the movement
of the definition of some constants
2019-07-02 12:35:40 -04:00

46 lines
1.2 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
MeterPanelBase.h
Paul Licameli split from Meter.h
**********************************************************************/
#ifndef __AUDACITY_METER_PANEL_BASE__
#define __AUDACITY_METER_PANEL_BASE__
#include "wxPanelWrapper.h"
class MeterPanelBase /* not final */
: public wxPanelWrapper
{
public:
using wxPanelWrapper::wxPanelWrapper;
~MeterPanelBase() override;
virtual void Clear() = 0;
virtual void Reset(double sampleRate, bool resetClipping) = 0;
virtual void UpdateDisplay(unsigned numChannels,
int numFrames, float *sampleData) = 0;
virtual bool IsMeterDisabled() const = 0;
virtual float GetMaxPeak() const = 0;
virtual bool IsClipping() const = 0;
virtual int GetDBRange() const = 0;
bool AcceptsFocus() const override { return s_AcceptsFocus; }
bool AcceptsFocusFromKeyboard() const override { return true; }
private:
static bool s_AcceptsFocus;
struct Resetter { void operator () (bool *p) const { if(p) *p = false; } };
using TempAllowFocus = std::unique_ptr<bool, Resetter>;
public:
static TempAllowFocus TemporarilyAllowFocus();
};
#endif