2015-01-04 17:11:20 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "PrimaryGLContext.h"
|
|
|
|
#include "Gradient.h"
|
|
|
|
|
|
|
|
#define NUM_WATERFALL_LINES 512
|
|
|
|
|
|
|
|
class TuningCanvas;
|
|
|
|
|
|
|
|
class TuningContext: public PrimaryGLContext {
|
|
|
|
public:
|
|
|
|
TuningContext(TuningCanvas *canvas, wxGLContext *sharedContext);
|
|
|
|
|
|
|
|
void DrawBegin();
|
2015-01-07 20:23:15 -05:00
|
|
|
void Draw(float r, float g, float b, float a, float p1, float p2);
|
2015-03-24 20:33:07 -04:00
|
|
|
void DrawTuner(long long freq, int count, float displayPos, float displayWidth);
|
2015-07-31 18:21:30 -04:00
|
|
|
void DrawTunerDigitBox(int index, int count, float displayPos, float displayWidth, RGB3f c);
|
2015-03-25 21:35:42 -04:00
|
|
|
int GetTunerDigitIndex(float mPos, int count, float displayPos, float displayWidth);
|
2015-07-31 18:21:30 -04:00
|
|
|
void DrawTunerBarIndexed(int start, int end, int count, float displayPos, float displayWidth, RGB3f color, float alpha, bool top, bool bottom);
|
2015-03-25 21:35:42 -04:00
|
|
|
|
2015-01-04 17:11:20 -05:00
|
|
|
void DrawDemodFreqBw(long long freq, unsigned int bw, long long center);
|
|
|
|
void DrawEnd();
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::locale comma_locale;
|
|
|
|
std::stringstream freqStr;
|
2015-03-24 20:33:07 -04:00
|
|
|
std::stringstream freqStrFormatted;
|
2015-01-04 17:11:20 -05:00
|
|
|
};
|