Audacity  3.0.3
WaveTrackViewConstants.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 WaveTrackViewConstants.h
6 
7 Paul Licameli split from class WaveTrack
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_WAVE_TRACK_VIEW_CONSTANTS__
12 #define __AUDACITY_WAVE_TRACK_VIEW_CONSTANTS__
13 
14 #include "ComponentInterfaceSymbol.h" // for EnumValueSymbol
15 
16 namespace WaveTrackViewConstants
17 {
18  enum Display : int {
19 
20  MultiView = -1,
21 
22  // DO NOT REORDER OLD VALUES! Replace obsoletes with placeholders.
23 
24  Waveform = 0,
26 
28 
30 
31  obsolete1, // was SpectrumLogDisplay
32  obsolete2, // was SpectralSelectionDisplay
33  obsolete3, // was SpectralSelectionLogDisplay
34  obsolete4, // was PitchDisplay
35 
36  // Add values here, and update MaxDisplay.
37 
39 
40  NoDisplay, // Preview track has no display
41  };
42 
43  // Only two types of sample display for now, but
44  // others (eg sinc interpolation) may be added later.
47  StemPlot
48  };
49 
50  // Various preset zooming levels.
51  enum ZoomPresets {
67  };
68 
69  enum ZoomActions {
70  // Note that these can be with or without spectrum view which
71  // adds a constant.
72  kZoom1to1 = 1,
80  };
81 
82  // Handle remapping of enum values from 2.1.0 and earlier
83  Display ConvertLegacyDisplayValue(int oldValue);
84 
86  extern AUDACITY_DLL_API const EnumValueSymbol MultiViewSymbol;
87 }
88 
89 #include <vector>
90 
91 struct AUDACITY_DLL_API WaveTrackSubViewType {
93 
94  // Identifies the type session-wide, and determines relative position in
95  // menus listing all types
97  // The translation is suitable for the track control panel drop-down,
98  // and it may contain a menu accelerator
100 
101  bool operator < ( const WaveTrackSubViewType &other ) const
102  { return id < other.id; }
103 
104  bool operator == ( const WaveTrackSubViewType &other ) const
105  { return id == other.id; }
106 
107  // Typically a file scope statically constructed object
108  struct AUDACITY_DLL_API RegisteredType {
110  };
111 
113  static const std::vector<WaveTrackSubViewType> &All();
114 
116  static Display Default();
117 };
118 
119 #endif
WaveTrackViewConstants::kZoomToSelection
@ kZoomToSelection
Definition: WaveTrackViewConstants.h:53
WaveTrackViewConstants::NoDisplay
@ NoDisplay
Definition: WaveTrackViewConstants.h:40
WaveTrackViewConstants::kZoomTimes2
@ kZoomTimes2
Definition: WaveTrackViewConstants.h:73
WaveTrackSubViewType::id
Display id
Definition: WaveTrackViewConstants.h:96
WaveTrackViewConstants::obsoleteWaveformDBDisplay
@ obsoleteWaveformDBDisplay
Definition: WaveTrackViewConstants.h:27
WaveTrackViewConstants
Definition: WaveTrackView.h:17
WaveTrackViewConstants::kZoomSeconds
@ kZoomSeconds
Definition: WaveTrackViewConstants.h:56
WaveTrackViewConstants::kZoomDefault
@ kZoomDefault
Definition: WaveTrackViewConstants.h:54
WaveTrackViewConstants::obsolete3
@ obsolete3
Definition: WaveTrackViewConstants.h:33
WaveTrackViewConstants::kZoom1to1
@ kZoom1to1
Definition: WaveTrackViewConstants.h:72
WaveTrackViewConstants::ZoomActions
ZoomActions
Definition: WaveTrackViewConstants.h:69
ComponentInterfaceSymbol.h
WaveTrackViewConstants::ConvertLegacyDisplayValue
Display ConvertLegacyDisplayValue(int oldValue)
Definition: WaveTrackViewConstants.cpp:16
WaveTrackViewConstants::MinDisplay
@ MinDisplay
Definition: WaveTrackViewConstants.h:25
WaveTrackViewConstants::Display
Display
Definition: WaveTrackViewConstants.h:18
WaveTrackViewConstants::MaxDisplay
@ MaxDisplay
Definition: WaveTrackViewConstants.h:38
WaveTrackViewConstants::kZoomDiv2
@ kZoomDiv2
Definition: WaveTrackViewConstants.h:74
WaveTrackViewConstants::obsolete4
@ obsolete4
Definition: WaveTrackViewConstants.h:34
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
operator==
bool operator==(const Tags &lhs, const Tags &rhs)
Definition: Tags.cpp:361
TrackKind::All
@ All
the root class
WaveTrackViewConstants::kZoom500ths
@ kZoom500ths
Definition: WaveTrackViewConstants.h:62
WaveTrackSubViewType
Definition: WaveTrackViewConstants.h:91
WaveTrackViewConstants::kZoom5ths
@ kZoom5ths
Definition: WaveTrackViewConstants.h:57
WaveTrackViewConstants::MultiViewSymbol
AUDACITY_DLL_API const EnumValueSymbol MultiViewSymbol
String identifier for a preference for one of each type of view.
Definition: WaveTrackViewConstants.cpp:105
WaveTrackViewConstants::kZoomSamples
@ kZoomSamples
Definition: WaveTrackViewConstants.h:64
WaveTrackViewConstants::kZoom100ths
@ kZoom100ths
Definition: WaveTrackViewConstants.h:61
WaveTrackViewConstants::kZoomMinutes
@ kZoomMinutes
Definition: WaveTrackViewConstants.h:55
WaveTrackViewConstants::kZoomIn
@ kZoomIn
Definition: WaveTrackViewConstants.h:77
WaveTrackViewConstants::kZoomMilliSeconds
@ kZoomMilliSeconds
Definition: WaveTrackViewConstants.h:63
WaveTrackViewConstants::kZoom10ths
@ kZoom10ths
Definition: WaveTrackViewConstants.h:58
WaveTrackViewConstants::kZoomInByDrag
@ kZoomInByDrag
Definition: WaveTrackViewConstants.h:76
WaveTrackViewConstants::kZoomReset
@ kZoomReset
Definition: WaveTrackViewConstants.h:79
WaveTrackViewConstants::SampleDisplay
SampleDisplay
Definition: WaveTrackViewConstants.h:45
WaveTrackViewConstants::kZoom20ths
@ kZoom20ths
Definition: WaveTrackViewConstants.h:59
WaveTrackSubViewType::RegisteredType
Definition: WaveTrackViewConstants.h:108
WaveTrackSubViewType::name
EnumValueSymbol name
Definition: WaveTrackViewConstants.h:99
WaveTrackViewConstants::StemPlot
@ StemPlot
Definition: WaveTrackViewConstants.h:47
WaveTrackViewConstants::kMaxZoom
@ kMaxZoom
Definition: WaveTrackViewConstants.h:66
WaveTrackViewConstants::LinearInterpolate
@ LinearInterpolate
Definition: WaveTrackViewConstants.h:46
WaveTrackViewConstants::ZoomPresets
ZoomPresets
Definition: WaveTrackViewConstants.h:51
WaveTrackViewConstants::kZoomOut
@ kZoomOut
Definition: WaveTrackViewConstants.h:78
WaveTrackViewConstants::Spectrum
@ Spectrum
Definition: WaveTrackViewConstants.h:29
WaveTrackViewConstants::kZoom50ths
@ kZoom50ths
Definition: WaveTrackViewConstants.h:60
WaveTrackViewConstants::obsolete2
@ obsolete2
Definition: WaveTrackViewConstants.h:32
WaveTrackViewConstants::obsolete1
@ obsolete1
Definition: WaveTrackViewConstants.h:31
WaveTrackViewConstants::kZoom4To1
@ kZoom4To1
Definition: WaveTrackViewConstants.h:65
WaveTrackViewConstants::kZoomHalfWave
@ kZoomHalfWave
Definition: WaveTrackViewConstants.h:75
WaveTrackViewConstants::MultiView
@ MultiView
"Multi" is special, not really a view type on par with the others.
Definition: WaveTrackViewConstants.h:20
WaveTrackViewConstants::Waveform
@ Waveform
Definition: WaveTrackViewConstants.h:24
operator<
bool operator<(SnapPoint s1, SnapPoint s2)
Definition: Snap.cpp:23
WaveTrackViewConstants::kZoomToFit
@ kZoomToFit
Definition: WaveTrackViewConstants.h:52