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 TrackList;
32class TrackPanel;
33class SelectedRegion;
34class Track;
35class TrackPanel;
37class ZoomInfo;
38
39class AUDACITY_DLL_API TrackArtist final : private PrefsListener {
40
41public:
42
43 enum : unsigned {
52
53 NPasses
54 };
55
56 TrackArtist( TrackPanel *parent_ );
59
60 void SetBackgroundBrushes(wxBrush unselectedBrushIn, wxBrush selectedBrushIn,
61 wxPen unselectedPenIn, wxPen selectedPenIn) {
62 this->unselectedBrush = unselectedBrushIn;
63 this->selectedBrush = selectedBrushIn;
64 this->unselectedPen = unselectedPenIn;
65 this->selectedPen = selectedPenIn;
66 }
67
68 void SetColours(int iColorIndex);
69
70 void UpdatePrefs() override;
71 void UpdateSelectedPrefs( int id ) override;
72
74
75 // Preference values
76 float mdBrange; // "/GUI/EnvdBRange"
77 bool mShowClipping; // "/GUI/ShowClipping"
79 bool mbShowTrackNameInTrack; // "/GUI/ShowTrackNameInWaveform"
80
81 wxBrush blankBrush;
84 wxBrush sampleBrush;
86 wxBrush dragsampleBrush;// for samples which are draggable.
89 wxPen blankPen;
92 wxPen samplePen;
93 wxPen rmsPen;
99 wxPen shadowPen;
103
104#ifdef EXPERIMENTAL_FFT_Y_GRID
105 bool fftYGridOld;
106#endif //EXPERIMENTAL_FFT_Y_GRID
107
108#ifdef EXPERIMENTAL_FIND_NOTES
109 bool fftFindNotesOld;
110 int findNotesMinAOld;
111 int findNotesNOld;
112 bool findNotesQuantizeOld;
113#endif
114
115 const SelectedRegion *pSelectedRegion{};
116 ZoomInfo *pZoomInfo{};
117
118 bool drawEnvelope{ false };
119 bool bigPoints{ false };
120 bool drawSliders{ false };
121 bool onBrushTool{ false };
122 bool hasSolo{ false };
123};
124
125#endif // define __AUDACITY_TRACKARTIST__
A listener notified of changes in preferences.
Definition: Prefs.h:543
virtual void UpdateSelectedPrefs(int id)
Definition: Prefs.cpp:128
virtual void UpdatePrefs()=0
Definition: Prefs.cpp:124
Defines a selected portion of a project.
This class handles the actual rendering of WaveTracks (both waveforms and spectra),...
Definition: TrackArtist.h:39
void SetBackgroundBrushes(wxBrush unselectedBrushIn, wxBrush selectedBrushIn, wxPen unselectedPenIn, wxPen selectedPenIn)
Definition: TrackArtist.h:60
wxBrush blankBrush
Definition: TrackArtist.h:81
wxPen odProgressDonePen
Definition: TrackArtist.h:98
wxPen rmsPen
Definition: TrackArtist.h:93
wxPen unselectedPen
Definition: TrackArtist.h:90
float mdBrange
Definition: TrackArtist.h:76
wxPen muteSamplePen
Definition: TrackArtist.h:96
wxBrush sampleBrush
Definition: TrackArtist.h:84
bool mbShowTrackNameInTrack
Definition: TrackArtist.h:79
wxPen muteClippedPen
Definition: TrackArtist.h:101
wxBrush selectedBrush
Definition: TrackArtist.h:83
wxBrush muteSampleBrush
Definition: TrackArtist.h:87
wxPen selectedPen
Definition: TrackArtist.h:91
wxPen samplePen
Definition: TrackArtist.h:92
wxPen odProgressNotYetPen
Definition: TrackArtist.h:97
wxPen clippedPen
Definition: TrackArtist.h:100
wxBrush selsampleBrush
Definition: TrackArtist.h:85
wxPen shadowPen
Definition: TrackArtist.h:99
wxPen blankPen
Definition: TrackArtist.h:89
wxPen muteRmsPen
Definition: TrackArtist.h:94
TrackPanel * parent
Definition: TrackArtist.h:73
bool mShowClipping
Definition: TrackArtist.h:77
int mSampleDisplay
Definition: TrackArtist.h:78
wxBrush dragsampleBrush
Definition: TrackArtist.h:86
wxPen selsamplePen
Definition: TrackArtist.h:95
wxBrush unselectedBrush
Definition: TrackArtist.h:82
wxBrush blankSelectedBrush
Definition: TrackArtist.h:88
wxPen blankSelectedPen
Definition: TrackArtist.h:102
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:225
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:1338
The TrackPanel class coordinates updates and operations on the main part of the screen which contains...
Definition: TrackPanel.h:65
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:194