2014-10-27 21:22:29 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/frame.h"
|
|
|
|
#include "PrimaryGLContext.h"
|
2014-11-23 19:39:27 -05:00
|
|
|
|
2014-11-12 21:55:11 -05:00
|
|
|
#include "ScopeCanvas.h"
|
2014-11-15 23:41:41 -05:00
|
|
|
#include "SpectrumCanvas.h"
|
|
|
|
#include "WaterfallCanvas.h"
|
2014-12-31 19:45:01 -05:00
|
|
|
#include "MeterCanvas.h"
|
2015-01-04 17:11:20 -05:00
|
|
|
#include "TuningCanvas.h"
|
2015-01-05 19:12:16 -05:00
|
|
|
#include "ModeSelectorCanvas.h"
|
2014-12-31 19:45:01 -05:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
2014-12-31 22:38:59 -05:00
|
|
|
#define wxID_RT_AUDIO_DEVICE 1000
|
2015-01-06 00:57:57 -05:00
|
|
|
#define wxID_SET_FREQ_OFFSET 2001
|
2015-01-10 12:27:03 -05:00
|
|
|
#define wxID_RESET 2002
|
2014-11-19 17:41:49 -05:00
|
|
|
|
2015-01-11 03:09:59 -05:00
|
|
|
#define wxID_THEME_DEFAULT 2100
|
|
|
|
#define wxID_THEME_SHARP 2101
|
|
|
|
#define wxID_THEME_BW 2102
|
|
|
|
#define wxID_THEME_RAD 2103
|
|
|
|
#define wxID_THEME_TOUCH 2104
|
|
|
|
#define wxID_THEME_HD 2105
|
|
|
|
#define wxID_THEME_RADAR 2106
|
|
|
|
|
2015-01-11 17:08:16 -05:00
|
|
|
#define wxID_BANDWIDTH_1000M 2152
|
|
|
|
#define wxID_BANDWIDTH_1500M 2153
|
|
|
|
#define wxID_BANDWIDTH_2000M 2154
|
|
|
|
#define wxID_BANDWIDTH_2500M 2155
|
|
|
|
#define wxID_BANDWIDTH_2880M 2156
|
|
|
|
#define wxID_BANDWIDTH_3200M 2158
|
|
|
|
|
2015-01-12 00:40:43 -05:00
|
|
|
#define wxID_DEVICE_ID 3500
|
|
|
|
|
2015-03-12 19:41:50 -04:00
|
|
|
#define wxID_AUDIO_BANDWIDTH_BASE 9000
|
|
|
|
#define wxID_AUDIO_DEVICE_MULTIPLIER 50
|
|
|
|
|
|
|
|
|
2015-01-12 00:40:43 -05:00
|
|
|
|
2014-10-27 21:22:29 -04:00
|
|
|
// Define a new frame type
|
2014-10-28 21:39:59 -04:00
|
|
|
class AppFrame: public wxFrame {
|
2014-10-27 21:22:29 -04:00
|
|
|
public:
|
|
|
|
AppFrame();
|
2014-11-04 18:39:08 -05:00
|
|
|
~AppFrame();
|
2014-11-22 22:33:32 -05:00
|
|
|
void OnThread(wxCommandEvent& event);
|
2014-10-28 21:39:59 -04:00
|
|
|
void OnEventInput(wxThreadEvent& event);
|
2014-11-16 16:51:45 -05:00
|
|
|
|
2015-01-09 17:17:56 -05:00
|
|
|
void saveSession(std::string fileName);
|
|
|
|
bool loadSession(std::string fileName);
|
|
|
|
|
2014-10-27 21:22:29 -04:00
|
|
|
private:
|
2014-12-31 21:31:37 -05:00
|
|
|
void OnMenu(wxCommandEvent& event);
|
2014-12-31 22:38:59 -05:00
|
|
|
void OnClose(wxCommandEvent& event);
|
2014-10-27 21:22:29 -04:00
|
|
|
void OnNewWindow(wxCommandEvent& event);
|
2014-10-28 21:39:59 -04:00
|
|
|
void OnIdle(wxIdleEvent& event);
|
2014-10-27 21:22:29 -04:00
|
|
|
|
2014-11-15 23:41:41 -05:00
|
|
|
ScopeCanvas *scopeCanvas;
|
|
|
|
SpectrumCanvas *spectrumCanvas;
|
|
|
|
WaterfallCanvas *waterfallCanvas;
|
2015-01-05 19:12:16 -05:00
|
|
|
ModeSelectorCanvas *demodModeSelector;
|
2014-12-29 00:24:10 -05:00
|
|
|
SpectrumCanvas *demodSpectrumCanvas;
|
2014-12-28 05:13:46 -05:00
|
|
|
WaterfallCanvas *demodWaterfallCanvas;
|
2014-12-31 19:45:01 -05:00
|
|
|
MeterCanvas *demodSignalMeter;
|
2015-01-10 20:33:30 -05:00
|
|
|
MeterCanvas *demodGainMeter;
|
2015-01-04 17:11:20 -05:00
|
|
|
TuningCanvas *demodTuner;
|
2014-12-31 19:45:01 -05:00
|
|
|
|
|
|
|
DemodulatorInstance *activeDemodulator;
|
|
|
|
|
2014-12-31 22:38:59 -05:00
|
|
|
std::vector<RtAudio::DeviceInfo> devices;
|
2015-01-03 17:07:39 -05:00
|
|
|
std::map<int,RtAudio::DeviceInfo> inputDevices;
|
|
|
|
std::map<int,RtAudio::DeviceInfo> outputDevices;
|
2015-03-12 19:41:50 -04:00
|
|
|
std::map<int, wxMenuItem *> outputDeviceMenuItems;
|
|
|
|
std::map<int, wxMenuItem *> sampleRateMenuItems;
|
|
|
|
std::map<int, wxMenuItem *> audioSampleRateMenuItems;
|
2015-01-11 17:08:16 -05:00
|
|
|
|
2015-01-09 17:17:56 -05:00
|
|
|
std::string currentSessionFile;
|
|
|
|
|
2014-12-28 05:13:46 -05:00
|
|
|
wxDECLARE_EVENT_TABLE();
|
2014-10-27 21:22:29 -04:00
|
|
|
};
|