Audacity 3.2.0
CustomUpdater.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 CustomUpdater.h
6
7 Dominic Mazzoni
8 Michael Papadopoulos split from Ruler.h
9
10**********************************************************************/
11
12#ifndef __AUDACITY_CUSTOM_UPDATER__
13#define __AUDACITY_CUSTOM_UPDATER__
14
15#include "RulerUpdater.h"
16
18public:
20 ~CustomUpdater() override;
21
22 void Update(
23 wxDC& dc, const Envelope* envelope,
24 UpdateOutputs& allOutputs, const RulerStruct& context
25 ) const final;
26
27 void SetData(
28 RulerUpdater::Labels majorLabels,
29 RulerUpdater::Labels minorLabels,
30 RulerUpdater::Labels minorMinorLabels
31 )
32 {
33 mMajorLabels = move(majorLabels);
34 mMinorLabels = move(minorLabels);
35 mMinorMinorLabels = move(minorMinorLabels);
36 }
37
38protected:
39 virtual bool TickCustom(wxDC& dc, int labelIdx, wxFont font,
40 TickOutputs outputs,
41 const RulerStruct& context
42 ) const = 0;
43
45};
46
47#endif
virtual bool TickCustom(wxDC &dc, int labelIdx, wxFont font, TickOutputs outputs, const RulerStruct &context) const =0
RulerUpdater::Labels mMajorLabels
Definition: CustomUpdater.h:44
~CustomUpdater() override
RulerUpdater::Labels mMinorLabels
Definition: CustomUpdater.h:44
RulerUpdater::Labels mMinorMinorLabels
Definition: CustomUpdater.h:44
void SetData(RulerUpdater::Labels majorLabels, RulerUpdater::Labels minorLabels, RulerUpdater::Labels minorMinorLabels)
Definition: CustomUpdater.h:27
void Update(wxDC &dc, const Envelope *envelope, UpdateOutputs &allOutputs, const RulerStruct &context) const final
Piecewise linear or piecewise exponential function from double to double.
Definition: Envelope.h:72
Used to update a Ruler.
Definition: RulerUpdater.h:58
std::vector< Label > Labels
Definition: RulerUpdater.h:74