14#ifndef __AUDACITY_COLOR__
15#define __AUDACITY_COLOR__
22class wxGraphicsContext;
29 ColorGradientUnselected = 0,
40 static void Arrow(wxDC & dc, wxCoord x, wxCoord y,
int width,
bool down =
true);
44 static void Line(wxDC & dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
45 static void Line(wxDC & dc,
const wxPoint &from,
const wxPoint &to);
48 static void Lines(wxDC &dc,
size_t nPoints,
const wxPoint points[]);
50 static void DrawFocus(wxDC & dc, wxRect & r);
51 static void Bevel(wxDC & dc,
bool up,
const wxRect & r);
53 (wxDC & dc,
bool up,
const wxRect & r,
bool bSel=
false,
bool bHighlight =
false);
57 static void DrawHStretch(wxDC& dc,
const wxRect& rect, wxBitmap& bitmap);
58 static void DrawFrame(wxDC& dc,
const wxRect& r, wxBitmap& bitmap,
int mid);
62 static void ButtonStretch(wxDC& dc,
bool up,
const wxRect& r,
bool selected =
false,
bool highlight =
false);
63 static void BevelTrackInfo(wxDC & dc,
bool up,
const wxRect & r,
bool highlight =
false);
64 static wxColour Blend(
const wxColour & c1,
const wxColour & c2);
66 static void UseThemeColour( wxDC * dc,
int iBrush,
int iPen=-1,
int alpha = 255 );
67 static void UseThemeColour( wxGraphicsContext * gc,
int iBrush,
int iPen=-1,
int alpha = 255 );
68 static void TrackPanelBackground(wxDC * dc,
bool selected);
70 static void Light(wxDC * dc,
bool selected,
bool highlight =
false);
71 static void Medium(wxDC * dc,
bool selected);
72 static void MediumTrackInfo(wxDC * dc,
bool selected);
73 static void Dark(wxDC * dc,
bool selected,
bool highlight =
false);
75 static void CursorColor(wxDC * dc);
76 static void IndicatorColor(wxDC * dc,
bool bIsNotRecording);
78 static void Mute(wxDC * dc,
bool on,
bool selected,
bool soloing);
79 static void Solo(wxDC * dc,
bool on,
bool selected);
85 static void MIDIChannel(wxDC * dc,
int channel );
86 static void LightMIDIChannel(wxDC * dc,
int channel );
87 static void DarkMIDIChannel(wxDC * dc,
int channel );
89 static void TrackFocusPen(wxDC * dc,
int level );
90 static void SnapGuidePen(wxDC * dc);
92 static void PreComputeGradient();
94 static void ApplyUpdatedImages();
98 static wxBrush lightBrush[2];
99 static wxBrush mediumBrush[2];
100 static wxBrush darkBrush[2];
101 static wxPen lightPen[2];
102 static wxPen mediumPen[2];
103 static wxPen darkPen[2];
106 static wxPen indicatorPen[2];
107 static wxBrush indicatorBrush[2];
109 static wxBrush playRegionBrush[1];
111 static wxBrush muteBrush[2];
128 static wxPen trackFocusPens[3];
135 static const int colorSchemes = 4;
136 static const int gradientSteps = 256;
137 static unsigned char gradient_pre[ColorGradientTotal][colorSchemes][gradientSteps][3];
153 unsigned char * __restrict red,
154 unsigned char * __restrict green,
155 unsigned char * __restrict blue) {
void GetColorGradient(float value, AColor::ColorGradientChoice selected, int colorScheme, unsigned char *__restrict red, unsigned char *__restrict green, unsigned char *__restrict blue)
AColor Manages color brushes and pens.
static wxBrush labelSelectedBrush
static wxPen WideEnvelopePen
@ ColorGradientTimeAndFrequencySelected
@ ColorGradientTimeSelected
static wxPen labelSurroundPen
static wxBrush envelopeBrush
static wxBrush labelTextNormalBrush
static wxBrush labelTextEditBrush
static const int gradientSteps
static wxBrush labelSyncLockSelBrush
static unsigned char gradient_pre[ColorGradientTotal][colorSchemes][gradientSteps][3]
static wxBrush tooltipBrush
static wxBrush labelUnselectedBrush
static wxPen snapGuidePen
static wxBrush spareBrush
static bool gradient_inited
static wxPen labelSyncLockSelPen