From: wittend99 Date: Wed, 19 Sep 2012 17:11:30 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@730 01035d8c-6547-0410-b346-abe4f9... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=a3ce54c97b097e0ad67f3e67d5198646c1fa8e30;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@730 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/build/fdmdv2.mk b/fdmdv2/build/fdmdv2.mk index 0f10b717..875d7123 100644 --- a/fdmdv2/build/fdmdv2.mk +++ b/fdmdv2/build/fdmdv2.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=OFA-Staff -Date :=9/17/2012 +Date :=9/19/2012 CodeLitePath :="C:\bin\CodeLite" LinkerName :=g++ SharedObjectLinkerName :=g++ -shared -fPIC diff --git a/fdmdv2/build/fdmdv2.workspace b/fdmdv2/build/fdmdv2.workspace index 39870050..2f417639 100644 --- a/fdmdv2/build/fdmdv2.workspace +++ b/fdmdv2/build/fdmdv2.workspace @@ -2,14 +2,17 @@ + + - + + diff --git a/fdmdv2/src/FDMDV2.fbp b/fdmdv2/src/FDMDV2.fbp index 87141674..960234fa 100644 --- a/fdmdv2/src/FDMDV2.fbp +++ b/fdmdv2/src/FDMDV2.fbp @@ -17,7 +17,7 @@ 1 fdmdv2 - C:\Users\wittend\Projects\Radio\fdmdv2 + C:\bin\Projects\Radio\fdmdv2\src 1 1 @@ -25,62 +25,27 @@ 0 1 - 1 - 1 - 1 - 1 - 0 - - - - wxSYS_COLOUR_3DLIGHT - - 1 - 0 - 1 1 - 0 - Dock - 0 - Left 1 impl_virtual wxSYS_COLOUR_WINDOWTEXT - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 TopFrame - 1 - - - 1 - Resizable - 1 761,500 wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER FDMDV2 - 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -121,59 +86,24 @@ topFrame_OnSize topFrame_OnUpdateUI - 1 - 1 - 1 - 1 - - main_manu - - - - - 1 - 0 - 1 1 - 0 - Dock - 0 - Left 1 - 1 - 0 0 wxID_ANY MyMenuBar - - 0 - - 0 - 1 m_menubarMain - 1 - - protected - 1 - Resizable - 1 wxMB_DOCKABLE - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -851,10 +781,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -1931,59 +1857,24 @@ - 1 - 1 - 1 - 1 - - - - - - - 1 - 0 - 1 1 - 0 - Dock - 0 - Left 1 3 - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 m_statusBar1 - 1 - - protected - 1 - Resizable - 1 wxST_SIZEGRIP - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2013,62 +1904,27 @@ - 1 - 1 - 1 - 1 - 0 - - - - - - 1 wxBOTH - 0 - 1 1 - 0 - Dock - 0 - Left 1 impl_virtual - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 DlgAbout - 1 - - - 1 - Resizable - 1 352,343 wxDEFAULT_DIALOG_STYLE ; About FDMDV2 - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2193,10 +2049,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2290,10 +2142,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2532,63 +2380,28 @@ - - 1 - 1 - 1 - 1 - + 0 - - - - - - 1 wxBOTH - 0 - 1 1 - 0 - Dock - 0 - Left 1 impl_virtual - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 DlgAudio - 1 - - - 1 - Resizable - 1 555,419 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Audio Options - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2628,16 +2441,16 @@ - + bSizer32 wxVERTICAL none - + 1 wxEXPAND | wxALL 1 - + 1 1 1 @@ -2687,10 +2500,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -2771,10 +2580,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -2993,10 +2798,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3171,10 +2972,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3365,10 +3162,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3543,10 +3336,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3721,10 +3510,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -3899,10 +3684,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -4219,10 +4000,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - wxTAB_TRAVERSAL @@ -4616,7 +4393,7 @@ 0 1 - m_textCtrl15 + m_textTxOutput 1 @@ -5095,103 +4872,13 @@ - - - Right Channel - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_panelRightChannel - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer36 - wxVERTICAL - none - - - - + 5 wxEXPAND 0 - + bSizer28 wxVERTICAL @@ -5237,62 +4924,27 @@ - 1 - 1 - 1 - 1 - 0 - - - - - - 1 wxBOTH - 0 - 1 1 - 0 - Dock - 0 - Left 1 impl_virtual - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 DlgOptions - 1 - - - 1 - Resizable - 1 332,364 wxDEFAULT_DIALOG_STYLE Program Options - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5415,10 +5067,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5593,10 +5241,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5771,10 +5415,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -5949,10 +5589,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6127,10 +5763,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6305,10 +5937,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6462,62 +6090,27 @@ - 1 - 1 - 1 - 1 - 0 - - - - - - 1 wxBOTH - 0 - 1 1 - 0 - Dock - 0 - Left 1 impl_virtual - 1 - 0 0 wxID_ANY - - 0 - - 0 - 1 DlgComPorts - 1 - - - 1 - Resizable - 1 - 399,226 + 399,354 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Select Com Port - 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6572,10 +6165,10 @@ gSizer3 none - 2 + 6 0 - 5 + 2 wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL 0 @@ -6628,10 +6221,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6662,9 +6251,9 @@ - 5 + 2 wxALL|wxEXPAND - 1 + 2 1 1 @@ -6767,9 +6356,9 @@ - 5 + 2 wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 + 1 1 1 @@ -6820,10 +6409,6 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -6854,7 +6439,7 @@ - 5 + 2 wxALIGN_CENTER_VERTICAL|wxALL 1 @@ -6893,7 +6478,7 @@ 0 1 - m_textCtrl10 + m_textRigCtrlPort 1 @@ -6944,14 +6529,710 @@ - - - - 5 - wxEXPAND - 0 - - 0 + + 2 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Buad Rate: + + 0 + + + 0 + + 1 + m_staticText91 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textRigCtrlBaud + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Data Bits: + + 0 + + + 0 + + 1 + m_staticText911 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textRigCtrlDatabits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Stop Bits: + + 0 + + + 0 + + 1 + m_staticText912 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textRigCtrlStopbits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Parity: + + 0 + + + 0 + + 1 + m_staticText913 + 1 + + + protected + 1 + + Resizable + 1 + + wxALIGN_RIGHT + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textRigCtrlParity + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 1 1 0 0 diff --git a/fdmdv2/src/dlg_about.cpp b/fdmdv2/src/dlg_about.cpp index b9e77a31..b3b5266b 100644 --- a/fdmdv2/src/dlg_about.cpp +++ b/fdmdv2/src/dlg_about.cpp @@ -19,3 +19,45 @@ void AboutDlg::OnInitDialog( wxInitDialogEvent& event ) { // TODO: Implement OnInitDialog } + +//------------------------------------------------------------------------- +// ExchangeData() +//------------------------------------------------------------------------- +void AboutDlg::ExchangeData(int inout) +{ +// wxConfigBase *pConfig = wxConfigBase::Get(); + if(inout == EXCHANGE_DATA_IN) + { +// m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort); +// m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud); +// m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits); +// m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits); +// m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity); + } + if(inout == EXCHANGE_DATA_OUT) + { +// wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue(); +// wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue(); +// wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue(); +// wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue(); +// wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue(); + +// pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort); +// pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud); +// pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits); +// pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits); +// pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity); + +// pConfig->Flush(); + } +// delete wxConfigBase::Set((wxConfigBase *) NULL); +} + +//------------------------------------------------------------------------- +// OnOK() +//------------------------------------------------------------------------- +void AboutDlg::OnOK( wxCommandEvent& event ) +{ + this->EndModal(wxID_OK); +} + diff --git a/fdmdv2/src/dlg_about.h b/fdmdv2/src/dlg_about.h index d434ea3f..563428a6 100644 --- a/fdmdv2/src/dlg_about.h +++ b/fdmdv2/src/dlg_about.h @@ -12,7 +12,7 @@ #ifndef __ABOUT_DIALOG__ #define __ABOUT_DIALOG__ -#include "topFrame.h" +#include "fdmdv2_main.h" class AboutDlg : public DlgAbout { @@ -23,6 +23,8 @@ class AboutDlg : public DlgAbout public: /** Constructor */ AboutDlg( wxWindow* parent ); + void ExchangeData(int inout); + void OnOK( wxCommandEvent& event ); }; diff --git a/fdmdv2/src/dlg_audio.cpp b/fdmdv2/src/dlg_audio.cpp index e7870224..8b732b70 100644 --- a/fdmdv2/src/dlg_audio.cpp +++ b/fdmdv2/src/dlg_audio.cpp @@ -16,7 +16,6 @@ //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= AudioDlg::AudioDlg( wxWindow* parent ) : DlgAudio( parent ) { - } //------------------------------------------------------------------------- @@ -24,7 +23,7 @@ AudioDlg::AudioDlg( wxWindow* parent ) : DlgAudio( parent ) //------------------------------------------------------------------------- void AudioDlg::OnCancel( wxCommandEvent& event ) { - this->EndModal(wxID_OK); + this->EndModal(wxID_CANCEL); } //------------------------------------------------------------------------- @@ -40,7 +39,7 @@ void AudioDlg::OnOK( wxCommandEvent& event ) //------------------------------------------------------------------------- void AudioDlg::OnApply( wxCommandEvent& event ) { - this->EndModal(wxID_OK); + ExchangeData(EXCHANGE_DATA_OUT); } //------------------------------------------------------------------------- @@ -56,10 +55,40 @@ void AudioDlg::OnClose( wxCloseEvent& event ) //------------------------------------------------------------------------- void AudioDlg::OnInitDialog( wxInitDialogEvent& event ) { - //wxMessageBox(wxT("got OnInitDialog()"), wxT("Select"), wxOK); + 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() //------------------------------------------------------------------------- diff --git a/fdmdv2/src/dlg_audio.h b/fdmdv2/src/dlg_audio.h index d994d6bb..d62593e0 100644 --- a/fdmdv2/src/dlg_audio.h +++ b/fdmdv2/src/dlg_audio.h @@ -12,8 +12,7 @@ #ifndef __AUDIO_DIALOG__ #define __AUDIO_DIALOG__ -#include -#include "topFrame.h" +#include "fdmdv2_main.h" #include "portaudio.h" #include "portaudiocpp/PortAudioCpp.hxx" @@ -42,6 +41,7 @@ class AudioDlg : public DlgAudio void OnTxOutputSelect( wxCommandEvent& event ); void OnVoiceInputSelect( wxCommandEvent& event ); void OnVoiceOutputSelect( wxCommandEvent& event ); + void ExchangeData(int inout); }; #endif // __AUDIO_DIALOG__ diff --git a/fdmdv2/src/dlg_comports.cpp b/fdmdv2/src/dlg_comports.cpp index df73ae68..e89adb57 100644 --- a/fdmdv2/src/dlg_comports.cpp +++ b/fdmdv2/src/dlg_comports.cpp @@ -16,7 +16,86 @@ ComPortsDlg::ComPortsDlg( wxWindow* parent ) : DlgComPorts( parent ) { } +//------------------------------------------------------------------------- +// OnListItemSelected() +//------------------------------------------------------------------------- void ComPortsDlg::OnListItemSelected( wxListEvent& event ) { // TODO: Implement OnListItemSelected } + +//------------------------------------------------------------------------- +// ExchangeData() +//------------------------------------------------------------------------- +void ComPortsDlg::ExchangeData(int inout) +{ + wxConfigBase *pConfig = wxConfigBase::Get(); + if(inout == EXCHANGE_DATA_IN) + { + m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort); + m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud); + m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits); + m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits); + m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity); + } + if(inout == EXCHANGE_DATA_OUT) + { + wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue(); + wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue(); + wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue(); + wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue(); + wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue(); + + pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort); + pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud); + pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits); + pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits); + pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity); + //m_textRigCtrlFlowControl + + pConfig->Flush(); + } + delete wxConfigBase::Set((wxConfigBase *) NULL); +} + +//------------------------------------------------------------------------- +// OnCancel() +//------------------------------------------------------------------------- +void ComPortsDlg::OnCancel( wxCommandEvent& event ) +{ + this->EndModal(wxID_CANCEL); +} + +//------------------------------------------------------------------------- +// OnOK() +//------------------------------------------------------------------------- +void ComPortsDlg::OnOK( wxCommandEvent& event ) +{ + this->EndModal(wxID_OK); +} + +//------------------------------------------------------------------------- +// OnApply() +//------------------------------------------------------------------------- +void ComPortsDlg::OnApply( wxCommandEvent& event ) +{ + ExchangeData(EXCHANGE_DATA_OUT); +} + +//------------------------------------------------------------------------- +// OnClose() +//------------------------------------------------------------------------- +void ComPortsDlg::OnClose( wxCloseEvent& event ) +{ + this->EndModal(wxID_OK); +} + +//------------------------------------------------------------------------- +// OnInitDialog() +//------------------------------------------------------------------------- +void ComPortsDlg::OnInitDialog( wxInitDialogEvent& event ) +{ + ExchangeData(EXCHANGE_DATA_IN); +// populateAudioInfo(); +} + diff --git a/fdmdv2/src/dlg_comports.h b/fdmdv2/src/dlg_comports.h index c9b82a49..3e949b04 100644 --- a/fdmdv2/src/dlg_comports.h +++ b/fdmdv2/src/dlg_comports.h @@ -10,19 +10,27 @@ #ifndef __COMPORTS_DIALOG__ #define __COMPORTS_DIALOG__ -#include "topFrame.h" +#include "fdmdv2_main.h" //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= // Class ComPortsDlg //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= class ComPortsDlg : public DlgComPorts { - protected: - // Handlers for events. - void OnListItemSelected( wxListEvent& event ); public: /** Constructor */ ComPortsDlg( wxWindow* parent ); + void ExchangeData(int inout); + + protected: + // Handlers for events. + void OnListItemSelected( wxListEvent& event ); + void OnCancel( wxCommandEvent& event ); + void OnOK( wxCommandEvent& event ); + void OnClose( wxCloseEvent& event ); + void OnInitDialog( wxInitDialogEvent& event ); + void OnApply( wxCommandEvent& event ); + }; #endif // __COMPORTS_DIALOG__ diff --git a/fdmdv2/src/dlg_options.cpp b/fdmdv2/src/dlg_options.cpp index 77d3ec20..ecfcdfc6 100644 --- a/fdmdv2/src/dlg_options.cpp +++ b/fdmdv2/src/dlg_options.cpp @@ -18,12 +18,74 @@ OptionsDlg::OptionsDlg( wxWindow* parent ) : DlgOptions( parent ) { } +//------------------------------------------------------------------------- +// OnClose() +//------------------------------------------------------------------------- void OptionsDlg::OnClose( wxCloseEvent& event ) { -// TODO: Implement OnClose } +//------------------------------------------------------------------------- +// OnInitDialog() +//------------------------------------------------------------------------- void OptionsDlg::OnInitDialog( wxInitDialogEvent& event ) { -// TODO: Implement OnInitDialog + ExchangeData(EXCHANGE_DATA_IN); +} + +//------------------------------------------------------------------------- +// ExchangeData() +//------------------------------------------------------------------------- +void OptionsDlg::ExchangeData(int inout) +{ +// wxConfigBase *pConfig = wxConfigBase::Get(); + if(inout == EXCHANGE_DATA_IN) + { +// m_textRigCtrlPort->SetValue(wxGetApp().m_strRigCtrlPort); +// m_textRigCtrlBaud->SetValue(wxGetApp().m_strRigCtrlBaud); +// m_textRigCtrlDatabits->SetValue(wxGetApp().m_strRigCtrlDatabits); +// m_textRigCtrlStopbits->SetValue(wxGetApp().m_strRigCtrlStopbits); +// m_textRigCtrlParity->SetValue(wxGetApp().m_strRigCtrlParity); + } + if(inout == EXCHANGE_DATA_OUT) + { +// wxGetApp().m_strRigCtrlPort = m_textRigCtrlPort->GetValue(); +// wxGetApp().m_strRigCtrlBaud = m_textRigCtrlBaud->GetValue(); +// wxGetApp().m_strRigCtrlDatabits = m_textRigCtrlDatabits->GetValue(); +// wxGetApp().m_strRigCtrlStopbits = m_textRigCtrlStopbits->GetValue(); +// wxGetApp().m_strRigCtrlParity = m_textRigCtrlParity->GetValue(); + +// pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort); +// pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud); +// pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits); +// pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits); +// pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity); + +// pConfig->Flush(); + } +// delete wxConfigBase::Set((wxConfigBase *) NULL); +} + +//------------------------------------------------------------------------- +// OnCancel() +//------------------------------------------------------------------------- +void OptionsDlg::OnCancel( wxCommandEvent& event ) +{ + this->EndModal(wxID_CANCEL); +} + +//------------------------------------------------------------------------- +// OnOK() +//------------------------------------------------------------------------- +void OptionsDlg::OnOK( wxCommandEvent& event ) +{ + this->EndModal(wxID_OK); +} + +//------------------------------------------------------------------------- +// OnApply() +//------------------------------------------------------------------------- +void OptionsDlg::OnApply( wxCommandEvent& event ) +{ + ExchangeData(EXCHANGE_DATA_OUT); } diff --git a/fdmdv2/src/dlg_options.h b/fdmdv2/src/dlg_options.h index 2d93eae9..0d30f3bc 100644 --- a/fdmdv2/src/dlg_options.h +++ b/fdmdv2/src/dlg_options.h @@ -12,7 +12,7 @@ #ifndef __OPTIONS_DIALOG__ #define __OPTIONS_DIALOG__ -#include "topFrame.h" +#include "fdmdv2_main.h" //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= // Class OptionsDlg @@ -26,6 +26,10 @@ class OptionsDlg : public DlgOptions public: /** Constructor */ OptionsDlg( wxWindow* parent ); + void ExchangeData(int inout); + void OnCancel( wxCommandEvent& event ); + void OnOK( wxCommandEvent& event ); + void OnApply( wxCommandEvent& event ); }; #endif // __OPTIONS_DIALOG__ diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index 0bbf15a9..d585f6bf 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -31,7 +31,6 @@ #define wxUSE_PCX 1 #define wxUSE_LIBTIFF 1 -//float av_mag[FDMDV_NSPEC]; // shared between a few classes // initialize the application IMPLEMENT_APP(MainApp); @@ -44,10 +43,19 @@ bool MainApp::OnInit() { return false; } - if(!loadConfig()) - { - wxMessageBox(wxT("Unable to open configuration data. Create New?"), wxT("Configuration"), wxYES_NO | wxCANCEL); - } + SetVendorName(wxT("CODEC2-Project")); + SetAppName(wxT("FDMDV2")); // not needed, it's the default value + + wxConfigBase *pConfig = wxConfigBase::Get(); + pConfig->SetRecordDefaults(); + + m_rTopWindow = wxRect(0, 0, 0, 0); + m_strRxInAudio.Empty(); + m_strRxOutAudio.Empty(); + m_textVoiceInput.Empty(); + m_textVoiceOutput.Empty(); + m_strSampleRate.Empty(); + m_strBitrate.Empty(); // Create the main application window MainFrame *frame = new MainFrame(NULL); SetTopWindow(frame); @@ -60,33 +68,11 @@ bool MainApp::OnInit() } //------------------------------------------------------------------------- -// loadConfig() +// OnExit() //------------------------------------------------------------------------- -bool MainApp::loadConfig() +int MainApp::OnExit() { - g_config = new wxConfig("FDMDV2"); - wxString str; - if(g_config->Read("LastPrompt", &str)) - { - // last prompt was found in the config file/registry and its value is - // now in str - // ... - } - else - { - // no last prompt... - } - // another example: using default values and the full path instead of just - // key name: if the key is not found , the value 17 is returned - long value = g_config->ReadLong("/LastRun/CalculatedValues/MaxValue", 17); - - // at the end of the program we would save everything back - g_config->Write("LastPrompt", str); - g_config->Write("/LastRun/CalculatedValues/MaxValue", value); - - // the changes will be written back automatically - delete g_config; - return true; + return 0; } //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= @@ -109,6 +95,15 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) { wxMessageBox(wxT("Port Audio failed to initialize"), wxT("Pa_Initialize"), wxOK); } + + tools->AppendSeparator(); + wxMenuItem* m_menuItemToolsConfigDelete; + m_menuItemToolsConfigDelete = new wxMenuItem( tools, wxID_ANY, wxString( _("&Delete stored config") ) , wxT("Delete config file/keys"), wxITEM_NORMAL ); + this->Connect( m_menuItemToolsConfigDelete->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnDeleteConfig)); + + tools->Append( m_menuItemToolsConfigDelete ); + + // Add Waterfall Plot window m_panelWaterfall = new PlotWaterfall((wxFrame*) m_auiNbookCtrl ); m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Waterfall"), true, wxNullBitmap ); @@ -126,17 +121,38 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) // Add generic plot window m_panelDefaultA = new PlotPanel((wxFrame*) m_auiNbookCtrl ); m_auiNbookCtrl->AddPage(m_panelDefaultA, _("Test A"), true, wxNullBitmap ); + + wxConfigBase *pConfig = wxConfigBase::Get(); + + // restore frame position and size + int x = pConfig->Read(wxT("/MainFrame/top"), 50); + int y = pConfig->Read(wxT("/MainFrame/left"), 50); + int w = pConfig->Read(wxT("/MainFrame/width"), 650); + int h = pConfig->Read(wxT("/MainFrame/height"), 400); + Move(x, y); + SetClientSize(w, h); + + wxGetApp().m_strRxInAudio = pConfig->Read(wxT("/Audio/RxIn"), wxT("")); + wxGetApp().m_strRxOutAudio = pConfig->Read(wxT("/Audio/RxOut"), wxT("")); + wxGetApp().m_textVoiceInput = pConfig->Read(wxT("/Audio/TxIn"), wxT("")); + wxGetApp().m_textVoiceOutput = pConfig->Read(wxT("/Audio/TxOut"), wxT("")); + wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000")); + wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000")); + wxGetApp().m_strSampleRate = pConfig->Read(wxT("/Audio/SampleRate"), wxT("48000")); + + wxGetApp().m_strRigCtrlPort = pConfig->Read("/Rig/Port", wxT("\\\\.\\com1")); + wxGetApp().m_strRigCtrlBaud = pConfig->Read("/Rig/Baud", wxT("9600")); + wxGetApp().m_strRigCtrlDatabits = pConfig->Read("/Rig/DataBits", wxT("8")); + wxGetApp().m_strRigCtrlStopbits = pConfig->Read("/Rig/StopBits", wxT("1")); + wxGetApp().m_strRigCtrlParity = pConfig->Read("/Rig/Parity", wxT("n")); + + pConfig->SetPath(wxT("/")); + #ifdef USE_TIMER m_rxPa = new PortAudioWrap(); - double f = 0.0; for(int i = 0; i < FDMDV_NSPEC; i++) { -// m_rxPa->m_av_mag[i] = sin(i) * 100.0; - f = ((double)i / M_PI); - f = sin(f); - f = 100 * f; -// f = f - 50; - m_rxPa->m_av_mag[i] = f; + m_rxPa->m_av_mag[i] = sin(((double)i / M_PI)) * 100.0; } Bind(wxEVT_TIMER, &MainFrame::OnTimer, this); // ID_MY_WINDOW); m_plotTimer.SetOwner(this, ID_TIMER_WATERFALL); @@ -149,6 +165,34 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) //------------------------------------------------------------------------- MainFrame::~MainFrame() { + int x; + int y; + int w; + int h; + + wxConfigBase *pConfig = wxConfigBase::Get(); + if(pConfig) + { + GetClientSize(&w, &h); + GetPosition(&x, &y); + pConfig->Write(wxT("/MainFrame/top"), (long) x); + pConfig->Write(wxT("/MainFrame/left"), (long) y); + pConfig->Write(wxT("/MainFrame/width"), (long) w); + pConfig->Write(wxT("/MainFrame/height"), (long) h); + + 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->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort); + pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud); + pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits); + pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits); + pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity); + + } #ifdef USE_TIMER if (m_plotTimer.IsRunning()) { @@ -156,23 +200,22 @@ MainFrame::~MainFrame() Unbind(wxEVT_TIMER, &MainFrame::OnTimer, this); // ID_MY_WINDOW); } #endif + delete wxConfigBase::Set((wxConfigBase *) NULL); } #ifdef USE_TIMER -//static int cnt = 3; //---------------------------------------------------------------- // OnTimer() //---------------------------------------------------------------- void MainFrame::OnTimer(wxTimerEvent &evt) { -// cnt--; m_panelWaterfall->m_newdata = true; m_panelWaterfall->Refresh(); m_panelSpectrum->m_newdata = true; m_panelSpectrum->Refresh(); // m_panelDefaultA->m_newdata = true; -// m_panelDefaultA->Refresh(); +// m_panelDefaultA->Refresh(); } #endif @@ -195,7 +238,26 @@ void MainFrame::OnExitClick(wxCommandEvent& event) } //------------------------------------------------------------------------- -// Onpa->Paint() +// OnDeleteConfig() +//------------------------------------------------------------------------- +void MainFrame::OnDeleteConfig(wxCommandEvent&) +{ + wxConfigBase *pConfig = wxConfigBase::Get(); + if(pConfig->DeleteAll() ) + { + wxLogMessage(wxT("Config file/registry key successfully deleted.")); + + delete wxConfigBase::Set(NULL); + wxConfigBase::DontCreateOnDemand(); + } + else + { + wxLogError(wxT("Deleting config file/registry key failed.")); + } +} + +//------------------------------------------------------------------------- +// Paint() //------------------------------------------------------------------------- void MainFrame::OnPaint(wxPaintEvent& WXUNUSED(event)) { @@ -237,7 +299,7 @@ void MainFrame::OnSliderScrollTop(wxScrollEvent& event) //------------------------------------------------------------------------- void MainFrame::OnSliderScrollBottom(wxScrollEvent& event) { - wxMessageBox(wxT("Got Click!"), wxT("OnSliderScrollBottom"), wxOK); +// wxMessageBox(wxT("Got Click!"), wxT("OnSliderScrollBottom"), wxOK); event.Skip(); } @@ -273,7 +335,7 @@ void MainFrame::OnTogBtnTXClick(wxCommandEvent& event) //------------------------------------------------------------------------- void MainFrame::OnTogBtnRxID(wxCommandEvent& event) { - wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnRxID"), wxOK); +// wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnRxID"), wxOK); event.Skip(); } @@ -282,7 +344,7 @@ void MainFrame::OnTogBtnRxID(wxCommandEvent& event) //------------------------------------------------------------------------- void MainFrame::OnTogBtnTxID(wxCommandEvent& event) { - wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnTxID"), wxOK); +// wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnTxID"), wxOK); event.Skip(); } @@ -291,7 +353,7 @@ void MainFrame::OnTogBtnTxID(wxCommandEvent& event) //------------------------------------------------------------------------- void MainFrame::OnTogBtnSplitClick(wxCommandEvent& event) { - wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnSplitClick"), wxOK); +// wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnSplitClick"), wxOK); event.Skip(); } @@ -300,7 +362,7 @@ void MainFrame::OnTogBtnSplitClick(wxCommandEvent& event) //------------------------------------------------------------------------- void MainFrame::OnTogBtnAnalogClick (wxCommandEvent& event) { - wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnAnalogClick"), wxOK); +// wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnAnalogClick"), wxOK); event.Skip(); } @@ -309,7 +371,7 @@ void MainFrame::OnTogBtnAnalogClick (wxCommandEvent& event) //------------------------------------------------------------------------- void MainFrame::OnTogBtnALCClick(wxCommandEvent& event) { - wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnALCClick"), wxOK); +// wxMessageBox(wxT("Got Click!"), wxT("OnTogBtnALCClick"), wxOK); event.Skip(); } @@ -554,7 +616,7 @@ void MainFrame::OnExit( wxCommandEvent& event ) //------------------------------------------------------------------------- void MainFrame::OnCopy( wxCommandEvent& event ) { - wxMessageBox("Got Click!", "OnCopy", wxOK); +// wxMessageBox("Got Click!", "OnCopy", wxOK); event.Skip(); } @@ -570,7 +632,7 @@ void MainFrame::OnCopyUpdateUI( wxUpdateUIEvent& event ) //------------------------------------------------------------------------- void MainFrame::OnCut( wxCommandEvent& event ) { - wxMessageBox("Got Click!", "OnCut", wxOK); +// wxMessageBox("Got Click!", "OnCut", wxOK); event.Skip(); } @@ -586,7 +648,7 @@ void MainFrame::OnCutUpdateUI( wxUpdateUIEvent& event ) //------------------------------------------------------------------------- void MainFrame::OnPaste( wxCommandEvent& event ) { - wxMessageBox("Got Click!", "Onpa->te", wxOK); +// wxMessageBox("Got Click!", "OnPaste", wxOK); event.Skip(); } @@ -597,22 +659,6 @@ void MainFrame::OnPasteUpdateUI( wxUpdateUIEvent& event ) { } -//------------------------------------------------------------------------- -// OnToolsOptions() -//------------------------------------------------------------------------- -void MainFrame::OnToolsOptions( wxCommandEvent& event ) -{ - OptionsDlg *dlg = new OptionsDlg(NULL); - dlg->ShowModal(); -} - -//------------------------------------------------------------------------- -// OnToolsOptionsUI() -//------------------------------------------------------------------------- -void MainFrame::OnToolsOptionsUI( wxUpdateUIEvent& event ) -{ -} - //------------------------------------------------------------------------- // OnCaptureRxStream() //------------------------------------------------------------------------- @@ -662,8 +708,14 @@ void MainFrame::OnPlayAudioFile( wxCommandEvent& event ) //------------------------------------------------------------------------- void MainFrame::OnToolsAudio( wxCommandEvent& event ) { + int rv = 0; AudioDlg *dlg = new AudioDlg(NULL); - dlg->ShowModal(); + rv = dlg->ShowModal(); + if(rv == wxID_OK) + { + dlg->ExchangeData(EXCHANGE_DATA_OUT); + } + delete dlg; } //------------------------------------------------------------------------- @@ -678,8 +730,14 @@ void MainFrame::OnToolsAudioUI( wxUpdateUIEvent& event ) //------------------------------------------------------------------------- void MainFrame::OnToolsComCfg( wxCommandEvent& event ) { + int rv = 0; ComPortsDlg *dlg = new ComPortsDlg(NULL); - dlg->ShowModal(); + rv = dlg->ShowModal(); + if(rv == wxID_OK) + { + dlg->ExchangeData(EXCHANGE_DATA_OUT); + } + delete dlg; } //------------------------------------------------------------------------- @@ -690,6 +748,28 @@ void MainFrame::OnToolsComCfgUI( wxUpdateUIEvent& event ) event.Enable((!m_TxRunning) && (!m_RxRunning)); } +//------------------------------------------------------------------------- +// OnToolsOptions() +//------------------------------------------------------------------------- +void MainFrame::OnToolsOptions( wxCommandEvent& event ) +{ + int rv = 0; + OptionsDlg *dlg = new OptionsDlg(NULL); + rv = dlg->ShowModal(); + if(rv == wxID_OK) + { + dlg->ExchangeData(EXCHANGE_DATA_OUT); + } + delete dlg; +} + +//------------------------------------------------------------------------- +// OnToolsOptionsUI() +//------------------------------------------------------------------------- +void MainFrame::OnToolsOptionsUI( wxUpdateUIEvent& event ) +{ +} + //------------------------------------------------------------------------- // OnHelpCheckUpdates() //------------------------------------------------------------------------- @@ -711,8 +791,14 @@ void MainFrame::OnHelpCheckUpdatesUI( wxUpdateUIEvent& event ) //------------------------------------------------------------------------- void MainFrame::OnHelpAbout( wxCommandEvent& event ) { - AboutDlg *dlg = new AboutDlg(NULL); - dlg->ShowModal(); + int rv = 0; +// AboutDlg *dlg = new AboutDlg(NULL); +// rv = dlg->ShowModal(); +// if(rv == wxID_OK) +// { +// dlg->ExchangeData(EXCHANGE_DATA_OUT); +// } +// delete dlg; } //------------------------------------------------------------------------- @@ -739,6 +825,7 @@ wxString MainFrame::LoadUserImage(wxImage& image) //------------------------------------------------------------------------- void MainFrame::OnSave(wxCommandEvent& WXUNUSED(event)) { +/* wxString savefilename = wxFileSelector(wxT("Save Sound File"), wxEmptyString, wxEmptyString, @@ -762,7 +849,8 @@ void MainFrame::OnSave(wxCommandEvent& WXUNUSED(event)) // (it may fail if the extension is not recognized): //image.SaveFile(savefilename); } -} +*/ + } //------------------------------------------------------------------------- // rxCallback() diff --git a/fdmdv2/src/fdmdv2_main.h b/fdmdv2/src/fdmdv2_main.h index 7c3543c0..f687e8c1 100644 --- a/fdmdv2/src/fdmdv2_main.h +++ b/fdmdv2/src/fdmdv2_main.h @@ -12,10 +12,12 @@ #include +#include #include "wx/rawbmp.h" #include "wx/file.h" -#include "wx/config.h" #include "wx/filename.h" +#include "wx/config.h" +#include #include "wx/graphics.h" #include "wx/mstream.h" #include "wx/wfstream.h" @@ -52,6 +54,9 @@ enum { ID_TIMER_SCALAR }; +#define EXCHANGE_DATA_IN 0 +#define EXCHANGE_DATA_OUT 1 + //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= // Class MainApp // @@ -65,14 +70,37 @@ enum { class MainApp : public wxApp { public: - virtual bool OnInit(); - virtual int OnExit() - { - return 0; - } - bool loadConfig(); + virtual bool OnInit(); + virtual int OnExit(); + + wxString m_strVendName; + wxString m_StrAppName; + + wxRadioButton m_radioBtnPortAudio; + wxRadioButton m_radioBtnFileOnly; + + wxString m_textNumChOut; + wxString m_textNumChIn; + + wxString m_strRxInAudio; + wxString m_strRxOutAudio; + wxString m_textVoiceInput; + wxString m_textVoiceOutput; + wxString m_strSampleRate; + wxString m_strBitrate; + + wxString m_strRigCtrlPort; + wxString m_strRigCtrlBaud; + wxString m_strRigCtrlDatabits; + wxString m_strRigCtrlStopbits; + wxString m_strRigCtrlParity; + + wxRect m_rTopWindow; + + bool loadConfig(); + bool saveConfig(); + protected: - wxConfig *g_config; }; // declare global static function wxGetApp() @@ -148,6 +176,7 @@ class MainFrame : public TopFrame // protected event handlers virtual void OnCloseFrame(wxCloseEvent& event); virtual void OnExitClick(wxCommandEvent& event); + //void OnQuit(wxCommandEvent& event); void averageData(float mag_dB[]); void startTxStream(); @@ -203,6 +232,8 @@ class MainFrame : public TopFrame void OnSize( wxSizeEvent& event ); void OnUpdateUI( wxUpdateUIEvent& event ); void OnTimer(wxTimerEvent &evt); + + void OnDeleteConfig(wxCommandEvent&); wxString LoadUserImage(wxImage& image); @@ -210,7 +241,7 @@ class MainFrame : public TopFrame bool CreateSound(wxSound& snd) const; wxString m_soundFile; #ifdef __WXMSW__ - wxString m_soundRes; +// wxString m_soundRes; #endif // __WXMSW__ bool m_useMemory; wxTextCtrl* m_tc; diff --git a/fdmdv2/src/fdmdv2_pa_wrapper.h b/fdmdv2/src/fdmdv2_pa_wrapper.h index 574e5939..2f00db63 100644 --- a/fdmdv2/src/fdmdv2_pa_wrapper.h +++ b/fdmdv2/src/fdmdv2_pa_wrapper.h @@ -28,11 +28,6 @@ #include "codec2.h" #include "portaudio.h" -// Note that many of the older ISA sound cards on PCs do NOT support -// full duplex audio (simultaneous record and playback). -// And some only support full duplex at lower sample rates. -//#define SAMPLE_RATE (44100) -// #define PA_SAMPLE_TYPE paFloat32 //paInt16 #define FRAMES_PER_BUFFER (64) diff --git a/fdmdv2/src/fdmdv2_plot.cpp b/fdmdv2/src/fdmdv2_plot.cpp index d66c76a0..4bcce60c 100644 --- a/fdmdv2/src/fdmdv2_plot.cpp +++ b/fdmdv2/src/fdmdv2_plot.cpp @@ -119,17 +119,7 @@ void PlotPanel::OnSize(wxSizeEvent& event) m_oImage.Rescale(m_rCtrl.GetWidth(), m_rCtrl.GetHeight()); } m_pBmp = new wxBitmap(m_oImage, wxBITMAP_SCREEN_DEPTH); -/* - if(m_oImage.IsOk()) - { - m_oImage.Destroy(); - } - m_oImage.Create(m_rCtrl.GetWidth(), m_rCtrl.GetHeight(), true); - m_pBmp = new wxBitmap(m_oImage, wxBITMAP_SCREEN_DEPTH); - m_oImage.Rescale(m_rCtrl.GetWidth(), m_rCtrl.GetHeight()); -*/ m_firstPass = true; -// this->Refresh(); } } diff --git a/fdmdv2/src/fdmdv2_plot.h b/fdmdv2/src/fdmdv2_plot.h index 55a28782..2cb9f155 100644 --- a/fdmdv2/src/fdmdv2_plot.h +++ b/fdmdv2/src/fdmdv2_plot.h @@ -38,13 +38,13 @@ #define BLACK_COLOR wxColor(0x00, 0x00, 0x00) #define GREY_COLOR wxColor(0x80, 0x80, 0x80) -#define DARK_GREY_COLOR wxColor(0x60, 0x60, 0x60) +#define DARK_GREY_COLOR wxColor(0x40, 0x40, 0x40) #define MEDIUM_GREY_COLOR wxColor(0xC0, 0xC0, 0xC0) #define LIGHT_GREY_COLOR wxColor(0xE0, 0xE0, 0xE0) #define VERY_LTGREY_COLOR wxColor(0xF8, 0xF8, 0xF8) #define WHITE_COLOR wxColor(0xFF, 0xFF, 0xFF) -#define DARK_BLUE_COLOR wxColor(0x00, 0x00, 0x80) +#define DARK_BLUE_COLOR wxColor(0x00, 0x00, 0x60) #define BLUE_COLOR wxColor(0x00, 0x00, 0xFF) #define LIGHT_BLUE_COLOR wxColor(0x80, 0x80, 0xFF) diff --git a/fdmdv2/src/fdmdv2_plot_spectrum.cpp b/fdmdv2/src/fdmdv2_plot_spectrum.cpp index d8717cce..8032f494 100644 --- a/fdmdv2/src/fdmdv2_plot_spectrum.cpp +++ b/fdmdv2/src/fdmdv2_plot_spectrum.cpp @@ -34,9 +34,7 @@ BEGIN_EVENT_TABLE(PlotSpectrum, PlotPanel) EVT_LEFT_UP (PlotSpectrum::OnMouseUp) EVT_MOUSEWHEEL (PlotSpectrum::OnMouseWheelMoved) EVT_PAINT (PlotSpectrum::OnPaint) - EVT_SIZE (PlotSpectrum::OnSize) EVT_SHOW (PlotSpectrum::OnShow) -// EVT_ERASE_BACKGROUND(PlotSpectrum::OnErase) END_EVENT_TABLE() //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= @@ -124,37 +122,6 @@ void PlotSpectrum::draw(wxAutoBufferedPaintDC& pDC) m_mDC.SelectObject(wxNullBitmap); } -//------------------------------------------------------------------------- -// drawData() -//------------------------------------------------------------------------- -void PlotSpectrum::drawData() //wxMemoryDC& pDC) -{ - wxNativePixelData dPix = wxNativePixelData(*m_pBmp, m_rCtrl); - m_pPix = &dPix; - if(m_pPix == NULL) - { - return; - } - wxNativePixelData::Iterator p(*m_pPix); - - int w = m_rPlot.GetWidth(); - int h = m_rPlot.GetHeight(); - p.Offset(*m_pPix, XLEFT_OFFSET + 3, h - (DATA_LINE_HEIGHT - 2)); -// for(int y = 0; y < DATA_LINE_HEIGHT; ++y) -// { - wxNativePixelData::Iterator rowStart = p; - for(int x = 0; x < (w - 1); ++x, ++p) - { - p.OffsetX(*m_pPix, m_pTopFrame->m_rxPa->m_av_mag[x]); - p.Red() = 0x00; // m_pTopFrame->m_rxPa->m_av_mag[x]; - p.Green() = 0xFF; - p.Blue() = 0x00; // m_pTopFrame->m_rxPa->m_av_mag[x]; - } - p = rowStart; -// p.OffsetY(*m_pPix, 1); -// } -} - //------------------------------------------------------------------------- // drawGraticule() //------------------------------------------------------------------------- @@ -212,21 +179,6 @@ void PlotSpectrum::OnPaint(wxPaintEvent& event) draw(dc); } -//---------------------------------------------------------------- -// OnSize() -//---------------------------------------------------------------- -void PlotSpectrum::OnSize(wxSizeEvent& event) -{ - m_rCtrlPrev = m_rCtrl; - m_rCtrl = GetClientRect(); - if(m_use_bitmap) - { - m_firstPass = true; - m_pBmp = new wxBitmap(m_rCtrl.GetWidth(), m_rCtrl.GetHeight(), wxBITMAP_SCREEN_DEPTH); - this->Refresh(); - } -} - //---------------------------------------------------------------- // OnShow() //---------------------------------------------------------------- diff --git a/fdmdv2/src/fdmdv2_plot_spectrum.h b/fdmdv2/src/fdmdv2_plot_spectrum.h index 8e40a793..dc524e65 100644 --- a/fdmdv2/src/fdmdv2_plot_spectrum.h +++ b/fdmdv2/src/fdmdv2_plot_spectrum.h @@ -34,10 +34,8 @@ class PlotSpectrum : public PlotPanel { public: -// PlotSpectrum(wxFrame* parent, int x, int y, int w, int h); PlotSpectrum(wxFrame* parent); ~PlotSpectrum(); -// bool m_newdata; protected: void OnPaint(wxPaintEvent& event); @@ -45,7 +43,6 @@ class PlotSpectrum : public PlotPanel void OnShow(wxShowEvent& event); void drawGraticule(wxAutoBufferedPaintDC& dc); void draw(wxAutoBufferedPaintDC& dc); - void drawData(); //wxMemoryDC& pDC); DECLARE_EVENT_TABLE() }; diff --git a/fdmdv2/src/fdmdv2_plot_waterfall.cpp b/fdmdv2/src/fdmdv2_plot_waterfall.cpp index d6b4487b..d4915304 100644 --- a/fdmdv2/src/fdmdv2_plot_waterfall.cpp +++ b/fdmdv2/src/fdmdv2_plot_waterfall.cpp @@ -163,7 +163,7 @@ void PlotWaterfall::draw(wxAutoBufferedPaintDC& pDC) m_mDC.FloodFill(0, 0, VERY_LTGREY_COLOR); // Draw a filled rectangle with aborder - wxBrush ltGraphBkgBrush = wxBrush(LIGHT_BLUE_COLOR); + wxBrush ltGraphBkgBrush = wxBrush(DARK_BLUE_COLOR); m_mDC.SetBrush(ltGraphBkgBrush); m_mDC.SetPen(wxPen(BLACK_COLOR, 0)); m_mDC.DrawRectangle(m_rPlot); @@ -176,14 +176,12 @@ void PlotWaterfall::draw(wxAutoBufferedPaintDC& pDC) int t = m_rPlot.GetTop(); int l = m_rPlot.GetLeft(); int h = m_rPlot.GetHeight(); -// int b = m_rPlot.GetBottom(); int w = m_rPlot.GetWidth(); int t2 = t + 1; int w2 = w - 1; int ht = (h - DATA_LINE_HEIGHT); drawData(); // m_mDC, PLOT_BOTTOM); -// m_mDC.StretchBlit(l, t2, w2, ht, &m_mDC, l, t2 + DATA_LINE_HEIGHT, w2, ht - 2); m_mDC.StretchBlit(l, t2, w2, ht, &m_mDC, l, t2 + DATA_LINE_HEIGHT, w2, ht - 2); // pDC.Blit(l, t, w, h, &m_mDC, l, t); // Scroll Up from Bottom pDC.StretchBlit(l, (h - t) + 4, w, (-h) + 4, &m_mDC, l, t, w, h); // Scroll Down from top diff --git a/fdmdv2/src/topFrame.cpp b/fdmdv2/src/topFrame.cpp index d1f05cab..70122f58 100644 --- a/fdmdv2/src/topFrame.cpp +++ b/fdmdv2/src/topFrame.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) +// C++ code generated with wxFormBuilder (version Apr 10 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -14,62 +14,65 @@ TopFrame::TopFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) ); this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); - + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) ); + m_menubarMain = new wxMenuBar( wxMB_DOCKABLE ); file = new wxMenu(); wxMenuItem* m_menuItemOpen; m_menuItemOpen = new wxMenuItem( file, ID_OPEN, wxString( _("&Open") ) , _("Open File"), wxITEM_NORMAL ); file->Append( m_menuItemOpen ); - + wxMenuItem* m_menuItemSave; m_menuItemSave = new wxMenuItem( file, ID_SAVE, wxString( _("&Save") ) , _("Save current file"), wxITEM_NORMAL ); file->Append( m_menuItemSave ); - + wxMenuItem* m_menuItemClose; m_menuItemClose = new wxMenuItem( file, ID_CLOSE, wxString( _("&Close") ) , _("Close current file"), wxITEM_NORMAL ); file->Append( m_menuItemClose ); - + file->AppendSeparator(); - + wxMenuItem* m_menuItemExit; m_menuItemExit = new wxMenuItem( file, ID_EXIT, wxString( _("E&xit") ) , _("Exit Program"), wxITEM_NORMAL ); file->Append( m_menuItemExit ); - - m_menubarMain->Append( file, _("&File") ); - + + m_menubarMain->Append( file, _("&File") ); + edit = new wxMenu(); wxMenuItem* m_menuItemCopy; m_menuItemCopy = new wxMenuItem( edit, ID_COPY, wxString( _("&Copy") ) , _("Copy selection"), wxITEM_NORMAL ); edit->Append( m_menuItemCopy ); m_menuItemCopy->Enable( false ); - + wxMenuItem* m_menuItemCut; m_menuItemCut = new wxMenuItem( edit, ID_CUT, wxString( _("Cut") ) , _("Cut Selection"), wxITEM_NORMAL ); edit->Append( m_menuItemCut ); m_menuItemCut->Enable( false ); - + wxMenuItem* m_menuItemPaste; m_menuItemPaste = new wxMenuItem( edit, ID_PASTE, wxString( _("&Paste") ) , _("Paste selection"), wxITEM_NORMAL ); edit->Append( m_menuItemPaste ); m_menuItemPaste->Enable( false ); - - m_menubarMain->Append( edit, _("&Edit") ); - + + m_menubarMain->Append( edit, _("&Edit") ); + tools = new wxMenu(); wxMenuItem* m_menuItemAudio; m_menuItemAudio = new wxMenuItem( tools, wxID_ANY, wxString( _("&Audio Config") ) , wxEmptyString, wxITEM_NORMAL ); tools->Append( m_menuItemAudio ); - + wxMenuItem* m_menuItemRigCtrlCfg; m_menuItemRigCtrlCfg = new wxMenuItem( tools, wxID_ANY, wxString( _("Rig Control Config") ) , wxEmptyString, wxITEM_NORMAL ); tools->Append( m_menuItemRigCtrlCfg ); - + wxMenuItem* m_menuItemOptions; m_menuItemOptions = new wxMenuItem( tools, ID_OPTIONS, wxString( _("Other Program &Options") ) , _("Set preferences"), wxITEM_NORMAL ); 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__ @@ -78,7 +81,7 @@ TopFrame::TopFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons 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__ @@ -87,211 +90,211 @@ TopFrame::TopFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons m_menuItemCaptTxStream->SetBitmap( wxNullBitmap ); #endif tools->Append( m_menuItemCaptTxStream ); - + tools->AppendSeparator(); - + wxMenuItem* m_menuItemPlayAudioFile; m_menuItemPlayAudioFile = new wxMenuItem( tools, wxID_ANY, wxString( _("Play File") ) , wxEmptyString, wxITEM_NORMAL ); tools->Append( m_menuItemPlayAudioFile ); - - m_menubarMain->Append( tools, _("&Tools") ); - + + m_menubarMain->Append( tools, _("&Tools") ); + help = new wxMenu(); wxMenuItem* m_menuItemHelpUpdates; m_menuItemHelpUpdates = new wxMenuItem( help, wxID_ANY, wxString( _("Check for Updates") ) , wxEmptyString, wxITEM_NORMAL ); help->Append( m_menuItemHelpUpdates ); m_menuItemHelpUpdates->Enable( false ); - + wxMenuItem* m_menuItemAbout; m_menuItemAbout = new wxMenuItem( help, ID_ABOUT, wxString( _("&About") ) , _("About this program"), wxITEM_NORMAL ); help->Append( m_menuItemAbout ); - - m_menubarMain->Append( help, _("&Help") ); - + + m_menubarMain->Append( help, _("&Help") ); + this->SetMenuBar( m_menubarMain ); - + wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxHORIZONTAL ); - + wxBoxSizer* leftSizer; leftSizer = new wxBoxSizer( wxVERTICAL ); - + 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 ); m_gaugeSNR->SetToolTip( _("Display signal to noise ratio.") ); - + snrSizer->Add( m_gaugeSNR, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10 ); - + wxBoxSizer* bSizer29; bSizer29 = new wxBoxSizer( wxVERTICAL ); - + 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 ) ); - + bSizer29->Add( m_textSNR, 0, wxALIGN_CENTER|wxALL, 1 ); - - + + snrSizer->Add( bSizer29, 0, wxEXPAND, 1 ); - - + + leftSizer->Add( snrSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1 ); - + wxStaticBoxSizer* levelSizer; levelSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Level") ), wxVERTICAL ); - + 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 ); - - + + leftSizer->Add( levelSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1 ); - - + + bSizer1->Add( leftSizer, 0, wxALL|wxEXPAND, 5 ); - + wxBoxSizer* centerSizer; centerSizer = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* upperSizer; upperSizer = new wxBoxSizer( wxVERTICAL ); - + m_auiNbookCtrl = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM|wxAUI_NB_DEFAULT_STYLE ); m_auiNbookCtrl->SetFont( wxFont( 6, 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 = new wxBoxSizer( wxHORIZONTAL ); - + wxBoxSizer* bSizer15; bSizer15 = new wxBoxSizer( wxVERTICAL ); - + m_txtCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); bSizer15->Add( m_txtCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); - - + + lowerSizer->Add( bSizer15, 1, wxEXPAND, 5 ); - + wxBoxSizer* bSizer141; bSizer141 = new wxBoxSizer( wxHORIZONTAL ); - + 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 ); - + 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 ); - + wxBoxSizer* rightSizer; rightSizer = new wxBoxSizer( wxVERTICAL ); - + wxStaticBoxSizer* sbSizer3; sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("SQ") ), wxVERTICAL ); - + m_sliderSQ = new wxSlider( this, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxSize( -1,100 ), wxSL_AUTOTICKS|wxSL_INVERSE|wxSL_VERTICAL ); m_sliderSQ->SetToolTip( _("Set Squelch level.") ); - + sbSizer3->Add( m_sliderSQ, 2, wxALIGN_CENTER|wxALL, 1 ); - + wxBoxSizer* bSizer131; bSizer131 = new wxBoxSizer( wxVERTICAL ); - + m_ckboxSQ = new wxCheckBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_ckboxSQ->SetToolTip( _("Activate/Deactivate Squelch") ); - + bSizer131->Add( m_ckboxSQ, 0, wxALIGN_CENTER|wxALL, 5 ); - - + + sbSizer3->Add( bSizer131, 0, wxALIGN_CENTER, 5 ); - - + + rightSizer->Add( sbSizer3, 2, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3 ); - + wxStaticBoxSizer* sbSizer5; sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Control") ), wxVERTICAL ); - + wxBoxSizer* bSizer1511; bSizer1511 = new wxBoxSizer( wxVERTICAL ); - + m_togBtnOnOff = new wxToggleButton( this, wxID_ANY, _("Start"), wxDefaultPosition, wxDefaultSize, 0 ); m_togBtnOnOff->SetToolTip( _("Begin receiving data.") ); - + bSizer1511->Add( m_togBtnOnOff, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1 ); - - + + sbSizer5->Add( bSizer1511, 0, wxEXPAND, 1 ); - + wxBoxSizer* bSizer151; bSizer151 = new wxBoxSizer( wxVERTICAL ); - + m_togBtnSplit = new wxToggleButton( this, wxID_ANY, _("Split"), wxDefaultPosition, wxDefaultSize, 0 ); m_togBtnSplit->SetToolTip( _("Toggle split frequency mode.") ); - + bSizer151->Add( m_togBtnSplit, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1 ); - - + + sbSizer5->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 1 ); - + wxBoxSizer* bSizer13; bSizer13 = new wxBoxSizer( wxVERTICAL ); - + m_togBtnAnalog = new wxToggleButton( this, wxID_ANY, _("Analog"), wxDefaultPosition, wxDefaultSize, 0 ); m_togBtnAnalog->SetToolTip( _("Toggle analog/digital operation.") ); - + 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 ); - + wxBoxSizer* bSizer14; bSizer14 = new wxBoxSizer( wxVERTICAL ); - + m_togBtnALC = new wxToggleButton( this, wxID_ANY, _("ALC"), wxDefaultPosition, wxDefaultSize, 0 ); m_togBtnALC->SetToolTip( _("Toggle automatic level control mode.") ); - + bSizer14->Add( m_togBtnALC, 0, wxALL, 1 ); - - + + sbSizer5->Add( bSizer14, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALL, 1 ); - + wxBoxSizer* bSizer11; bSizer11 = new wxBoxSizer( wxVERTICAL ); - + 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 ); - - + + sbSizer5->Add( bSizer11, 2, wxEXPAND, 1 ); - - + + rightSizer->Add( sbSizer5, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 3 ); - - + + bSizer1->Add( rightSizer, 0, wxALL|wxEXPAND, 3 ); - - + + this->SetSizer( bSizer1 ); this->Layout(); m_statusBar1 = this->CreateStatusBar( 3, wxST_SIZEGRIP, wxID_ANY ); - + // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( TopFrame::topFrame_OnClose ) ); this->Connect( wxEVT_PAINT, wxPaintEventHandler( TopFrame::topFrame_OnPaint ) ); @@ -396,71 +399,73 @@ TopFrame::~TopFrame() m_togBtnAnalog->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( TopFrame::OnTogBtnAnalogClick ), NULL, this ); m_togBtnALC->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( TopFrame::OnTogBtnALCClick ), NULL, this ); m_btnTogTX->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( TopFrame::OnTogBtnTXClick ), NULL, this ); - + } DlgAbout::DlgAbout( 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* bSizer20; bSizer20 = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizer21; bSizer21 = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizer23; bSizer23 = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizer25; bSizer25 = new wxBoxSizer( wxVERTICAL ); - + m_bitmapAbout = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); bSizer25->Add( m_bitmapAbout, 1, wxALL|wxEXPAND, 5 ); - - + + bSizer23->Add( bSizer25, 1, wxEXPAND, 5 ); - + wxBoxSizer* bSizer26; bSizer26 = new wxBoxSizer( wxVERTICAL ); - + m_staticText1 = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1->Wrap( -1 ); bSizer26->Add( m_staticText1, 1, wxALL, 5 ); - - + + bSizer23->Add( bSizer26, 0, 0, 5 ); - - + + bSizer21->Add( bSizer23, 1, wxEXPAND, 5 ); - + wxBoxSizer* bSizer24; bSizer24 = new wxBoxSizer( wxVERTICAL ); - + m_textCtrl2 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); bSizer24->Add( m_textCtrl2, 1, wxALL|wxEXPAND, 5 ); - - + + bSizer21->Add( bSizer24, 1, wxEXPAND, 5 ); - - + + bSizer20->Add( bSizer21, 1, wxEXPAND, 5 ); - + wxBoxSizer* bSizer22; bSizer22 = new wxBoxSizer( wxVERTICAL ); - + m_button9 = new wxButton( this, wxID_ANY, _("MyButton"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer22->Add( m_button9, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxALL, 5 ); - - + + bSizer20->Add( bSizer22, 0, wxALIGN_RIGHT, 5 ); - - + + this->SetSizer( bSizer20 ); this->Layout(); - + this->Centre( wxBOTH ); - + this->Centre( wxBOTH ); + // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DlgAbout::OnClose ) ); this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DlgAbout::OnInitDialog ) ); @@ -471,143 +476,144 @@ DlgAbout::~DlgAbout() // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DlgAbout::OnClose ) ); this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DlgAbout::OnInitDialog ) ); - + } 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 ) ); + + gSizer6->SetMinSize( wxSize( 115,-1 ) ); m_radioBtnPortAudio = new wxRadioButton( m_panelDevices, wxID_ANY, _("PortAudio"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtnPortAudio->SetValue( true ); + 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 ) ); + + 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, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + + m_comboAudioCodec = new wxComboBox( m_panelDevices, wxID_ANY, _(""), 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, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + + m_comboCodecTx = new wxComboBox( m_panelDevices, wxID_ANY, _(""), 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, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + + m_comboRadioRx = new wxComboBox( m_panelDevices, wxID_ANY, _(""), 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, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + + m_comboCodecSpkr = new wxComboBox( m_panelDevices, wxID_ANY, _(""), 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 ); @@ -615,111 +621,102 @@ DlgAudio::DlgAudio( wxWindow* parent, wxWindowID id, const wxString& title, cons 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 ); + + 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 ); + + 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_textCtrl15 = new wxTextCtrl( m_panelSettings, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer281->Add( m_textCtrl15, 0, wxALIGN_CENTER|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 ); + + 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 ); + + 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 ); - m_panelRightChannel = new wxPanel( m_nbAudioOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer36; - bSizer36 = new wxBoxSizer( wxVERTICAL ); - - - m_panelRightChannel->SetSizer( bSizer36 ); - m_panelRightChannel->Layout(); - bSizer36->Fit( m_panelRightChannel ); - m_nbAudioOptions->AddPage( m_panelRightChannel, _("Right Channel"), 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 ); @@ -728,21 +725,22 @@ DlgAudio::DlgAudio( wxWindow* parent, wxWindowID id, const wxString& title, cons 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 ) ); @@ -767,85 +765,87 @@ DlgAudio::~DlgAudio() 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 ); - + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + wxBoxSizer* bSizer30; bSizer30 = new wxBoxSizer( wxVERTICAL ); - + wxStaticBoxSizer* sbSizer5; sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Config Options") ), wxHORIZONTAL ); - + wxGridSizer* gSizer2; gSizer2 = new wxGridSizer( 6, 2, 0, 0 ); - + m_staticText2 = new wxStaticText( this, wxID_ANY, _("Option #1:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2->Wrap( -1 ); gSizer2->Add( m_staticText2, 1, wxALIGN_RIGHT|wxALL, 5 ); - + m_textCtrl3 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gSizer2->Add( m_textCtrl3, 1, wxALL, 5 ); - + m_staticText3 = new wxStaticText( this, wxID_ANY, _("Option #2:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText3->Wrap( -1 ); gSizer2->Add( m_staticText3, 1, wxALIGN_RIGHT|wxALL, 5 ); - + m_textCtrl4 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gSizer2->Add( m_textCtrl4, 1, wxALL, 5 ); - + m_staticText4 = new wxStaticText( this, wxID_ANY, _("Option #3:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText4->Wrap( -1 ); gSizer2->Add( m_staticText4, 1, wxALIGN_RIGHT|wxALL, 5 ); - + m_textCtrl5 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gSizer2->Add( m_textCtrl5, 1, wxALL, 5 ); - + m_staticText5 = new wxStaticText( this, wxID_ANY, _("Option #4:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText5->Wrap( -1 ); gSizer2->Add( m_staticText5, 1, wxALIGN_RIGHT|wxALL, 5 ); - + m_textCtrl6 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gSizer2->Add( m_textCtrl6, 1, wxALL, 5 ); - + m_staticText6 = new wxStaticText( this, wxID_ANY, _("Option #5:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText6->Wrap( -1 ); gSizer2->Add( m_staticText6, 1, wxALIGN_RIGHT|wxALL, 5 ); - + m_textCtrl7 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gSizer2->Add( m_textCtrl7, 1, wxALL, 5 ); - + m_staticText7 = new wxStaticText( this, wxID_ANY, _("Option #6:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText7->Wrap( -1 ); gSizer2->Add( m_staticText7, 1, wxALIGN_RIGHT|wxALL, 5 ); - + m_textCtrl8 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); gSizer2->Add( m_textCtrl8, 1, wxALL, 5 ); - - + + sbSizer5->Add( gSizer2, 1, wxEXPAND, 5 ); - - + + bSizer30->Add( sbSizer5, 1, wxEXPAND, 5 ); - + m_sdbSizer4 = new wxStdDialogButtonSizer(); m_sdbSizer4OK = new wxButton( this, wxID_OK ); m_sdbSizer4->AddButton( m_sdbSizer4OK ); m_sdbSizer4Cancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer4->AddButton( m_sdbSizer4Cancel ); m_sdbSizer4->Realize(); - + bSizer30->Add( m_sdbSizer4, 0, wxALIGN_RIGHT, 5 ); - - + + this->SetSizer( bSizer30 ); this->Layout(); - + + this->Centre( wxBOTH ); this->Centre( wxBOTH ); - + // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DlgOptions::OnClose ) ); this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DlgOptions::OnInitDialog ) ); @@ -856,58 +856,97 @@ DlgOptions::~DlgOptions() // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DlgOptions::OnClose ) ); this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DlgOptions::OnInitDialog ) ); - + } -DlgComPorts::DlgComPorts( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +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( 2, 2, 0, 0 ); - + 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, 5 ); - + 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, 1, wxALL|wxEXPAND, 5 ); - + 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, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_textCtrl10 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - gSizer3->Add( m_textCtrl10, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - + 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_sdbSizer3 = new wxStdDialogButtonSizer(); - m_sdbSizer3OK = new wxButton( this, wxID_OK ); - m_sdbSizer3->AddButton( m_sdbSizer3OK ); - m_sdbSizer3Cancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizer3->AddButton( m_sdbSizer3Cancel ); - m_sdbSizer3->Realize(); - - bSizer30->Add( m_sdbSizer3, 0, 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 ); } diff --git a/fdmdv2/src/topFrame.h b/fdmdv2/src/topFrame.h index 8a1b3f23..64f5327c 100644 --- a/fdmdv2/src/topFrame.h +++ b/fdmdv2/src/topFrame.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) +// C++ code generated with wxFormBuilder (version Apr 10 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -56,10 +56,10 @@ /////////////////////////////////////////////////////////////////////////////// /// Class TopFrame /////////////////////////////////////////////////////////////////////////////// -class TopFrame : public wxFrame +class TopFrame : public wxFrame { private: - + protected: wxMenuBar* m_menubarMain; wxMenu* file; @@ -80,7 +80,7 @@ class TopFrame : public wxFrame wxToggleButton* m_togBtnALC; wxToggleButton* m_btnTogTX; wxStatusBar* m_statusBar1; - + // Virtual event handlers, overide them in your derived class virtual void topFrame_OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void topFrame_OnPaint( wxPaintEvent& event ) { event.Skip(); } @@ -123,49 +123,49 @@ class TopFrame : public wxFrame virtual void OnTogBtnAnalogClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnTogBtnALCClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnTogBtnTXClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: wxAuiNotebook* m_auiNbookCtrl; - + TopFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FDMDV2"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 761,500 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); - + ~TopFrame(); - + }; /////////////////////////////////////////////////////////////////////////////// /// Class DlgAbout /////////////////////////////////////////////////////////////////////////////// -class DlgAbout : public wxDialog +class DlgAbout : public wxDialog { private: - + protected: wxStaticBitmap* m_bitmapAbout; wxStaticText* m_staticText1; wxTextCtrl* m_textCtrl2; wxButton* m_button9; - + // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } - - + + public: - - DlgAbout( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About FDMDV2"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 352,343 ), long style = wxDEFAULT_DIALOG_STYLE ); + + DlgAbout( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About FDMDV2"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 352,343 ), long style = wxDEFAULT_DIALOG_STYLE ); ~DlgAbout(); - + }; /////////////////////////////////////////////////////////////////////////////// /// Class DlgAudio /////////////////////////////////////////////////////////////////////////////// -class DlgAudio : public wxDialog +class DlgAudio : public wxDialog { private: - + protected: wxNotebook* m_nbAudioOptions; wxPanel* m_panelDevices; @@ -187,17 +187,16 @@ class DlgAudio : public wxDialog wxListBox* m_lbRxInput; wxTextCtrl* m_textRxInput; wxListBox* m_lbTxOutput; - wxTextCtrl* m_textCtrl15; + wxTextCtrl* m_textTxOutput; wxListBox* m_lbVoiceInput; wxTextCtrl* m_textVoiceInput; wxListBox* m_lbVoiceOutput; wxTextCtrl* m_textVoiceOutput; - wxPanel* m_panelRightChannel; wxStdDialogButtonSizer* m_sdbSizer3; wxButton* m_sdbSizer3OK; wxButton* m_sdbSizer3Apply; wxButton* m_sdbSizer3Cancel; - + // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } @@ -208,22 +207,22 @@ class DlgAudio : public wxDialog virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - DlgAudio( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 555,419 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DlgAudio( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 555,419 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DlgAudio(); - + }; /////////////////////////////////////////////////////////////////////////////// /// Class DlgOptions /////////////////////////////////////////////////////////////////////////////// -class DlgOptions : public wxDialog +class DlgOptions : public wxDialog { private: - + protected: wxStaticText* m_staticText2; wxTextCtrl* m_textCtrl3; @@ -240,44 +239,58 @@ class DlgOptions : public wxDialog wxStdDialogButtonSizer* m_sdbSizer4; wxButton* m_sdbSizer4OK; wxButton* m_sdbSizer4Cancel; - + // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } - - + + public: - - DlgOptions( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Program Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 332,364 ), long style = wxDEFAULT_DIALOG_STYLE ); + + DlgOptions( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Program Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 332,364 ), long style = wxDEFAULT_DIALOG_STYLE ); ~DlgOptions(); - + }; /////////////////////////////////////////////////////////////////////////////// /// Class DlgComPorts /////////////////////////////////////////////////////////////////////////////// -class DlgComPorts : public wxDialog +class DlgComPorts : public wxDialog { private: - + protected: wxStaticText* m_staticText8; wxListCtrl* m_listCtrlPortSelect; wxStaticText* m_staticText9; - wxTextCtrl* m_textCtrl10; - wxStdDialogButtonSizer* m_sdbSizer3; - wxButton* m_sdbSizer3OK; - wxButton* m_sdbSizer3Cancel; - + wxTextCtrl* m_textRigCtrlPort; + wxStaticText* m_staticText91; + wxTextCtrl* m_textRigCtrlBaud; + wxStaticText* m_staticText911; + wxTextCtrl* m_textRigCtrlDatabits; + wxStaticText* m_staticText912; + wxTextCtrl* m_textRigCtrlStopbits; + wxStaticText* m_staticText913; + wxTextCtrl* m_textRigCtrlParity; + wxStdDialogButtonSizer* m_sdbSizer5; + wxButton* m_sdbSizer5OK; + wxButton* m_sdbSizer5Apply; + wxButton* m_sdbSizer5Cancel; + // Virtual event handlers, overide them in your derived class virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); } - - + virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOK( wxCommandEvent& event ) { event.Skip(); } + virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } + virtual void OnApply( wxCommandEvent& event ) { event.Skip(); } + + public: - - DlgComPorts( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Com Port"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 399,226 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DlgComPorts( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Com Port"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 399,354 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DlgComPorts(); - + }; #endif //__TOPFRAME_H__