Audacity 3.2.0
TrackArtist.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 TrackArtist.h
6
7 Dominic Mazzoni
8
9 This singleton class handles the actual rendering of WaveTracks
10 (both waveforms and spectra), NoteTracks, and LabelTracks.
11
12 It's actually a little harder than it looks, because for
13 waveforms at least it needs to cache the samples that are
14 currently on-screen.
15
16**********************************************************************/
17
18#ifndef __AUDACITY_TRACKARTIST__
19#define __AUDACITY_TRACKARTIST__
20
21
22
23
24#include <wx/brush.h> // member variable
25#include <wx/pen.h> // member variables
26
27#include "Prefs.h"
28
29class wxRect;
30
31class PendingTracks;
32class TrackList;
33class TrackPanel;
34class SelectedRegion;
35class Track;
36class TrackPanel;
38class ZoomInfo;
39
40class AUDACITY_DLL_API TrackArtist final : private PrefsListener {
41
42public:
43
44 enum : unsigned {
53
54 NPasses
55 };
56
57 TrackArtist( TrackPanel *parent_ );
60
61 void SetBackgroundBrushes(wxBrush unselectedBrushIn, wxBrush selectedBrushIn,
62 wxPen unselectedPenIn, wxPen selectedPenIn) {
63 this->unselectedBrush = unselectedBrushIn;
64 this->selectedBrush = selectedBrushIn;
65 this->unselectedPen = unselectedPenIn;
66 this->selectedPen = selectedPenIn;
67 }
68
69 void SetColours(int iColorIndex);
70
71 void UpdatePrefs() override;
72 void UpdateSelectedPrefs( int id ) override;
73
75
76 // Preference values
77 float mdBrange; // "/GUI/EnvdBRange"
78 bool mShowClipping; // "/GUI/ShowClipping"
80 bool mbShowTrackNameInTrack; // "/GUI/ShowTrackNameInWaveform"
81
82 wxBrush blankBrush;
85 wxBrush sampleBrush;
87 wxBrush dragsampleBrush;// for samples which are draggable.
90 wxPen blankPen;
93 wxPen samplePen;
94 wxPen rmsPen;
104
111
112#ifdef EXPERIMENTAL_FFT_Y_GRID
113 bool fftYGridOld;
114#endif //EXPERIMENTAL_FFT_Y_GRID
115
116#ifdef EXPERIMENTAL_FIND_NOTES
117 bool fftFindNotesOld;
118 int findNotesMinAOld;
119 int findNotesNOld;
120 bool findNotesQuantizeOld;
121#endif
122
123 const SelectedRegion *pSelectedRegion{};
124 ZoomInfo *pZoomInfo{};
125 const PendingTracks *pPendingTracks{};
126
127 bool drawEnvelope{ false };
128 bool bigPoints{ false };
129 bool drawSliders{ false };
130 bool onBrushTool{ false };
131 bool hasSolo{ false };
132};
133
134#endif // define __AUDACITY_TRACKARTIST__
A listener notified of changes in preferences.
Definition: Prefs.h:652
virtual void UpdateSelectedPrefs(int id)
Definition: Prefs.cpp:158
virtual void UpdatePrefs()=0
Definition: Prefs.cpp:154
Defines a selected portion of a project.
This class handles the actual rendering of WaveTracks (both waveforms and spectra),...
Definition: TrackArtist.h:40
wxBrush beatWeakSelBrush
Definition: TrackArtist.h:110
void SetBackgroundBrushes(wxBrush unselectedBrushIn, wxBrush selectedBrushIn, wxPen unselectedPenIn, wxPen selectedPenIn)
Definition: TrackArtist.h:61
wxBrush blankBrush
Definition: TrackArtist.h:82
wxPen odProgressDonePen
Definition: TrackArtist.h:99
wxPen rmsPen
Definition: TrackArtist.h:94
wxPen unselectedPen
Definition: TrackArtist.h:91
float mdBrange
Definition: TrackArtist.h:77
wxPen muteSamplePen
Definition: TrackArtist.h:97
wxBrush sampleBrush
Definition: TrackArtist.h:85
bool mbShowTrackNameInTrack
Definition: TrackArtist.h:80
wxBrush beatWeakBrush
Definition: TrackArtist.h:108
wxPen muteClippedPen
Definition: TrackArtist.h:102
wxBrush selectedBrush
Definition: TrackArtist.h:84
wxBrush beatStrongSelBrush
Definition: TrackArtist.h:109
wxBrush muteSampleBrush
Definition: TrackArtist.h:88
wxPen selectedPen
Definition: TrackArtist.h:92
wxBrush beatStrongBrush
Definition: TrackArtist.h:107
wxPen samplePen
Definition: TrackArtist.h:93
wxPen barSepearatorPen
Definition: TrackArtist.h:106
wxPen odProgressNotYetPen
Definition: TrackArtist.h:98
wxPen clippedPen
Definition: TrackArtist.h:101
wxBrush selsampleBrush
Definition: TrackArtist.h:86
wxPen shadowPen
Definition: TrackArtist.h:100
wxPen blankPen
Definition: TrackArtist.h:90
wxPen muteRmsPen
Definition: TrackArtist.h:95
TrackPanel * parent
Definition: TrackArtist.h:74
bool mShowClipping
Definition: TrackArtist.h:78
int mSampleDisplay
Definition: TrackArtist.h:79
wxBrush dragsampleBrush
Definition: TrackArtist.h:87
wxPen selsamplePen
Definition: TrackArtist.h:96
wxBrush unselectedBrush
Definition: TrackArtist.h:83
wxBrush blankSelectedBrush
Definition: TrackArtist.h:89
wxPen beatSepearatorPen
Definition: TrackArtist.h:105
wxPen blankSelectedPen
Definition: TrackArtist.h:103
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:110
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:850
The TrackPanel class coordinates updates and operations on the main part of the screen which contains...
Definition: TrackPanel.h:63
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:201