mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 13:48:38 -05:00
prototype drag range demod create/select tool
This commit is contained in:
parent
f04ec72394
commit
5db4dcdbac
@ -2,11 +2,14 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "CubicSDR.h"
|
#include "CubicSDR.h"
|
||||||
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
DemodulatorInstance::DemodulatorInstance() :
|
DemodulatorInstance::DemodulatorInstance() :
|
||||||
t_Demod(NULL), t_Audio(NULL), threadQueueDemod(NULL), demodulatorThread(NULL), terminated(false), audioTerminated(false), demodTerminated(
|
t_Demod(NULL), t_Audio(NULL), threadQueueDemod(NULL), demodulatorThread(NULL), terminated(false), audioTerminated(false), demodTerminated(
|
||||||
false) {
|
false) {
|
||||||
|
|
||||||
|
label = new std::string("Unnamed");
|
||||||
threadQueueDemod = new DemodulatorThreadInputQueue;
|
threadQueueDemod = new DemodulatorThreadInputQueue;
|
||||||
threadQueueCommand = new DemodulatorThreadCommandQueue;
|
threadQueueCommand = new DemodulatorThreadCommandQueue;
|
||||||
threadQueueNotify = new DemodulatorThreadCommandQueue;
|
threadQueueNotify = new DemodulatorThreadCommandQueue;
|
||||||
@ -23,10 +26,6 @@ DemodulatorInstance::~DemodulatorInstance() {
|
|||||||
|
|
||||||
delete audioInputQueue;
|
delete audioInputQueue;
|
||||||
delete threadQueueDemod;
|
delete threadQueueDemod;
|
||||||
#ifndef __APPLE__
|
|
||||||
// delete t_Demod;
|
|
||||||
#endif
|
|
||||||
// delete t_Audio;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DemodulatorInstance::setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue) {
|
void DemodulatorInstance::setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue) {
|
||||||
@ -53,6 +52,13 @@ void DemodulatorInstance::run() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DemodulatorInstance::updateLabel(int freq) {
|
||||||
|
std::stringstream newLabel;
|
||||||
|
newLabel.precision(3);
|
||||||
|
newLabel << std::fixed << ((float) freq / 1000000.0);
|
||||||
|
setLabel(newLabel.str());
|
||||||
|
}
|
||||||
|
|
||||||
DemodulatorThreadCommandQueue *DemodulatorInstance::getCommandQueue() {
|
DemodulatorThreadCommandQueue *DemodulatorInstance::getCommandQueue() {
|
||||||
return threadQueueCommand;
|
return threadQueueCommand;
|
||||||
}
|
}
|
||||||
@ -73,11 +79,16 @@ void DemodulatorInstance::terminate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string DemodulatorInstance::getLabel() {
|
std::string DemodulatorInstance::getLabel() {
|
||||||
return label;
|
return *(label.load());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DemodulatorInstance::setLabel(std::string labelStr) {
|
void DemodulatorInstance::setLabel(std::string labelStr) {
|
||||||
label = labelStr;
|
std::string *newLabel = new std::string;
|
||||||
|
newLabel->append(labelStr);
|
||||||
|
std::string *oldLabel;
|
||||||
|
oldLabel = label;
|
||||||
|
label = newLabel;
|
||||||
|
delete oldLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
DemodulatorMgr::DemodulatorMgr() :
|
DemodulatorMgr::DemodulatorMgr() :
|
||||||
|
@ -37,9 +37,10 @@ public:
|
|||||||
void setLabel(std::string labelStr);
|
void setLabel(std::string labelStr);
|
||||||
|
|
||||||
bool isTerminated();
|
bool isTerminated();
|
||||||
|
void updateLabel(int freq);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string label;
|
std::atomic<std::string *> label;
|
||||||
bool terminated;
|
bool terminated;
|
||||||
bool demodTerminated;
|
bool demodTerminated;
|
||||||
bool audioTerminated;
|
bool audioTerminated;
|
||||||
|
@ -81,6 +81,9 @@ void SDRPostThread::threadMain() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (demodulators.size()) {
|
if (demodulators.size()) {
|
||||||
|
DemodulatorThreadIQData dummyDataOut;
|
||||||
|
dummyDataOut.frequency = data_in.frequency;
|
||||||
|
dummyDataOut.bandwidth = data_in.bandwidth;
|
||||||
DemodulatorThreadIQData demodDataOut;
|
DemodulatorThreadIQData demodDataOut;
|
||||||
demodDataOut.frequency = data_in.frequency;
|
demodDataOut.frequency = data_in.frequency;
|
||||||
demodDataOut.bandwidth = data_in.bandwidth;
|
demodDataOut.bandwidth = data_in.bandwidth;
|
||||||
@ -89,6 +92,14 @@ void SDRPostThread::threadMain() {
|
|||||||
for (int i = 0, iMax = demodulators.size(); i < iMax; i++) {
|
for (int i = 0, iMax = demodulators.size(); i < iMax; i++) {
|
||||||
DemodulatorInstance *demod = demodulators[i];
|
DemodulatorInstance *demod = demodulators[i];
|
||||||
DemodulatorThreadInputQueue *demodQueue = demod->threadQueueDemod;
|
DemodulatorThreadInputQueue *demodQueue = demod->threadQueueDemod;
|
||||||
|
|
||||||
|
if (demod->getParams().frequency != data_in.frequency) {
|
||||||
|
if (abs(data_in.frequency - demod->getParams().frequency) > (int) ((float) ((float) SRATE / 2.0) * 1.15)) {
|
||||||
|
demodQueue->push(dummyDataOut);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
demodQueue->push(demodDataOut);
|
demodQueue->push(demodDataOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@ void PrimaryGLContext::DrawDemod(DemodulatorInstance *demod, float r, float g, f
|
|||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrimaryGLContext::DrawFreqSelector(float uxPos, float r, float g, float b) {
|
void PrimaryGLContext::DrawFreqSelector(float uxPos, float r, float g, float b, float w) {
|
||||||
DemodulatorInstance *demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
DemodulatorInstance *demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
||||||
|
|
||||||
int bw = 0;
|
int bw = 0;
|
||||||
@ -211,7 +211,13 @@ void PrimaryGLContext::DrawFreqSelector(float uxPos, float r, float g, float b)
|
|||||||
glVertex3f((uxPos - 0.5) * 2.0, 1.0, 0.0);
|
glVertex3f((uxPos - 0.5) * 2.0, 1.0, 0.0);
|
||||||
glVertex3f((uxPos - 0.5) * 2.0, -1.0, 0.0);
|
glVertex3f((uxPos - 0.5) * 2.0, -1.0, 0.0);
|
||||||
|
|
||||||
float ofs = ((float) bw) / (float) SRATE;
|
float ofs;
|
||||||
|
|
||||||
|
if (w) {
|
||||||
|
ofs = w;
|
||||||
|
} else {
|
||||||
|
ofs = ((float) bw) / (float) SRATE;
|
||||||
|
}
|
||||||
|
|
||||||
glVertex3f((uxPos - 0.5) * 2.0 - ofs, 1.0, 0.0);
|
glVertex3f((uxPos - 0.5) * 2.0 - ofs, 1.0, 0.0);
|
||||||
glVertex3f((uxPos - 0.5) * 2.0 - ofs, -1.0, 0.0);
|
glVertex3f((uxPos - 0.5) * 2.0 - ofs, -1.0, 0.0);
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
void BeginDraw();
|
void BeginDraw();
|
||||||
void EndDraw();
|
void EndDraw();
|
||||||
|
|
||||||
void DrawFreqSelector(float uxPos, float r = 1, float g = 1, float b = 1);
|
void DrawFreqSelector(float uxPos, float r = 1, float g = 1, float b = 1, float w=0);
|
||||||
void DrawDemod(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1);
|
void DrawDemod(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1);
|
||||||
void DrawDemodInfo(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1);
|
void DrawDemodInfo(DemodulatorInstance *demod, float r = 1, float g = 1, float b = 1);
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ EVT_IDLE(SpectrumCanvas::OnIdle)
|
|||||||
EVT_MOTION(SpectrumCanvas::mouseMoved)
|
EVT_MOTION(SpectrumCanvas::mouseMoved)
|
||||||
EVT_LEFT_DOWN(SpectrumCanvas::mouseDown)
|
EVT_LEFT_DOWN(SpectrumCanvas::mouseDown)
|
||||||
EVT_LEFT_UP(SpectrumCanvas::mouseReleased)
|
EVT_LEFT_UP(SpectrumCanvas::mouseReleased)
|
||||||
//EVT_RIGHT_DOWN(SpectrumCanvas::rightClick)
|
|
||||||
EVT_LEAVE_WINDOW(SpectrumCanvas::mouseLeftWindow)
|
EVT_LEAVE_WINDOW(SpectrumCanvas::mouseLeftWindow)
|
||||||
EVT_MOUSEWHEEL(SpectrumCanvas::mouseWheelMoved)
|
EVT_MOUSEWHEEL(SpectrumCanvas::mouseWheelMoved)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
@ -31,7 +31,7 @@ wxEND_EVENT_TABLE()
|
|||||||
WaterfallCanvas::WaterfallCanvas(wxWindow *parent, int *attribList) :
|
WaterfallCanvas::WaterfallCanvas(wxWindow *parent, int *attribList) :
|
||||||
wxGLCanvas(parent, wxID_ANY, attribList, wxDefaultPosition, wxDefaultSize,
|
wxGLCanvas(parent, wxID_ANY, attribList, wxDefaultPosition, wxDefaultSize,
|
||||||
wxFULL_REPAINT_ON_RESIZE), parent(parent), frameTimer(0), dragState(WF_DRAG_NONE), nextDragState(WF_DRAG_NONE), shiftDown(
|
wxFULL_REPAINT_ON_RESIZE), parent(parent), frameTimer(0), dragState(WF_DRAG_NONE), nextDragState(WF_DRAG_NONE), shiftDown(
|
||||||
false), activeDemodulatorBandwidth(0), activeDemodulatorFrequency(0) {
|
false), altDown(false), ctrlDown(false), activeDemodulatorBandwidth(0), activeDemodulatorFrequency(0) {
|
||||||
|
|
||||||
int in_block_size = BUF_SIZE / 2;
|
int in_block_size = BUF_SIZE / 2;
|
||||||
int out_block_size = FFT_SIZE;
|
int out_block_size = FFT_SIZE;
|
||||||
@ -78,24 +78,46 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
|||||||
DemodulatorInstance *lastActiveDemodulator = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
DemodulatorInstance *lastActiveDemodulator = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
||||||
|
|
||||||
if (mTracker.mouseInView()) {
|
if (mTracker.mouseInView()) {
|
||||||
|
if (nextDragState == WF_DRAG_RANGE) {
|
||||||
|
if (mTracker.mouseDown()) {
|
||||||
|
float width = mTracker.getOriginDeltaMouseX();
|
||||||
|
float centerPos = mTracker.getOriginMouseX()+width/2.0;
|
||||||
|
|
||||||
if (activeDemodulator == NULL) {
|
|
||||||
if (lastActiveDemodulator) {
|
|
||||||
if (shiftDown) {
|
if (shiftDown) {
|
||||||
glContext->DrawDemod(lastActiveDemodulator);
|
glContext->DrawDemod(lastActiveDemodulator);
|
||||||
glContext->DrawFreqSelector(mTracker.getMouseX(), 0, 1, 0);
|
glContext->DrawFreqSelector(centerPos, 0, 1, 0, width?width:(1.0/(float)ClientSize.x));
|
||||||
} else {
|
} else {
|
||||||
glContext->DrawDemod(lastActiveDemodulator, 1, 0, 0);
|
glContext->DrawDemod(lastActiveDemodulator, 1, 0, 0);
|
||||||
|
glContext->DrawFreqSelector(centerPos, 1, 1, 0, width?width:(1.0/(float)ClientSize.x));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (shiftDown) {
|
||||||
|
glContext->DrawDemod(lastActiveDemodulator);
|
||||||
|
glContext->DrawFreqSelector(mTracker.getMouseX(), 0, 1, 0, 1.0/(float)ClientSize.x);
|
||||||
|
} else {
|
||||||
|
glContext->DrawDemod(lastActiveDemodulator, 1, 0, 0);
|
||||||
|
glContext->DrawFreqSelector(mTracker.getMouseX(), 1, 1, 0, 1.0/(float)ClientSize.x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (activeDemodulator == NULL) {
|
||||||
|
if (lastActiveDemodulator) {
|
||||||
|
if (shiftDown) {
|
||||||
|
glContext->DrawDemod(lastActiveDemodulator);
|
||||||
|
glContext->DrawFreqSelector(mTracker.getMouseX(), 0, 1, 0);
|
||||||
|
} else {
|
||||||
|
glContext->DrawDemod(lastActiveDemodulator, 1, 0, 0);
|
||||||
|
glContext->DrawFreqSelector(mTracker.getMouseX(), 1, 1, 0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
glContext->DrawFreqSelector(mTracker.getMouseX(), 1, 1, 0);
|
glContext->DrawFreqSelector(mTracker.getMouseX(), 1, 1, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
glContext->DrawFreqSelector(mTracker.getMouseX(), 1, 1, 0);
|
if (lastActiveDemodulator) {
|
||||||
|
glContext->DrawDemod(lastActiveDemodulator);
|
||||||
|
}
|
||||||
|
glContext->DrawDemod(activeDemodulator, 1, 1, 0);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (lastActiveDemodulator) {
|
|
||||||
glContext->DrawDemod(lastActiveDemodulator);
|
|
||||||
}
|
|
||||||
glContext->DrawDemod(activeDemodulator, 1, 1, 0);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (activeDemodulator) {
|
if (activeDemodulator) {
|
||||||
@ -120,7 +142,8 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
|||||||
|
|
||||||
void WaterfallCanvas::OnKeyUp(wxKeyEvent& event) {
|
void WaterfallCanvas::OnKeyUp(wxKeyEvent& event) {
|
||||||
shiftDown = event.ShiftDown();
|
shiftDown = event.ShiftDown();
|
||||||
|
altDown = event.AltDown();
|
||||||
|
ctrlDown = event.ControlDown();
|
||||||
// switch (event.GetKeyCode()) {
|
// switch (event.GetKeyCode()) {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
@ -129,6 +152,8 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
|
|||||||
float angle = 5.0;
|
float angle = 5.0;
|
||||||
|
|
||||||
shiftDown = event.ShiftDown();
|
shiftDown = event.ShiftDown();
|
||||||
|
altDown = event.AltDown();
|
||||||
|
ctrlDown = event.ControlDown();
|
||||||
|
|
||||||
DemodulatorInstance *activeDemod = wxGetApp().getDemodMgr().getActiveDemodulator();
|
DemodulatorInstance *activeDemod = wxGetApp().getDemodMgr().getActiveDemodulator();
|
||||||
|
|
||||||
@ -244,6 +269,8 @@ void WaterfallCanvas::mouseMoved(wxMouseEvent& event) {
|
|||||||
mTracker.OnMouseMoved(event);
|
mTracker.OnMouseMoved(event);
|
||||||
|
|
||||||
shiftDown = event.ShiftDown();
|
shiftDown = event.ShiftDown();
|
||||||
|
altDown = event.AltDown();
|
||||||
|
ctrlDown = event.ControlDown();
|
||||||
|
|
||||||
DemodulatorInstance *demod = wxGetApp().getDemodMgr().getActiveDemodulator();
|
DemodulatorInstance *demod = wxGetApp().getDemodMgr().getActiveDemodulator();
|
||||||
|
|
||||||
@ -290,6 +317,8 @@ void WaterfallCanvas::mouseMoved(wxMouseEvent& event) {
|
|||||||
|
|
||||||
command.int_value = activeDemodulatorFrequency;
|
command.int_value = activeDemodulatorFrequency;
|
||||||
demod->getCommandQueue()->push(command);
|
demod->getCommandQueue()->push(command);
|
||||||
|
|
||||||
|
demod->updateLabel(activeDemodulatorFrequency);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int freqPos = GetFrequencyAt(mTracker.getMouseX());
|
int freqPos = GetFrequencyAt(mTracker.getMouseX());
|
||||||
@ -298,7 +327,11 @@ void WaterfallCanvas::mouseMoved(wxMouseEvent& event) {
|
|||||||
|
|
||||||
wxGetApp().getDemodMgr().setActiveDemodulator(NULL);
|
wxGetApp().getDemodMgr().setActiveDemodulator(NULL);
|
||||||
|
|
||||||
if (demodsHover->size()) {
|
if (altDown) {
|
||||||
|
nextDragState = WF_DRAG_RANGE;
|
||||||
|
mTracker.setVertDragLock(true);
|
||||||
|
mTracker.setHorizDragLock(false);
|
||||||
|
} else if (demodsHover->size()) {
|
||||||
int hovered = -1;
|
int hovered = -1;
|
||||||
int near_dist = SRATE;
|
int near_dist = SRATE;
|
||||||
|
|
||||||
@ -365,8 +398,10 @@ void WaterfallCanvas::mouseDown(wxMouseEvent& event) {
|
|||||||
dragState = nextDragState;
|
dragState = nextDragState;
|
||||||
|
|
||||||
shiftDown = event.ShiftDown();
|
shiftDown = event.ShiftDown();
|
||||||
|
altDown = event.AltDown();
|
||||||
|
ctrlDown = event.ControlDown();
|
||||||
|
|
||||||
if (dragState) {
|
if (dragState && dragState != WF_DRAG_RANGE) {
|
||||||
wxGetApp().getDemodMgr().setActiveDemodulator(wxGetApp().getDemodMgr().getActiveDemodulator(), false);
|
wxGetApp().getDemodMgr().setActiveDemodulator(wxGetApp().getDemodMgr().getActiveDemodulator(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,9 +417,11 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
|
|||||||
mTracker.OnMouseReleased(event);
|
mTracker.OnMouseReleased(event);
|
||||||
|
|
||||||
shiftDown = event.ShiftDown();
|
shiftDown = event.ShiftDown();
|
||||||
|
altDown = event.AltDown();
|
||||||
|
ctrlDown = event.ControlDown();
|
||||||
|
|
||||||
mTracker.setVertDragLock(true);
|
mTracker.setVertDragLock(false);
|
||||||
mTracker.setHorizDragLock(true);
|
mTracker.setHorizDragLock(false);
|
||||||
|
|
||||||
if (mTracker.getOriginDeltaMouseX() == 0 && mTracker.getOriginDeltaMouseY() == 0) {
|
if (mTracker.getOriginDeltaMouseX() == 0 && mTracker.getOriginDeltaMouseY() == 0) {
|
||||||
DemodulatorInstance *demod;
|
DemodulatorInstance *demod;
|
||||||
@ -393,29 +430,30 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
|
|||||||
int center_freq = wxGetApp().getFrequency();
|
int center_freq = wxGetApp().getFrequency();
|
||||||
int freq = center_freq - (int) (0.5 * (float) SRATE) + (int) ((float) pos * (float) SRATE);
|
int freq = center_freq - (int) (0.5 * (float) SRATE) + (int) ((float) pos * (float) SRATE);
|
||||||
|
|
||||||
if (!shiftDown && wxGetApp().getDemodMgr().getDemodulators().size()) {
|
|
||||||
demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
|
||||||
} else {
|
|
||||||
demod = wxGetApp().getDemodMgr().newThread();
|
|
||||||
demod->getParams().frequency = freq;
|
|
||||||
|
|
||||||
if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) {
|
|
||||||
demod->getParams().bandwidth = last->getParams().bandwidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
demod->run();
|
|
||||||
|
|
||||||
wxGetApp().bindDemodulator(demod);
|
|
||||||
|
|
||||||
wxGetApp().getDemodMgr().setActiveDemodulator(demod);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dragState == WF_DRAG_NONE) {
|
if (dragState == WF_DRAG_NONE) {
|
||||||
|
if (!shiftDown && wxGetApp().getDemodMgr().getDemodulators().size()) {
|
||||||
|
demod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
|
||||||
|
} else {
|
||||||
|
demod = wxGetApp().getDemodMgr().newThread();
|
||||||
|
demod->getParams().frequency = freq;
|
||||||
|
|
||||||
|
if (DemodulatorInstance *last = wxGetApp().getDemodMgr().getLastActiveDemodulator()) {
|
||||||
|
demod->getParams().bandwidth = last->getParams().bandwidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
demod->run();
|
||||||
|
|
||||||
|
wxGetApp().bindDemodulator(demod);
|
||||||
|
|
||||||
|
wxGetApp().getDemodMgr().setActiveDemodulator(demod);
|
||||||
|
}
|
||||||
|
|
||||||
if (demod == NULL) {
|
if (demod == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
demod->updateLabel(freq);
|
||||||
|
|
||||||
DemodulatorThreadCommand command;
|
DemodulatorThreadCommand command;
|
||||||
command.cmd = DemodulatorThreadCommand::DEMOD_THREAD_CMD_SET_FREQUENCY;
|
command.cmd = DemodulatorThreadCommand::DEMOD_THREAD_CMD_SET_FREQUENCY;
|
||||||
command.int_value = freq;
|
command.int_value = freq;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
class WaterfallCanvas: public wxGLCanvas {
|
class WaterfallCanvas: public wxGLCanvas {
|
||||||
public:
|
public:
|
||||||
enum DragState { WF_DRAG_NONE, WF_DRAG_BANDWIDTH_LEFT, WF_DRAG_BANDWIDTH_RIGHT, WF_DRAG_FREQUENCY };
|
enum DragState { WF_DRAG_NONE, WF_DRAG_BANDWIDTH_LEFT, WF_DRAG_BANDWIDTH_RIGHT, WF_DRAG_FREQUENCY, WF_DRAG_RANGE };
|
||||||
|
|
||||||
WaterfallCanvas(wxWindow *parent, int *attribList = NULL);
|
WaterfallCanvas(wxWindow *parent, int *attribList = NULL);
|
||||||
~WaterfallCanvas();
|
~WaterfallCanvas();
|
||||||
@ -61,8 +61,9 @@ private:
|
|||||||
DragState nextDragState;
|
DragState nextDragState;
|
||||||
|
|
||||||
bool shiftDown;
|
bool shiftDown;
|
||||||
|
bool altDown;
|
||||||
// event table
|
bool ctrlDown;
|
||||||
|
// event table
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user