Audacity
3.2.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
h
i
k
l
m
o
p
r
s
t
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
Related Functions
a
b
c
d
e
f
g
l
m
n
o
p
r
s
t
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
c
d
e
f
k
l
m
n
o
p
r
s
t
u
v
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
src
widgets
IntFormat.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity: A Digital Audio Editor
4
5
IntFormat.cpp
6
7
Dominic Mazzoni
8
Michael Papadopoulos split from Ruler.h
9
10
**********************************************************************/
11
12
#include "
IntFormat.h
"
13
14
const
IntFormat
&
::IntFormat::Instance
()
15
{
16
static
IntFormat
instance;
17
return
instance;
18
}
19
20
void
IntFormat::SetTickSizes
(
21
double
units,
double
& major,
double
& minor,
double
& minorMinor,
22
int
& mDigits
23
)
const
24
{
25
double
d;
26
d = 1.0;
27
for
(;;) {
28
if
(units < d) {
29
minor = d;
30
major = d * 5.0;
31
return
;
32
}
33
d *= 5.0;
34
if
(units < d) {
35
minor = d;
36
major = d * 2.0;
37
return
;
38
}
39
d *= 2.0;
40
}
41
}
42
43
void
IntFormat::SetLabelString
(
44
wxString& s,
double
d,
double
,
double
minor,
int
mDigits,
TickType
tickType
45
)
const
46
{
47
// Replace -0 with 0
48
if
(d < 0.0 && (d + minor > 0.0))
49
d = 0.0;
50
s.Printf(
wxT
(
"%d"
), (
int
)floor(d + 0.5));
51
}
52
53
IntFormat::~IntFormat
() =
default
;
wxT
wxT("CloseDown"))
IntFormat.h
IntFormat
Definition:
IntFormat.h:17
IntFormat::~IntFormat
~IntFormat() override
IntFormat::Instance
static const IntFormat & Instance()
Definition:
IntFormat.cpp:14
IntFormat::SetTickSizes
void SetTickSizes(double units, double &major, double &minor, double &minorMinor, int &mDigits) const override
Definition:
IntFormat.cpp:20
IntFormat::SetLabelString
void SetLabelString(wxString &s, double d, double units, double minor, int mDigits, TickType tickType) const override
Definition:
IntFormat.cpp:43
RulerFormat::TickType
TickType
Definition:
RulerFormat.h:19
Generated by
1.9.3