-BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_MENU(TEST_QUIT, MyFrame::OnQuit)
- EVT_MENU(TEST_ABOUT, MyFrame::OnAbout)
- EVT_MENU_HIGHLIGHT_ALL(MyFrame::OnMenuHighlight)
- EVT_CLOSE(MyFrame::OnCloseWindow)
-END_EVENT_TABLE()
-
-// Define my frame constructor
-MyFrame::MyFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
- const wxSize& size, long style):
- wxFrame(parent, id, title, pos, size, style)
-{
- m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0, 0), wxSize(-1, -1), wxTE_MULTILINE);
-}
-
-void MyFrame::OnQuit(wxCommandEvent& event)
-{
- Close(TRUE);
-}
-
-void MyFrame::OnAbout(wxCommandEvent& event)
-{
- (void)wxMessageBox("wxWindows wxToolBar demo\n", "About wxToolBar");
-}
-
-// Intercept menu item selection - only has an effect in Windows
-void MyFrame::OnMenuHighlight(wxMenuEvent& event)
-{
- char *msg = NULL;
- switch (event.GetMenuId())
- {
- case TEST_QUIT:
- msg = "Quit program";
- break;
- case -1:
- msg = "";
- break;
- }
- if (msg)
- SetStatusText(msg);
-}
-
-// Define the behaviour for the frame closing
-// - must delete all frames except for the main one.
-void MyFrame::OnCloseWindow(wxCloseEvent& event)
-{
- Destroy();
-}
-
-BEGIN_EVENT_TABLE(TestToolBar, wxToolBar95)
- EVT_PAINT(TestToolBar::OnPaint)
-END_EVENT_TABLE()
-
-TestToolBar::TestToolBar(wxFrame* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
- long style, int direction, int RowsOrColumns):
- wxToolBar(parent, id, pos, size, style, direction, RowsOrColumns)