2017-01-02 21:07:43 -05:00
|
|
|
// Copyright (c) Charles J. Cliffe
|
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
|
2015-05-04 19:44:03 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "wx/dialog.h"
|
|
|
|
#include "wx/textctrl.h"
|
|
|
|
#include "wx/string.h"
|
|
|
|
#include "wx/button.h"
|
2015-05-10 01:39:10 -04:00
|
|
|
#include "DemodulatorInstance.h"
|
2015-05-04 19:44:03 -04:00
|
|
|
|
2015-05-09 23:13:35 -04:00
|
|
|
#define wxID_FREQ_INPUT 3001
|
2015-05-04 19:44:03 -04:00
|
|
|
|
|
|
|
class FrequencyDialog: public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
2016-02-07 21:05:49 -05:00
|
|
|
typedef enum FrequencyDialogTarget {
|
|
|
|
FDIALOG_TARGET_DEFAULT,
|
|
|
|
FDIALOG_TARGET_CENTERFREQ,
|
|
|
|
FDIALOG_TARGET_FREQ,
|
|
|
|
FDIALOG_TARGET_BANDWIDTH,
|
|
|
|
FDIALOG_TARGET_WATERFALL_LPS,
|
2016-02-07 22:19:05 -05:00
|
|
|
FDIALOG_TARGET_SPECTRUM_AVG,
|
|
|
|
FDIALOG_TARGET_GAIN
|
2016-02-07 21:05:49 -05:00
|
|
|
} FrequencyDialogTarget;
|
2015-05-04 19:44:03 -04:00
|
|
|
FrequencyDialog ( wxWindow * parent, wxWindowID id, const wxString & title,
|
2017-08-27 05:11:30 -04:00
|
|
|
DemodulatorInstancePtr demod = nullptr,
|
2015-05-04 19:44:03 -04:00
|
|
|
const wxPoint & pos = wxDefaultPosition,
|
|
|
|
const wxSize & size = wxDefaultSize,
|
2015-08-14 20:19:37 -04:00
|
|
|
long style = wxDEFAULT_DIALOG_STYLE,
|
2016-02-07 19:32:05 -05:00
|
|
|
FrequencyDialogTarget targetMode = FDIALOG_TARGET_DEFAULT,
|
|
|
|
wxString initString = "");
|
2015-05-04 19:44:03 -04:00
|
|
|
|
|
|
|
wxTextCtrl * dialogText;
|
|
|
|
|
|
|
|
private:
|
2017-08-27 05:11:30 -04:00
|
|
|
DemodulatorInstancePtr activeDemod;
|
2015-05-04 19:44:03 -04:00
|
|
|
void OnEnter ( wxCommandEvent &event );
|
2015-05-09 23:13:35 -04:00
|
|
|
void OnChar ( wxKeyEvent &event );
|
2016-02-09 00:46:39 -05:00
|
|
|
void OnShow(wxShowEvent &event);
|
2015-08-14 20:19:37 -04:00
|
|
|
FrequencyDialogTarget targetMode;
|
2016-02-09 00:46:39 -05:00
|
|
|
std::string initialString;
|
2015-05-04 19:44:03 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|