CubicSDR/src/visual/ScopeCanvas.h

40 lines
792 B
C
Raw Normal View History

#pragma once
#include "wx/glcanvas.h"
#include "wx/timer.h"
#include <vector>
#include <queue>
#include "ScopeContext.h"
2015-08-01 11:03:00 -04:00
#include "ScopeVisualProcessor.h"
#include "fftw3.h"
class ScopeCanvas: public wxGLCanvas {
public:
std::vector<float> waveform_points;
ScopeCanvas(wxWindow *parent, int *attribList = NULL);
~ScopeCanvas();
void setStereo(bool state);
void setDeviceName(std::string device_name);
2015-04-22 22:54:48 -04:00
void setPPMMode(bool ppmMode);
bool getPPMMode();
2015-08-01 11:03:00 -04:00
ScopeRenderDataQueue *getInputQueue();
private:
void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent &event);
2015-08-01 11:03:00 -04:00
ScopeRenderDataQueue inputData;
ScopeContext *glContext;
std::string deviceName;
bool stereo;
2015-04-22 22:54:48 -04:00
bool ppmMode;
// event table
wxDECLARE_EVENT_TABLE();
};