2015-01-04 19:50:05 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/glcanvas.h"
|
|
|
|
#include "wx/timer.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <queue>
|
|
|
|
|
|
|
|
#include "InteractiveCanvas.h"
|
|
|
|
#include "ModeSelectorContext.h"
|
|
|
|
#include "MouseTracker.h"
|
|
|
|
|
|
|
|
#include "fftw3.h"
|
|
|
|
#include "Timer.h"
|
|
|
|
|
2015-01-06 00:29:33 -05:00
|
|
|
class ModeSelectorMode {
|
|
|
|
public:
|
|
|
|
int value;
|
|
|
|
std::string label;
|
|
|
|
|
|
|
|
ModeSelectorMode(int value, std::string label) : value(value), label(label) {
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-01-04 19:50:05 -05:00
|
|
|
class ModeSelectorCanvas: public InteractiveCanvas {
|
|
|
|
public:
|
|
|
|
ModeSelectorCanvas(wxWindow *parent, int *attribList = NULL);
|
|
|
|
~ModeSelectorCanvas();
|
|
|
|
|
2015-01-06 00:29:33 -05:00
|
|
|
int getHoveredSelection();
|
2015-01-04 19:50:05 -05:00
|
|
|
void setHelpTip(std::string tip);
|
|
|
|
|
2015-01-06 00:29:33 -05:00
|
|
|
void addChoice(int value, std::string label);
|
|
|
|
void setSelection(int value);
|
|
|
|
int getSelection();
|
|
|
|
|
2015-01-04 19:50:05 -05:00
|
|
|
private:
|
2015-01-06 00:29:33 -05:00
|
|
|
void setNumChoices(int numChoices_in);
|
|
|
|
|
2015-01-04 19:50:05 -05:00
|
|
|
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);
|
|
|
|
|
|
|
|
ModeSelectorContext *glContext;
|
|
|
|
|
|
|
|
std::string helpTip;
|
2015-01-06 00:29:33 -05:00
|
|
|
int numChoices;
|
|
|
|
int currentSelection;
|
|
|
|
std::vector<ModeSelectorMode> selections;
|
2015-01-04 19:50:05 -05:00
|
|
|
//
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
|
|
|
};
|
|
|
|
|