CubicSDR/src/visual/ScopeCanvas.h

65 lines
1.5 KiB
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 "ScopePanel.h"
#include "SpectrumPanel.h"
#include "fftw3.h"
#include "InteractiveCanvas.h"
class ScopeCanvas: public InteractiveCanvas {
public:
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();
void setShowDb(bool showDb);
bool getShowDb();
bool scopeVisible();
bool spectrumVisible();
void setHelpTip(std::string tip);
2015-08-01 11:03:00 -04:00
ScopeRenderDataQueue *getInputQueue();
private:
void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent &event);
void OnMouseMoved(wxMouseEvent& event);
void OnMouseWheelMoved(wxMouseEvent& event);
void OnMouseDown(wxMouseEvent& event);
void OnMouseReleased(wxMouseEvent& event);
void OnMouseEnterWindow(wxMouseEvent& event);
void OnMouseLeftWindow(wxMouseEvent& event);
2015-08-01 11:03:00 -04:00
ScopeRenderDataQueue inputData;
ScopePanel scopePanel;
GLPanel parentPanel;
SpectrumPanel spectrumPanel;
GLPanel bgPanel;
ScopeContext *glContext;
std::string deviceName;
bool stereo;
2015-04-22 22:54:48 -04:00
bool ppmMode;
bool showDb;
float panelSpacing;
float ctr;
float ctrTarget;
float dragAccel;
std::string helpTip;
// event table
wxDECLARE_EVENT_TABLE();
};