From 6473b57cefe4c13cb262ed78bf0e49fe18a20267 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 18 Jun 2020 19:35:11 -0400 Subject: using serial lib, can connect to device --- gui/wxmain.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gui/wxmain.hpp') diff --git a/gui/wxmain.hpp b/gui/wxmain.hpp index 7832bdb..f23ae38 100644 --- a/gui/wxmain.hpp +++ b/gui/wxmain.hpp @@ -1,7 +1,10 @@ #ifndef WXMAIN_HPP_ #define WXMAIN_HPP_ +#include "stmdsp.hpp" + #include +#include #include #include #include @@ -12,6 +15,7 @@ class MainFrame : public wxFrame enum Id { Welcome = 1, Single, + SelectDevice, RenderTimer }; @@ -26,6 +30,14 @@ public: { new wxStaticText(this, Id::Welcome, "Welcome to the GUI.", wxPoint(20, 20)); new wxButton(this, Id::Single, "Single", wxPoint(20, 60)); + auto combo = new wxComboBox(this, Id::SelectDevice, "", wxPoint(470, 20), wxSize(150, 30)); + combo->SetEditable(false); + stmdsp::scanner scanner; + for (auto& dev : scanner.scan()) + combo->Append(dev); + if (combo->GetCount() > 0) + combo->SetSelection(0); + m_render_timer = new wxTimer(this, Id::RenderTimer); Bind(wxEVT_BUTTON, &MainFrame::onSinglePressed, this, Id::Single); -- cgit v1.2.3