//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
// Class PlugInDlg
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
-PlugInDlg::PlugInDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
+PlugInDlg::PlugInDlg(const wxString& title, int numParams, wxString params[], wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxDialog(parent, id, title, pos, size, style)
{
+
wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
this->SetSizer(mainSizer);
- wxStaticBoxSizer* staticBoxSizer28a = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Param1")), wxVERTICAL);
+ wxStaticBoxSizer* staticBoxSizer28a = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, params[0]), wxVERTICAL);
m_txtCtrlPlugIn1 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300,-1), 0);
staticBoxSizer28a->Add(m_txtCtrlPlugIn1, 0, 0, 5);
mainSizer->Add(staticBoxSizer28a, 0, wxEXPAND, 5);
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
class PlugInDlg : public wxDialog
{
- public:
- PlugInDlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plugin Config"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(450,300), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
+ public:
+ PlugInDlg(const wxString& title = _("PTT Config"), int numParams = 0, wxString params[]=NULL, wxWindow* parent=NULL, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(450,300), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
virtual ~PlugInDlg();
void ExchangeData(int inout);
protected:
-
wxTextCtrl *m_txtCtrlPlugIn1;
wxTextCtrl *m_txtCtrlPlugIn2;
wxTextCtrl *m_txtCtrlPlugIn3;
- /* Ok - Cance */
+
+ /* Ok - Cancel */
wxButton* m_buttonOK;
wxButton* m_buttonCancel;
m_schedule_restore = false;
vk_state = VK_IDLE;
+
+ // Look for Plug In
+
+ m_plugIn = true;
+ m_plugInName = "MyModem";
+ m_numPlugInParams = 2;
+ m_plugInParams[0] = "Symbol Rate";
+ m_plugInParams[1] = "Num Tones";
}
//-------------------------------------------------------------------------
void MainFrame::OnToolsPlugInCfg(wxCommandEvent& event)
{
wxUnusedVar(event);
- PlugInDlg *dlg = new PlugInDlg(NULL);
+ PlugInDlg *dlg = new PlugInDlg(m_plugInName, m_numPlugInParams, m_plugInParams);
dlg->ShowModal();
delete dlg;
}