aboutsummaryrefslogtreecommitdiffstats
path: root/gui/wxmain.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2020-06-18 19:35:11 -0400
committerClyne Sullivan <clyne@bitgloo.com>2020-06-18 19:35:11 -0400
commit6473b57cefe4c13cb262ed78bf0e49fe18a20267 (patch)
tree339cd8492b9bc055330037f7d6a0036415de902f /gui/wxmain.hpp
parent65b755658c62c8cf608c0ba46af4607fd7c74cc5 (diff)
using serial lib, can connect to device
Diffstat (limited to 'gui/wxmain.hpp')
-rw-r--r--gui/wxmain.hpp12
1 files changed, 12 insertions, 0 deletions
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 <wx/button.h>
+#include <wx/combobox.h>
#include <wx/dcclient.h>
#include <wx/frame.h>
#include <wx/stattext.h>
@@ -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);