2014-11-12 21:55:11 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/glcanvas.h"
|
|
|
|
#include "wx/timer.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <queue>
|
|
|
|
|
|
|
|
#include "ScopeContext.h"
|
|
|
|
|
|
|
|
#include "fftw3.h"
|
2014-11-16 23:20:48 -05:00
|
|
|
#include "Timer.h"
|
2014-11-12 21:55:11 -05:00
|
|
|
|
|
|
|
class ScopeCanvas: public wxGLCanvas {
|
|
|
|
public:
|
2014-11-16 19:14:15 -05:00
|
|
|
std::vector<float> waveform_points;
|
|
|
|
|
2014-11-12 21:55:11 -05:00
|
|
|
ScopeCanvas(wxWindow *parent, int *attribList = NULL);
|
|
|
|
~ScopeCanvas();
|
|
|
|
|
2014-11-15 23:41:41 -05:00
|
|
|
void setWaveformPoints(std::vector<float> &waveform_points_in);
|
2014-11-12 21:55:11 -05:00
|
|
|
private:
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void OnKeyDown(wxKeyEvent& event);
|
|
|
|
|
|
|
|
void OnIdle(wxIdleEvent &event);
|
|
|
|
|
|
|
|
wxWindow *parent;
|
|
|
|
|
2014-11-15 23:41:41 -05:00
|
|
|
ScopeContext *glContext;
|
2014-11-16 23:20:48 -05:00
|
|
|
Timer timer;
|
2014-11-25 22:51:14 -05:00
|
|
|
float frameTimer;
|
2014-11-15 23:41:41 -05:00
|
|
|
// event table
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
2014-11-12 21:55:11 -05:00
|
|
|
};
|
|
|
|
|