2014-12-31 21:43:05 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/glcanvas.h"
|
|
|
|
#include "wx/timer.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <queue>
|
|
|
|
|
2015-01-04 13:20:31 -05:00
|
|
|
#include "InteractiveCanvas.h"
|
2014-12-31 21:43:05 -05:00
|
|
|
#include "MeterContext.h"
|
|
|
|
#include "MouseTracker.h"
|
|
|
|
|
|
|
|
#include "fftw3.h"
|
|
|
|
#include "Timer.h"
|
|
|
|
|
2015-01-04 13:20:31 -05:00
|
|
|
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();
|
|
|
|
|
2015-01-04 13:20:31 -05:00
|
|
|
void setHelpTip(std::string tip);
|
|
|
|
|
2014-12-31 21:43:05 -05:00
|
|
|
private:
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void OnIdle(wxIdleEvent &event);
|
|
|
|
|
2015-01-03 17:07:39 -05:00
|
|
|
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;
|
|
|
|
|
2015-01-04 13:20:31 -05:00
|
|
|
std::string helpTip;
|
|
|
|
//
|
2014-12-31 21:43:05 -05:00
|
|
|
wxDECLARE_EVENT_TABLE();
|
|
|
|
};
|
|
|
|
|