+++ /dev/null
-//==========================================================================
-// Name: dlg_audio.cpp
-//
-// Purpose: Creates simple wxWidgets dialog GUI for audio
-// devices/options.
-//
-// Date: May 05 2012
-// Initial author: David Witten
-// License: BSD License (other licenses may apply to other
-// components of this project)
-//==========================================================================
-#include "dlg_audio.h"
-
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-// Class AudioDlg( wxWindow* parent ) : DlgAudio( parent )
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-AudioDlg::AudioDlg( wxWindow* parent ) : DlgAudio( parent )
-{
-}
-
-//-------------------------------------------------------------------------
-// OnCancel()
-//-------------------------------------------------------------------------
-void AudioDlg::OnCancel( wxCommandEvent& event )
-{
- this->EndModal(wxID_CANCEL);
-}
-
-//-------------------------------------------------------------------------
-// OnOK()
-//-------------------------------------------------------------------------
-void AudioDlg::OnOK( wxCommandEvent& event )
-{
- this->EndModal(wxID_OK);
-}
-
-//-------------------------------------------------------------------------
-// OnApply()
-//-------------------------------------------------------------------------
-void AudioDlg::OnApply( wxCommandEvent& event )
-{
- ExchangeData(EXCHANGE_DATA_OUT);
-}
-
-//-------------------------------------------------------------------------
-// OnClose()
-//-------------------------------------------------------------------------
-void AudioDlg::OnClose( wxCloseEvent& event )
-{
- this->EndModal(wxOK);
-}
-
-//-------------------------------------------------------------------------
-// OnInitDialog()
-//-------------------------------------------------------------------------
-void AudioDlg::OnInitDialog( wxInitDialogEvent& event )
-{
- ExchangeData(EXCHANGE_DATA_IN);
- populateAudioInfo();
-}
-
-//-------------------------------------------------------------------------
-// ExchangeData()
-//-------------------------------------------------------------------------
-void AudioDlg::ExchangeData(int inout)
-{
- wxConfigBase *pConfig = wxConfigBase::Get();
- if(inout == EXCHANGE_DATA_IN)
- {
- m_textRxInput->SetValue(wxGetApp().m_strRxInAudio);
- m_textTxOutput->SetValue(wxGetApp().m_strRxOutAudio);
- m_textVoiceInput->SetValue(wxGetApp().m_textVoiceInput);
- m_textVoiceOutput->SetValue(wxGetApp().m_textVoiceOutput);
- }
- if(inout == EXCHANGE_DATA_OUT)
- {
- wxGetApp().m_strRxInAudio = m_textRxInput->GetValue();
- wxGetApp().m_strRxOutAudio = m_textTxOutput->GetValue();
- wxGetApp().m_textVoiceInput = m_textVoiceInput->GetValue();
- wxGetApp().m_textVoiceOutput = m_textVoiceOutput->GetValue();
-
- pConfig->Write(wxT("/Audio/RxIn"), wxGetApp().m_strRxInAudio);
- pConfig->Write(wxT("/Audio/RxOut"), wxGetApp().m_strRxOutAudio);
- pConfig->Write(wxT("/Audio/TxIn"), wxGetApp().m_textVoiceInput);
- pConfig->Write(wxT("/Audio/TxOut"), wxGetApp().m_textVoiceOutput);
- pConfig->Write(wxT("/Audio/SampleRate"), wxGetApp().m_strSampleRate);
- pConfig->Flush();
- }
- delete wxConfigBase::Set((wxConfigBase *) NULL);
-}
-
-//-------------------------------------------------------------------------
-// OnRxInputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnRxInputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnRxInputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// OnTxOutputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnTxOutputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnTxOutputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// OnVoiceInputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnVoiceInputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnVoiceInputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// OnVoiceOutputSelect()
-//-------------------------------------------------------------------------
-void AudioDlg::OnVoiceOutputSelect( wxCommandEvent& event )
-{
- wxMessageBox(wxT("got OnVoiceOutputSelect()"), wxT("Select"), wxOK);
-}
-
-//-------------------------------------------------------------------------
-// populateStandardSampleRates()
-//-------------------------------------------------------------------------
-void AudioDlg::populateStandardSampleRates(
- wxComboBox* target,
- const portaudio::DirectionSpecificStreamParameters &inputParameters,
- const portaudio::DirectionSpecificStreamParameters &outputParameters)
-{
- static double STANDARD_SAMPLE_RATES[] = {
- 8000.0, 9600.0, 11025.0, 12000.0,
- 16000.0, 22050.0, 24000.0, 32000.0,
- 44100.0, 48000.0, 88200.0, 96000.0,
- -1 // negative terminated list
- };
- int printCount = 0;
- wxString tStr;
-
- for (int i = 0; STANDARD_SAMPLE_RATES[i] > 0; ++i)
- {
- portaudio::StreamParameters tmp = portaudio::StreamParameters(inputParameters, outputParameters, STANDARD_SAMPLE_RATES[i], 0, paNoFlag);
- if (tmp.isSupported())
- {
- tStr.Printf("%i %8.2f", printCount, STANDARD_SAMPLE_RATES[i]);
- target->Append(tStr);
- ++printCount;
- }
- }
- if (printCount == 0)
- {
- tStr = "None\n";
- target->Append(tStr);
- }
-}
-
-//-------------------------------------------------------------------------
-// OnActivate()
-//-------------------------------------------------------------------------
-int AudioDlg::populateAudioInfo()
-{
- wxString tStr;
- wxString ttStr;
- try
- {
- portaudio::AutoSystem autoSys;
- portaudio::System &sys = portaudio::System::instance();
-/*
-
- tStr.Printf("PortAudio version number: %i\n", sys.version());
- m_textTopRight->AppendText(tStr);
-
- tStr.Printf("PortAudio version number: %s\n", sys.versionText());
- m_textTopRight->AppendText(tStr);
-
- int numDevices = sys.deviceCount();
- tStr.Printf("Number of devices: %i\n\n", numDevices);
- m_textTopRight->AppendText(tStr);
-*/
- for (portaudio::System::DeviceIterator i = sys.devicesBegin(); i != sys.devicesEnd(); ++i)
- {
-/*
- tStr.Printf("---------- device #: %i ----------\n", (*i).index());
- m_textTopRight->AppendText(tStr);
- bool defaultDisplayed = false;
- if ((*i).isSystemDefaultInputDevice())
- {
- tStr.Printf("[ System Default Input %s", (*i).hostApi().name());
- m_textTopRight->AppendText(tStr);
- defaultDisplayed = true;
- }
- else if ((*i).isHostApiDefaultInputDevice())
- {
- tStr.Printf("[ HostApi Default %s Input", (*i).hostApi().name());
- m_textTopRight->AppendText(tStr);
- defaultDisplayed = true;
- }
- if ((*i).isSystemDefaultOutputDevice())
- {
- tStr.Printf(defaultDisplayed ? "," : "[");
- m_textTopRight->AppendText(tStr);
- tStr = (" System Default Output");
- m_textTopRight->AppendText(tStr);
- defaultDisplayed = true;
- }
- else if ((*i).isHostApiDefaultOutputDevice())
- {
- tStr.Printf(defaultDisplayed ? "," : "[");
- m_textTopRight->AppendText(tStr);
- tStr.Printf(" HostApi Default %s Output", (*i).hostApi().name());
- m_textTopRight->AppendText(tStr);
- defaultDisplayed = true;
- }
- if (defaultDisplayed)
- {
- tStr = " ]\n";
- m_textTopRight->AppendText(tStr);
- }
- ttStr.Printf("Name : %s\n", (*i).name());
- tStr += ttStr;
- ttStr.Printf("Host API : %s\n", (*i).hostApi().name());
- tStr += ttStr;
- ttStr.Printf("Max inputs : %i\n", (*i).maxInputChannels());
- tStr += ttStr;
- ttStr.Printf("Max outputs : %i\n\n", (*i).maxOutputChannels());
- tStr += ttStr;
- ttStr.Printf("Default low input latency : %8.3f\n", (*i).defaultLowInputLatency());
- tStr += ttStr;
- ttStr.Printf("Default low output latency : %8.3f\n", (*i).defaultLowOutputLatency());
- tStr += ttStr;
- ttStr.Printf("Default high input latency : %8.3f\n", (*i).defaultHighInputLatency());
- tStr += ttStr;
- ttStr.Printf("Default high output latency : %8.3f\n\n", (*i).defaultHighOutputLatency());
- tStr += ttStr;
- m_textTopRight->AppendText(tStr);
-
-#ifdef WIN32_ASIO
- // ASIO specific latency information:
- if ((*i).hostApi().typeId() == paASIO)
- {
- portaudio::AsioDeviceAdapter asioDevice((*i));
- //std::cout << "ASIO minimum buffer size = " << asioDevice.minBufferSize() << std::endl;
- //std::cout << "ASIO maximum buffer size = " << asioDevice.maxBufferSize() << std::endl;
- //std::cout << "ASIO preferred buffer size = " << asioDevice.preferredBufferSize() << std::endl;
- if (asioDevice.granularity() == -1)
- {
- //std::cout << "ASIO buffer granularity = power of 2" << std::endl;
- }
- else
- {
- //std::cout << "ASIO buffer granularity = " << asioDevice.granularity() << std::endl;
- }
- }
-#endif // WIN32_ASIO
-
- tStr.Printf("Default sample rate : %8.2f\n", (*i).defaultSampleRate());
- m_textTopRight->AppendText(tStr);
- wxComboBox* m_comboAudioCodec;
- wxComboBox* m_comboCodecTx;
- wxComboBox* m_comboRadioRx;
- wxComboBox* m_comboCodecSpkr;
-*/
- // Poll for standard sample rates:
- portaudio::DirectionSpecificStreamParameters inputParameters((*i), (*i).maxInputChannels(), portaudio::INT16, true, 0.0, NULL);
- portaudio::DirectionSpecificStreamParameters outputParameters((*i), (*i).maxOutputChannels(), portaudio::INT16, true, 0.0, NULL);
- if (inputParameters.numChannels() > 0)
- {
-// tStr = "Supported standard Input sample rates\n";
-// m_comboAudioCodec->Append(tStr);
-// tStr.Printf(" for half-duplex 16 bit %i channel input = ", inputParameters.numChannels());
-// m_comboAudioCodec->InsertItems(1, &tStr, 0);
-// m_comboAudioCodec->Append(tStr);
- populateStandardSampleRates(m_comboAudioCodec, inputParameters, portaudio::DirectionSpecificStreamParameters::null());
- }
- if (outputParameters.numChannels() > 0)
- {
-// tStr = "Supported standard Output sample rates\n";
-// m_comboRadioRx->Append(tStr);
-// tStr.Printf(" for half-duplex 16 bit %i channel output = ", outputParameters.numChannels());
-// m_comboRadioRx->Append(tStr);
- populateStandardSampleRates(m_comboRadioRx, portaudio::DirectionSpecificStreamParameters::null(), outputParameters);
- }
- if (inputParameters.numChannels() > 0 && inputParameters.numChannels() > 0)
- {
-// tStr = "Supported full-duplex sample rates\n";
-// m_comboCodecTx->Append(tStr);
-// tStr.Printf(" for full-duplex 16 bit %i channel input, %i", inputParameters.numChannels(), outputParameters.numChannels());
-// m_comboCodecTx->InsertItems(1, &tStr, 0);
-// m_comboCodecTx->Append(tStr);
- populateStandardSampleRates(m_comboCodecTx, inputParameters, outputParameters);
- }
- if (outputParameters.numChannels() > 0 && outputParameters.numChannels() > 0)
- {
-// tStr = "Supported full-duplex sample rates\n";
-// m_comboCodecSpkr->Append(tStr);
-// tStr.Printf(" for full-duplex 16 bit %i channel input, %i", inputParameters.numChannels(), outputParameters.numChannels());
-// m_comboCodecTx->InsertItems(1, &tStr, 0);
- populateStandardSampleRates(m_comboCodecSpkr, inputParameters, outputParameters);
- }
- }
- }
- catch (const portaudio::PaException &e)
- {
- tStr.Printf("A PortAudio error occured: %s\n", e.paErrorText());
- wxMessageBox(tStr, wxT("Portaudio exception"), wxOK);
- }
- catch (const portaudio::PaCppException &e)
- {
- tStr.Printf("A PortAudioCpp error occured: %s\n", e.what());
- wxMessageBox(tStr, wxT("PortAudioCpp error"), wxOK);
- }
- catch (const std::exception &e)
- {
- tStr.Printf("A generic exception occured: %s\n", e.what());
- wxMessageBox(tStr, wxT("Generic Exception"), wxOK);
- }
- catch (...)
- {
- tStr.Printf("An unknown exception occured.\n");
- wxMessageBox(tStr, wxT("Unknown error"), wxOK);
- }
- return 0;
-}
-
-
tools->Append(m_menuItemOptions);
tools->AppendSeparator();
-/*
- wxMenuItem* m_menuItemCaptRxStream;
- m_menuItemCaptRxStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Rx Stream")) + wxT('\t') + wxT("Capture receive stream to file."), wxEmptyString, wxITEM_NORMAL);
- #ifdef __WXMSW__
- m_menuItemCaptRxStream->SetBitmaps(wxNullBitmap);
- #elif defined(__WXGTK__)
- m_menuItemCaptRxStream->SetBitmap(wxNullBitmap);
- #endif
- tools->Append(m_menuItemCaptRxStream);
-
- wxMenuItem* m_menuItemCaptTxStream;
- m_menuItemCaptTxStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Tx Stream")) + wxT('\t') + wxT("Capture transmit stream to file."), wxEmptyString, wxITEM_NORMAL);
- #ifdef __WXMSW__
- m_menuItemCaptTxStream->SetBitmaps(wxNullBitmap);
- #elif defined(__WXGTK__)
- m_menuItemCaptTxStream->SetBitmap(wxNullBitmap);
- #endif
- tools->Append(m_menuItemCaptTxStream);
-*/
+
+ wxMenuItem* m_menuItemCaptRxInStream;
+ m_menuItemCaptRxInStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Rx Input Stream")) + wxT('\t') + wxT("Capture receive input stream to file."), wxEmptyString, wxITEM_NORMAL);
+#ifdef __WXMSW__
+ m_menuItemCaptRxInStream->SetBitmaps(wxNullBitmap);
+#elif defined(__WXGTK__)
+ m_menuItemCaptRxInStream->SetBitmap(wxNullBitmap);
+#endif
+ tools->Append(m_menuItemCaptRxInStream);
+
+ wxMenuItem* m_menuItemCaptTxInStream;
+ m_menuItemCaptTxInStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Tx Input Stream")) + wxT('\t') + wxT("Capture transmit input stream to file."), wxEmptyString, wxITEM_NORMAL);
+#ifdef __WXMSW__
+ m_menuItemCaptTxInStream->SetBitmaps(wxNullBitmap);
+#elif defined(__WXGTK__)
+ m_menuItemCaptTxInStream->SetBitmap(wxNullBitmap);
+#endif
+ tools->Append(m_menuItemCaptTxInStream);
+
+ wxMenuItem* m_menuItemCaptRxOutStream;
+ m_menuItemCaptRxOutStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Rx Output Stream")) + wxT('\t') + wxT("Capture receive output stream to file."), wxEmptyString, wxITEM_NORMAL);
+#ifdef __WXMSW__
+ m_menuItemCaptRxOutStream->SetBitmaps(wxNullBitmap);
+#elif defined(__WXGTK__)
+ m_menuItemCaptRxOutStream->SetBitmap(wxNullBitmap);
+#endif
+ tools->Append(m_menuItemCaptRxOutStream);
+
+ wxMenuItem* m_menuItemCaptTxOutStream;
+ m_menuItemCaptTxOutStream = new wxMenuItem(tools, wxID_ANY, wxString(_("Capture Tx Output Stream")) + wxT('\t') + wxT("Capture transmit output stream to file."), wxEmptyString, wxITEM_NORMAL);
+#ifdef __WXMSW__
+ m_menuItemCaptTxOutStream->SetBitmaps(wxNullBitmap);
+#elif defined(__WXGTK__)
+ m_menuItemCaptTxOutStream->SetBitmap(wxNullBitmap);
+#endif
+ tools->Append(m_menuItemCaptTxOutStream);
+
tools->AppendSeparator();
wxMenuItem* m_menuItemPlayAudioFile;
wxStaticBoxSizer* snrSizer;
snrSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("SNR")), wxVERTICAL);
- m_gaugeSNR = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
+ //------------------------------
+ // S/N ratio Guage (vert. bargraph)
+ //------------------------------
+ m_gaugeSNR = new wxGauge(this, wxID_ANY, 20, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
m_gaugeSNR->SetToolTip(_("Display signal to noise ratio."));
-
snrSizer->Add(m_gaugeSNR, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
-
wxBoxSizer* bSizer29;
bSizer29 = new wxBoxSizer(wxVERTICAL);
+ //------------------------------
+ // Box for S/N ratio (Numeric)
+ //------------------------------
m_textSNR = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxPoint(-1,-1), wxSize(35,25), wxTE_READONLY);
m_textSNR->SetToolTip(_("Show S/N ratio numerically."));
m_textSNR->SetMinSize(wxSize(35,25));
leftSizer->Add(snrSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1);
wxStaticBoxSizer* levelSizer;
levelSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Level")), wxVERTICAL);
+
+ //------------------------------
+ // Signal Level(vert. bargraph)
+ //------------------------------
m_gaugeLevel = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxSize(15,135), wxGA_SMOOTH|wxGA_VERTICAL);
m_gaugeLevel->SetToolTip(_("Display signal level."));
levelSizer->Add(m_gaugeLevel, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);
wxBoxSizer* upperSizer;
upperSizer = new wxBoxSizer(wxVERTICAL);
+ //=====================================================
+ // Tabbed Notebppk control containing dispalay graphs
+ //=====================================================
//m_auiNbookCtrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM|wxAUI_NB_DEFAULT_STYLE);
//long style = wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ACTIVE_TAB | wxAUI_NB_MIDDLE_CLICK_CLOSE;
long nb_style = wxAUI_NB_BOTTOM | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS;
m_auiNbookCtrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, nb_style);
- m_auiNbookCtrl->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
+ // This line sets the fontsize for the tabs on the notebook control
+ m_auiNbookCtrl->SetFont(wxFont(8, 70, 90, 90, false, wxEmptyString));
+
upperSizer->Add(m_auiNbookCtrl, 1, wxALIGN_TOP|wxEXPAND, 1);
centerSizer->Add(upperSizer, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxEXPAND, 0);
wxBoxSizer* lowerSizer;
lowerSizer->Add(bSizer15, 1, wxEXPAND, 5);
wxBoxSizer* bSizer141;
bSizer141 = new wxBoxSizer(wxHORIZONTAL);
+
+ //=====================================================
+ // These are the buttons that autosend the userid (?)
+ //=====================================================
+
+ // RxID
+ //---------
m_togRxID = new wxToggleButton(this, wxID_ANY, _("RxID"), wxDefaultPosition, wxDefaultSize, 0);
bSizer141->Add(m_togRxID, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL|wxFIXED_MINSIZE, 5);
+ // TxID
+ //---------
m_togTxID = new wxToggleButton(this, wxID_ANY, _("TxID"), wxDefaultPosition, wxDefaultSize, 0);
bSizer141->Add(m_togTxID, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
lowerSizer->Add(bSizer141, 0, wxALIGN_RIGHT, 5);
centerSizer->Add(lowerSizer, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 2);
bSizer1->Add(centerSizer, 4, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 1);
sbSizer5 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Control")), wxVERTICAL);
wxBoxSizer* bSizer1511;
bSizer1511 = new wxBoxSizer(wxVERTICAL);
+
+ //-------------------------------
+ // Begin/End receiving data
+ //-------------------------------
m_togBtnOnOff = new wxToggleButton(this, wxID_ANY, _("Start"), wxDefaultPosition, wxDefaultSize, 0);
m_togBtnOnOff->SetToolTip(_("Begin/End receiving data."));
bSizer1511->Add(m_togBtnOnOff, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
//------------------------------
wxBoxSizer* bSizer15113;
bSizer15113 = new wxBoxSizer(wxHORIZONTAL);
-
wxBoxSizer* bSizer15111;
bSizer15111 = new wxBoxSizer(wxVERTICAL);
-
wxSize wxSz = wxSize(44, 30);
-
m_togBtnLoopRx = new wxToggleButton(this, wxID_ANY, _("Loop\nRX"), wxDefaultPosition, wxSz, 0);
m_togBtnLoopRx->SetFont(wxFont(6, 70, 90, 90, false, wxEmptyString));
m_togBtnLoopRx->SetToolTip(_("Loopback Receive audio data."));
//------------------------------
wxBoxSizer* bSizer15112;
bSizer15112 = new wxBoxSizer(wxVERTICAL);
-
m_togBtnLoopTx = new wxToggleButton(this, wxID_ANY, _("Loop\nTX"), wxDefaultPosition, wxSz, 0);
m_togBtnLoopTx->SetFont(wxFont(6, 70, 90, 90, false, wxEmptyString));
m_togBtnLoopTx->SetToolTip(_("Loopback Transmit audio data."));
bSizer13->Add(m_togBtnAnalog, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
sbSizer5->Add(bSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
+ //------------------------------
+ // Toggle for ALC
+ //------------------------------
wxBoxSizer* bSizer14;
bSizer14 = new wxBoxSizer(wxVERTICAL);
m_togBtnALC = new wxToggleButton(this, wxID_ANY, _("ALC"), wxDefaultPosition, wxDefaultSize, 0);
wxBoxSizer* bSizer11;
bSizer11 = new wxBoxSizer(wxVERTICAL);
+ //------------------------------
+ // Toggle Transmit/Receive relays
+ //------------------------------
m_btnTogTX = new wxToggleButton(this, wxID_ANY, _("TX"), wxDefaultPosition, wxDefaultSize, 0);
m_btnTogTX->SetToolTip(_("Switch between Receive and Transmit"));
bSizer11->Add(m_btnTogTX, 1, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1);
}
-DlgAudio::DlgAudio(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
-{
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
-
- wxBoxSizer* bSizer32;
- bSizer32 = new wxBoxSizer(wxVERTICAL);
-
- m_nbAudioOptions = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
- m_panelDevices = new wxPanel(m_nbAudioOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
- wxBoxSizer* bSizer34;
- bSizer34 = new wxBoxSizer(wxVERTICAL);
-
- wxStaticBoxSizer* sbSizer10;
- sbSizer10 = new wxStaticBoxSizer(new wxStaticBox(m_panelDevices, wxID_ANY, _("PortAudio")), wxHORIZONTAL);
-
- wxBoxSizer* bSizer41;
- bSizer41 = new wxBoxSizer(wxHORIZONTAL);
-
- wxGridSizer* gSizer6;
- gSizer6 = new wxGridSizer(3, 1, 0, 0);
-
- gSizer6->SetMinSize(wxSize(115,-1));
- m_radioBtnPortAudio = new wxRadioButton(m_panelDevices, wxID_ANY, _("PortAudio"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
- m_radioBtnPortAudio->SetValue(true);
- gSizer6->Add(m_radioBtnPortAudio, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- wxGridSizer* gSizer51;
- gSizer51 = new wxGridSizer(2, 2, 0, 0);
-
- gSizer51->SetMinSize(wxSize(110,-1));
- m_staticText151 = new wxStaticText(m_panelDevices, wxID_ANY, _("# Ch Out:"), wxDefaultPosition, wxSize(80,-1), wxALIGN_RIGHT);
- m_staticText151->Wrap(-1);
- m_staticText151->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_staticText151->SetMinSize(wxSize(80,-1));
- m_staticText151->SetMaxSize(wxSize(80,-1));
-
- gSizer51->Add(m_staticText151, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND, 5);
-
- m_textNumChOut = new wxTextCtrl(m_panelDevices, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), wxTE_READONLY);
- m_textNumChOut->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_textNumChOut->SetMinSize(wxSize(30,-1));
- m_textNumChOut->SetMaxSize(wxSize(30,-1));
-
- gSizer51->Add(m_textNumChOut, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxALL, 5);
-
- m_staticText141 = new wxStaticText(m_panelDevices, wxID_ANY, _("# Ch In:"), wxDefaultPosition, wxSize(80,-1), wxALIGN_RIGHT);
- m_staticText141->Wrap(-1);
- m_staticText141->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_staticText141->SetMinSize(wxSize(80,-1));
- m_staticText141->SetMaxSize(wxSize(90,-1));
-
- gSizer51->Add(m_staticText141, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND, 5);
-
- m_textNumChIn = new wxTextCtrl(m_panelDevices, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), wxTE_READONLY);
- m_textNumChIn->SetFont(wxFont(7, 70, 90, 90, false, wxEmptyString));
- m_textNumChIn->SetMinSize(wxSize(30,-1));
- m_textNumChIn->SetMaxSize(wxSize(30,-1));
-
- gSizer51->Add(m_textNumChIn, 0, wxALL, 4);
-
-
- gSizer6->Add(gSizer51, 0, wxEXPAND, 5);
-
-
- bSizer41->Add(gSizer6, 0, wxALL, 5);
-
- wxGridSizer* gSizer7;
- gSizer7 = new wxGridSizer(4, 2, 0, 0);
-
- m_staticText14 = new wxStaticText(m_panelDevices, wxID_ANY, _("Audio in (mic) -> codec:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText14->Wrap(-1);
- gSizer7->Add(m_staticText14, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboAudioCodec = new wxComboBox(m_panelDevices, wxID_ANY, _("<default>"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboAudioCodec, 1, wxALL, 5);
-
- m_staticText15 = new wxStaticText(m_panelDevices, wxID_ANY, _("codec -> Radio Tx:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText15->Wrap(-1);
- gSizer7->Add(m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboCodecTx = new wxComboBox(m_panelDevices, wxID_ANY, _("<default>"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboCodecTx, 1, wxALL, 5);
-
- m_staticText16 = new wxStaticText(m_panelDevices, wxID_ANY, _("Radio Rx -> codec:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText16->Wrap(-1);
- gSizer7->Add(m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboRadioRx = new wxComboBox(m_panelDevices, wxID_ANY, _("<default>"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboRadioRx, 1, wxALL, 5);
-
- m_staticText17 = new wxStaticText(m_panelDevices, wxID_ANY, _("codec -> Audio out (spkr):"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT|wxST_NO_AUTORESIZE);
- m_staticText17->Wrap(-1);
- gSizer7->Add(m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5);
-
- m_comboCodecSpkr = new wxComboBox(m_panelDevices, wxID_ANY, _("<default>"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0);
- gSizer7->Add(m_comboCodecSpkr, 0, wxALL, 5);
-
-
- bSizer41->Add(gSizer7, 0, wxALL|wxEXPAND, 5);
-
-
- sbSizer10->Add(bSizer41, 1, wxEXPAND, 5);
-
-
- bSizer34->Add(sbSizer10, 1, wxEXPAND, 5);
-
- wxStaticBoxSizer* sbSizer11;
- sbSizer11 = new wxStaticBoxSizer(new wxStaticBox(m_panelDevices, wxID_ANY, _("File I/O")), wxHORIZONTAL);
-
- wxBoxSizer* bSizer38;
- bSizer38 = new wxBoxSizer(wxVERTICAL);
-
- m_radioBtnFileOnly = new wxRadioButton(m_panelDevices, wxID_ANY, _("File Only"), wxDefaultPosition, wxDefaultSize, 0);
- bSizer38->Add(m_radioBtnFileOnly, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
-
- sbSizer11->Add(bSizer38, 0, wxEXPAND, 5);
-
- wxBoxSizer* bSizer45;
- bSizer45 = new wxBoxSizer(wxVERTICAL);
-
-
- sbSizer11->Add(bSizer45, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer46;
- bSizer46 = new wxBoxSizer(wxVERTICAL);
-
-
- sbSizer11->Add(bSizer46, 1, wxEXPAND, 5);
-
-
- bSizer34->Add(sbSizer11, 1, wxEXPAND, 5);
-
-
- m_panelDevices->SetSizer(bSizer34);
- m_panelDevices->Layout();
- bSizer34->Fit(m_panelDevices);
- m_nbAudioOptions->AddPage(m_panelDevices, _("Devices"), true);
- m_panelSettings = new wxPanel(m_nbAudioOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
- wxBoxSizer* bSizer27;
- bSizer27 = new wxBoxSizer(wxVERTICAL);
-
- wxBoxSizer* bSizer271;
- bSizer271 = new wxBoxSizer(wxHORIZONTAL);
-
- wxStaticBoxSizer* sbSizer6;
- sbSizer6 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Rx Input")), wxVERTICAL);
-
- wxBoxSizer* bSizer31;
- bSizer31 = new wxBoxSizer(wxVERTICAL);
-
- m_lbRxInput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer31->Add(m_lbRxInput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textRxInput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer31->Add(m_textRxInput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer6->Add(bSizer31, 1, wxEXPAND, 6);
-
-
- bSizer271->Add(sbSizer6, 1, wxEXPAND, 5);
-
- wxStaticBoxSizer* sbSizer7;
- sbSizer7 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Tx Output")), wxVERTICAL);
-
- wxBoxSizer* bSizer281;
- bSizer281 = new wxBoxSizer(wxVERTICAL);
-
- m_lbTxOutput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer281->Add(m_lbTxOutput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textTxOutput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer281->Add(m_textTxOutput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer7->Add(bSizer281, 1, wxEXPAND, 5);
-
-
- bSizer271->Add(sbSizer7, 1, wxEXPAND, 6);
-
-
- bSizer27->Add(bSizer271, 1, wxEXPAND, 5);
-
- wxBoxSizer* bSizer26;
- bSizer26 = new wxBoxSizer(wxHORIZONTAL);
-
- wxStaticBoxSizer* sbSizer8;
- sbSizer8 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Voice Input")), wxVERTICAL);
-
- wxBoxSizer* bSizer29;
- bSizer29 = new wxBoxSizer(wxVERTICAL);
-
- m_lbVoiceInput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer29->Add(m_lbVoiceInput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textVoiceInput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer29->Add(m_textVoiceInput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer8->Add(bSizer29, 1, wxEXPAND, 5);
-
-
- bSizer26->Add(sbSizer8, 1, wxEXPAND, 6);
-
- wxStaticBoxSizer* sbSizer9;
- sbSizer9 = new wxStaticBoxSizer(new wxStaticBox(m_panelSettings, wxID_ANY, _("Voice Output")), wxVERTICAL);
-
- wxBoxSizer* bSizer30;
- bSizer30 = new wxBoxSizer(wxVERTICAL);
-
- m_lbVoiceOutput = new wxListBox(m_panelSettings, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_SINGLE);
- bSizer30->Add(m_lbVoiceOutput, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 2);
-
- m_textVoiceOutput = new wxTextCtrl(m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- bSizer30->Add(m_textVoiceOutput, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 2);
-
-
- sbSizer9->Add(bSizer30, 1, wxEXPAND, 1);
-
-
- bSizer26->Add(sbSizer9, 1, wxEXPAND, 6);
-
-
- bSizer27->Add(bSizer26, 1, wxEXPAND, 1);
-
-
- m_panelSettings->SetSizer(bSizer27);
- m_panelSettings->Layout();
- bSizer27->Fit(m_panelSettings);
- m_nbAudioOptions->AddPage(m_panelSettings, _("Settings"), false);
-
- bSizer32->Add(m_nbAudioOptions, 1, wxEXPAND | wxALL, 1);
-
- wxBoxSizer* bSizer28;
- bSizer28 = new wxBoxSizer(wxVERTICAL);
-
- m_sdbSizer3 = new wxStdDialogButtonSizer();
- m_sdbSizer3OK = new wxButton(this, wxID_OK);
- m_sdbSizer3->AddButton(m_sdbSizer3OK);
- m_sdbSizer3Apply = new wxButton(this, wxID_APPLY);
- m_sdbSizer3->AddButton(m_sdbSizer3Apply);
- m_sdbSizer3Cancel = new wxButton(this, wxID_CANCEL);
- m_sdbSizer3->AddButton(m_sdbSizer3Cancel);
- m_sdbSizer3->Realize();
-
- bSizer28->Add(m_sdbSizer3, 1, wxEXPAND, 5);
-
-
- bSizer32->Add(bSizer28, 0, wxEXPAND, 5);
-
-
- bSizer32->Add(0, 15, 0, wxEXPAND, 5);
-
-
- this->SetSizer(bSizer32);
- this->Layout();
-
- this->Centre(wxBOTH);
- this->Centre(wxBOTH);
-
- // Connect Events
- this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAudio::OnClose));
- this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAudio::OnInitDialog));
- m_lbRxInput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnRxInputSelect), NULL, this);
- m_lbTxOutput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnTxOutputSelect), NULL, this);
- m_lbVoiceInput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceInputSelect), NULL, this);
- m_lbVoiceOutput->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceOutputSelect), NULL, this);
- m_sdbSizer3Apply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnApply), NULL, this);
- m_sdbSizer3Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnCancel), NULL, this);
- m_sdbSizer3OK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnOK), NULL, this);
-}
-
-DlgAudio::~DlgAudio()
-{
- // Disconnect Events
- this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(DlgAudio::OnClose));
- this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgAudio::OnInitDialog));
- m_lbRxInput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnRxInputSelect), NULL, this);
- m_lbTxOutput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnTxOutputSelect), NULL, this);
- m_lbVoiceInput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceInputSelect), NULL, this);
- m_lbVoiceOutput->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(DlgAudio::OnVoiceOutputSelect), NULL, this);
- m_sdbSizer3Apply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnApply), NULL, this);
- m_sdbSizer3Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnCancel), NULL, this);
- m_sdbSizer3OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgAudio::OnOK), NULL, this);
-
-}
-
DlgOptions::DlgOptions(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
{
this->SetSizeHints(wxDefaultSize, wxDefaultSize);
}
-DlgComPorts::DlgComPorts(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
-{
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
- this->SetSizeHints(wxDefaultSize, wxDefaultSize);
-
- wxBoxSizer* bSizer30;
- bSizer30 = new wxBoxSizer(wxVERTICAL);
-
- wxGridSizer* gSizer3;
- gSizer3 = new wxGridSizer(6, 2, 0, 0);
-
- m_staticText8 = new wxStaticText(this, wxID_ANY, _("Available Ports:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText8->Wrap(-1);
- gSizer3->Add(m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_listCtrlPortSelect = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ICON|wxLC_SINGLE_SEL);
- gSizer3->Add(m_listCtrlPortSelect, 2, wxALL|wxEXPAND, 2);
-
- m_staticText9 = new wxStaticText(this, wxID_ANY, _("Use Port:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText9->Wrap(-1);
- gSizer3->Add(m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlPort = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlPort, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText91 = new wxStaticText(this, wxID_ANY, _("Buad Rate:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText91->Wrap(-1);
- gSizer3->Add(m_staticText91, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlBaud = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlBaud, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText911 = new wxStaticText(this, wxID_ANY, _("Data Bits:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText911->Wrap(-1);
- gSizer3->Add(m_staticText911, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlDatabits = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlDatabits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText912 = new wxStaticText(this, wxID_ANY, _("Stop Bits:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText912->Wrap(-1);
- gSizer3->Add(m_staticText912, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlStopbits = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlStopbits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
- m_staticText913 = new wxStaticText(this, wxID_ANY, _("Parity:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
- m_staticText913->Wrap(-1);
- gSizer3->Add(m_staticText913, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2);
-
- m_textRigCtrlParity = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
- gSizer3->Add(m_textRigCtrlParity, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2);
-
-
- bSizer30->Add(gSizer3, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5);
-
- m_sdbSizer5 = new wxStdDialogButtonSizer();
- m_sdbSizer5OK = new wxButton(this, wxID_OK);
- m_sdbSizer5->AddButton(m_sdbSizer5OK);
- m_sdbSizer5Apply = new wxButton(this, wxID_APPLY);
- m_sdbSizer5->AddButton(m_sdbSizer5Apply);
- m_sdbSizer5Cancel = new wxButton(this, wxID_CANCEL);
- m_sdbSizer5->AddButton(m_sdbSizer5Cancel);
- m_sdbSizer5->Realize();
-
- bSizer30->Add(m_sdbSizer5, 0, wxEXPAND, 5);
-
-
- this->SetSizer(bSizer30);
- this->Layout();
-
- this->Centre(wxBOTH);
- this->Centre(wxBOTH);
-
- // Connect Events
- this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgComPorts::OnInitDialog));
- m_sdbSizer5Apply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnApply), NULL, this);
- m_sdbSizer5Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnCancel), NULL, this);
- m_sdbSizer5OK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnOK), NULL, this);
- m_listCtrlPortSelect->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(DlgComPorts::OnListItemSelected), NULL, this);
-}
-
-DlgComPorts::~DlgComPorts()
-{
- // Disconnect Events
- this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(DlgComPorts::OnInitDialog));
- m_listCtrlPortSelect->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(DlgComPorts::OnListItemSelected), NULL, this);
- m_sdbSizer5Apply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnApply), NULL, this);
- m_sdbSizer5Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnCancel), NULL, this);
- m_sdbSizer5OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(DlgComPorts::OnOK), NULL, this);
-}