2017-01-02 21:07:43 -05:00
|
|
|
// Copyright (c) Charles J. Cliffe
|
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
|
2014-10-27 21:22:29 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/glcanvas.h"
|
|
|
|
#include "wx/timer.h"
|
|
|
|
|
2014-10-28 22:59:17 -04:00
|
|
|
#include <vector>
|
2014-11-06 01:33:59 -05:00
|
|
|
#include <queue>
|
|
|
|
|
2014-10-30 22:51:33 -04:00
|
|
|
#include "CubicSDRDefs.h"
|
2014-12-08 02:16:06 -05:00
|
|
|
#include "GLFont.h"
|
2014-12-08 21:08:03 -05:00
|
|
|
#include "DemodulatorMgr.h"
|
2015-02-16 20:47:58 -05:00
|
|
|
#include "ColorTheme.h"
|
2014-11-11 08:11:12 -05:00
|
|
|
|
2014-11-04 19:52:11 -05:00
|
|
|
class PrimaryGLContext: public wxGLContext {
|
2014-10-27 21:22:29 -04:00
|
|
|
public:
|
2018-03-10 02:34:39 -05:00
|
|
|
PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs* ctxAttrs);
|
2014-10-27 21:22:29 -04:00
|
|
|
|
2014-11-12 21:55:11 -05:00
|
|
|
static wxString glGetwxString(GLenum name);
|
|
|
|
static void CheckGLError();
|
2014-10-28 22:59:17 -04:00
|
|
|
|
2015-01-15 00:59:33 -05:00
|
|
|
void BeginDraw(float r, float g, float b);
|
2014-12-08 21:08:03 -05:00
|
|
|
void EndDraw();
|
|
|
|
|
2021-04-04 22:20:33 -04:00
|
|
|
void DrawFreqSelector(float uxPos, const RGBA4f& color, float w = 0, long long center_freq = -1, long long srate = 0);
|
|
|
|
void DrawRangeSelector(float uxPos1, float uxPos2, const RGBA4f& color);
|
|
|
|
void DrawDemod(const DemodulatorInstancePtr& demod, const RGBA4f& color, long long center_freq = -1, long long srate = 0);
|
2016-06-11 01:46:07 -04:00
|
|
|
|
2021-04-04 22:20:33 -04:00
|
|
|
void DrawDemodInfo(const DemodulatorInstancePtr& demod, const RGBA4f& color, long long center_freq = -1, long long srate = 0, bool centerline = false);
|
|
|
|
void DrawFreqBwInfo(long long freq, int bw, const RGBA4f& color, long long center_freq = - 1, long long srate = 0, bool stack = false, bool centerline = false);
|
2014-12-08 21:08:03 -05:00
|
|
|
|
2021-04-04 22:20:33 -04:00
|
|
|
void setHoverAlpha(float hoverAlpha_in);
|
2015-03-06 21:11:14 -05:00
|
|
|
|
2014-11-04 19:52:11 -05:00
|
|
|
private:
|
2015-03-06 21:11:14 -05:00
|
|
|
float hoverAlpha;
|
2016-06-14 13:41:19 -04:00
|
|
|
void drawSingleDemodLabel(const std::wstring& demodStr, float uxPos, float hPos, float xOfs, float yOfs, GLFont::Align demodAlign);
|
2014-10-27 21:22:29 -04:00
|
|
|
};
|