CubicSDR/src/visual/ColorTheme.h

118 lines
1.9 KiB
C
Raw Normal View History

#pragma once
#include "Gradient.h"
#include <map>
#include <vector>
#include <string>
#define COLOR_THEME_DEFAULT 0
#define COLOR_THEME_BW 1
#define COLOR_THEME_SHARP 2
#define COLOR_THEME_RAD 3
#define COLOR_THEME_TOUCH 4
#define COLOR_THEME_HD 5
#define COLOR_THEME_RADAR 6
#define COLOR_THEME_MAX 7
2015-06-21 10:51:13 -04:00
class RGB {
public:
float r, g, b;
2015-06-21 10:51:13 -04:00
RGB(float r, float g, float b) :
r(r), g(g), b(b) {
}
2015-06-21 10:51:13 -04:00
RGB() :
RGB(0, 0, 0) {
}
2015-06-21 10:51:13 -04:00
~RGB() {
}
2015-06-21 10:51:13 -04:00
RGB & operator=(const RGB &other) {
r = other.r;
g = other.g;
b = other.b;
return *this;
}
};
class ColorTheme {
public:
2015-06-21 10:51:13 -04:00
RGB waterfallHighlight;
RGB waterfallNew;
RGB wfHighlight;
RGB waterfallHover;
RGB waterfallDestroy;
RGB fftLine;
RGB fftHighlight;
RGB scopeLine;
RGB tuningBarLight;
RGB tuningBarDark;
RGB tuningBarUp;
RGB tuningBarDown;
RGB meterLevel;
RGB meterValue;
RGB text;
RGB freqLine;
RGB button;
RGB buttonHighlight;
RGB scopeBackground;
RGB fftBackground;
RGB generalBackground;
2015-01-15 00:59:33 -05:00
Gradient waterfallGradient;
std::string name;
};
class ThemeMgr {
public:
ThemeMgr();
~ThemeMgr();
ColorTheme *currentTheme;
std::map<int, ColorTheme *> themes;
void setTheme(int themeId);
int getTheme();
int themeId;
static ThemeMgr mgr;
};
class DefaultColorTheme: public ColorTheme {
public:
DefaultColorTheme();
};
class BlackAndWhiteColorTheme: public ColorTheme {
public:
BlackAndWhiteColorTheme();
};
class SharpColorTheme: public ColorTheme {
public:
SharpColorTheme();
};
class RadColorTheme: public ColorTheme {
public:
RadColorTheme();
};
class TouchColorTheme: public ColorTheme {
public:
TouchColorTheme();
};
class HDColorTheme: public ColorTheme {
public:
HDColorTheme();
};
class RadarColorTheme: public ColorTheme {
public:
RadarColorTheme();
};