Audacity 3.2.0
LinearUpdater.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 LinearUpdater.h
6
7 Dominic Mazzoni
8 Michael Papadopoulos split from Ruler.h
9
10**********************************************************************/
11
12#ifndef __AUDACITY_LINEAR_UPDATER__
13#define __AUDACITY_LINEAR_UPDATER__
14
15#include "GeneratedUpdater.h"
16
17class ZoomInfo;
18
19class LinearUpdater final : public GeneratedUpdater {
20public:
21 LinearUpdater() = default;
22
23 // Always has default data values
24 static const LinearUpdater &Instance();
25
26 ~LinearUpdater() override;
27
28 void Update(
29 wxDC& dc, const Envelope* envelope,
30 UpdateOutputs& allOutputs, const RulerStruct& context
31 ) const override;
32
33 void SetData(const ZoomInfo *pZoomInfo = nullptr, int leftOffset = 0)
34 {
35 mpZoomInfo = pZoomInfo;
36 mLeftOffset = 0;
37 }
38
39private:
42};
43
44#endif
Piecewise linear or piecewise exponential function from double to double.
Definition: Envelope.h:72
const ZoomInfo * mpZoomInfo
Definition: LinearUpdater.h:40
void SetData(const ZoomInfo *pZoomInfo=nullptr, int leftOffset=0)
Definition: LinearUpdater.h:33
LinearUpdater()=default
void Update(wxDC &dc, const Envelope *envelope, UpdateOutputs &allOutputs, const RulerStruct &context) const override
static const LinearUpdater & Instance()
~LinearUpdater() override