CubicSDR/src/FrequencyDialog.h

44 lines
1.2 KiB
C
Raw Permalink Normal View History

// 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
#define wxID_FREQ_INPUT 3001
2015-05-04 19:44:03 -04:00
class FrequencyDialog: public wxDialog
{
public:
typedef enum FrequencyDialogTarget {
FDIALOG_TARGET_DEFAULT,
FDIALOG_TARGET_CENTERFREQ,
FDIALOG_TARGET_FREQ,
FDIALOG_TARGET_BANDWIDTH,
FDIALOG_TARGET_WATERFALL_LPS,
FDIALOG_TARGET_SPECTRUM_AVG,
FDIALOG_TARGET_GAIN
} 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,
long style = wxDEFAULT_DIALOG_STYLE,
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;
void OnChar ( wxKeyEvent &event );
void OnShow(wxShowEvent &event);
FrequencyDialogTarget targetMode;
std::string initialString;
2015-05-04 19:44:03 -04:00
DECLARE_EVENT_TABLE()
};