| 12 | /////////////////////////////////////////////////////////////////////////// |
| 13 | |
| 14 | MainWindowGen::MainWindowGen( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) |
| 15 | { |
| 16 | this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
| 17 | this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); |
| 18 | |
| 19 | menuBar = new wxMenuBar( 0 ); |
| 20 | m_menu1 = new wxMenu(); |
| 21 | wxMenuItem* m_menuItem2; |
| 22 | m_menuItem2 = new wxMenuItem( m_menu1, wxID_ABOUT, wxString( wxT("&About") ) , wxEmptyString, wxITEM_NORMAL ); |
| 23 | m_menu1->Append( m_menuItem2 ); |
| 24 | |
| 25 | wxMenuItem* m_menuItem1; |
| 26 | m_menuItem1 = new wxMenuItem( m_menu1, wxID_EXIT, wxString( wxT("E&xit") ) , wxEmptyString, wxITEM_NORMAL ); |
| 27 | m_menu1->Append( m_menuItem1 ); |
| 28 | |
| 29 | menuBar->Append( m_menu1, wxT("&File") ); |
| 30 | |
| 31 | m_menu2 = new wxMenu(); |
| 32 | wxMenuItem* m_menuItem3; |
| 33 | m_menuItem3 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Show &logs...") ) + wxT('\t') + wxT("CTRL+L"), wxEmptyString, wxITEM_NORMAL ); |
| 34 | m_menu2->Append( m_menuItem3 ); |
| 35 | |
| 36 | wxMenuItem* m_menuItem4; |
| 37 | m_menuItem4 = new wxMenuItem( m_menu2, wxID_ANY, wxString( wxT("Show current &configuration...") ) , wxEmptyString, wxITEM_NORMAL ); |
| 38 | m_menu2->Append( m_menuItem4 ); |
| 39 | |
| 40 | menuBar->Append( m_menu2, wxT("&View") ); |
| 41 | |
| 42 | this->SetMenuBar( menuBar ); |
| 43 | |
| 44 | wxBoxSizer* bSizer4; |
| 45 | bSizer4 = new wxBoxSizer( wxVERTICAL ); |
| 46 | |
| 47 | dataNotebook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); |
| 48 | |
| 49 | bSizer4->Add( dataNotebook, 1, wxEXPAND, 5 ); |
| 50 | |
| 51 | |
| 52 | this->SetSizer( bSizer4 ); |
| 53 | this->Layout(); |
| 54 | |
| 55 | this->Centre( wxBOTH ); |
| 56 | |
| 57 | // Connect Events |
| 58 | this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainWindowGen::OnClose ) ); |
| 59 | m_menu1->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainWindowGen::OnAboutMenuItem ), this, m_menuItem2->GetId()); |
| 60 | m_menu1->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainWindowGen::OnExit ), this, m_menuItem1->GetId()); |
| 61 | m_menu2->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainWindowGen::OnShowLogWindow ), this, m_menuItem3->GetId()); |
| 62 | m_menu2->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainWindowGen::OnShowConfigWindow ), this, m_menuItem4->GetId()); |
| 63 | } |
| 64 | |
| 65 | MainWindowGen::~MainWindowGen() |
| 66 | { |