Audacity 3.2.0
RealFormat.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 RealFormat.h
6
7 Dominic Mazzoni
8 Michael Papadopoulos split from Ruler.h
9
10**********************************************************************/
11
12#ifndef __AUDACITY_REAL_FORMAT__
13#define __AUDACITY_REAL_FORMAT__
14
15#include "RulerFormat.h"
16
17// Unified what was formerly RealFormat and RealLogFormat
18class RealFormat final : public RulerFormat {
19public:
20 static const RealFormat &LinearInstance();
21 static const RealFormat &LogInstance();
22 ~RealFormat() override;
23
24 void SetTickSizes(
25 double units, double& major, double& minor, double& minorMinor,
26 int& mDigits
27 ) const override;
28
29 void SetLabelString(
30 wxString& s, double d, double units, double minor, int mDigits, TickType tickType
31 ) const override;
32
33private:
34 RealFormat(bool log) : mLog{ log } {}
35 const bool mLog;
36};
37
38#endif
void SetTickSizes(double units, double &major, double &minor, double &minorMinor, int &mDigits) const override
Definition: RealFormat.cpp:26
const bool mLog
Definition: RealFormat.h:35
static const RealFormat & LinearInstance()
Definition: RealFormat.cpp:14
static const RealFormat & LogInstance()
Definition: RealFormat.cpp:20
~RealFormat() override
RealFormat(bool log)
Definition: RealFormat.h:34
void SetLabelString(wxString &s, double d, double units, double minor, int mDigits, TickType tickType) const override
Definition: RealFormat.cpp:60