#include "gui.h" #include "imuread.h" BEGIN_EVENT_TABLE(MyFrame,wxFrame) EVT_MENU(wxID_ABOUT, MyFrame::OnAbout) EVT_MENU(wxID_EXIT, MyFrame::OnQuit) END_EVENT_TABLE() MyFrame::MyFrame(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style) : wxFrame( parent, id, title, position, size, style ) { } void MyFrame::OnAbout(wxCommandEvent &event) { wxMessageDialog dialog(this, "IMU Read\n\n\nCopyright 2016, PJRC.COM, LLC.", "About IMUREAD", wxOK|wxICON_INFORMATION); dialog.ShowModal(); } void MyFrame::OnQuit( wxCommandEvent &event ) { Close(true); } MyFrame::~MyFrame(void) { } IMPLEMENT_APP(MyApp) MyApp::MyApp() { } bool MyApp::OnInit() { // make sure we exit properly on macosx SetExitOnFrameDelete(true); wxPoint pos(100, 100); MyFrame *frame = new MyFrame(NULL, -1, wxT("Teensy"), pos, wxDefaultSize, wxDEFAULT_FRAME_STYLE & ~(wxMAXIMIZE_BOX | wxRESIZE_BORDER)); frame->Show( true ); return true; } int MyApp::OnExit() { return 0; }