-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainFrame.cpp
37 lines (26 loc) · 1.11 KB
/
mainFrame.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "mainFrame.h"
#include "MainPanel.h"
MainFrame::MainFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title) {
menuBar = new wxMenuBar;
fileMenu = new wxMenu;
fileMenu->Append(wxID_EXIT, wxT("&Exit\tCtrl-Q"), wxT("Quit this program"));
helpMenu = new wxMenu;
helpMenu->Append(wxID_ABOUT, wxT("&About...\tF1"), wxT("Show About dialog"));
menuBar->Append(fileMenu, wxT("&File"));
menuBar->Append(helpMenu, wxT("&Help"));
SetMenuBar(menuBar);
CreateStatusBar();
SetStatusText(wxT("Test!"));
mainPanel = new MainPanel(this);
this->Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnQuit));
this->Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAbout));
}
void MainFrame::OnQuit(wxCommandEvent& event) {
this->Close();
}
void MainFrame::OnAbout(wxCommandEvent& event) {
wxString msg;
msg.Printf(wxT("Small and slick reader for IARC pulse radiolisis results. Using %s\n\nAuthor: Piotr Sawicki\nemail: [email protected]"), wxVERSION_STRING);
wxMessageBox(msg, wxT("About RadReader"), wxOK | wxICON_INFORMATION, this);
}