CubicSDR/src/visual/MeterCanvas.h

56 lines
1.1 KiB
C
Raw Normal View History

2014-12-31 21:43:05 -05:00
#pragma once
#include "wx/glcanvas.h"
#include "wx/timer.h"
#include <vector>
#include <queue>
#include "InteractiveCanvas.h"
2014-12-31 21:43:05 -05:00
#include "MeterContext.h"
#include "MouseTracker.h"
#include "fftw3.h"
#include "Timer.h"
class MeterCanvas: public InteractiveCanvas {
2014-12-31 21:43:05 -05:00
public:
MeterCanvas(wxWindow *parent, int *attribList = NULL);
~MeterCanvas();
void setLevel(float level_in);
float getLevel();
void setMax(float max_in);
bool setInputValue(float slider_in);
bool inputChanged();
float getInputValue();
void setHelpTip(std::string tip);
2014-12-31 21:43:05 -05:00
private:
void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent &event);
void OnMouseMoved(wxMouseEvent& event);
void OnMouseDown(wxMouseEvent& event);
void OnMouseWheelMoved(wxMouseEvent& event);
void OnMouseReleased(wxMouseEvent& event);
void OnMouseEnterWindow(wxMouseEvent& event);
void OnMouseLeftWindow(wxMouseEvent& event);
2014-12-31 21:43:05 -05:00
MeterContext *glContext;
float level;
float level_max;
float inputValue;
float userInputValue;
std::string helpTip;
//
2014-12-31 21:43:05 -05:00
wxDECLARE_EVENT_TABLE();
};