1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
/**********************************************************************
Audacity: A Digital Audio Editor
AColor.h
Dominic Mazzoni
Manages color brushes and pens and provides utility
drawing functions
**********************************************************************/
#ifndef __AUDACITY_COLOR__
#define __AUDACITY_COLOR__
#include <wx/brush.h>
#include <wx/pen.h>
class wxDC;
class wxRect;
class AColor {
public:
static void Init();
static void Bevel(wxDC & dc, bool up, wxRect & r);
static void Light(wxDC * dc, bool selected);
static void Medium(wxDC * dc, bool selected);
static void Dark(wxDC * dc, bool selected);
static void Mute(wxDC * dc, bool on, bool selected);
static void Solo(wxDC * dc, bool on, bool selected);
static void MIDIChannel(wxDC * dc, int channel /* 1 - 16 */ );
static void LightMIDIChannel(wxDC * dc, int channel /* 1 - 16 */ );
static void DarkMIDIChannel(wxDC * dc, int channel /* 1 - 16 */ );
static wxBrush lightBrush[2];
static wxBrush mediumBrush[2];
static wxBrush darkBrush[2];
static wxPen lightPen[2];
static wxPen mediumPen[2];
static wxPen darkPen[2];
static wxBrush muteBrush;
static wxBrush soloBrush;
static wxPen envelopePen;
static wxBrush envelopeBrush;
private:
static bool inited;
};
void GetColorGradient(float value,
bool selected,
bool grayscale,
unsigned char *red,
unsigned char *green, unsigned char *blue);
#endif
|