X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77380b5cbae9f748f53a05a2733c8f624e2ad40c..1dc9b42f4f911152fb1bea3e6f532769d08a023b:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 24f0741ccb..c6e71b6ee0 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -72,7 +72,6 @@ BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame) EVT_MENU(MDI_QUIT, MyFrame::OnQuit) EVT_CLOSE(MyFrame::OnClose) - EVT_ICONIZE(MyFrame::OnIconize) EVT_SIZE(MyFrame::OnSize) END_EVENT_TABLE() @@ -179,6 +178,7 @@ MyFrame::MyFrame(wxWindow *parent, InitToolBar(GetToolBar()); #endif // wxUSE_TOOLBAR +#if wxUSE_ACCEL // Accelerators wxAcceleratorEntry entries[3]; entries[0].Set(wxACCEL_CTRL, (int) 'N', MDI_NEW_WINDOW); @@ -186,6 +186,7 @@ MyFrame::MyFrame(wxWindow *parent, entries[2].Set(wxACCEL_CTRL, (int) 'A', MDI_ABOUT); wxAcceleratorTable accel(3, entries); SetAcceleratorTable(accel); +#endif // wxUSE_ACCEL } void MyFrame::OnClose(wxCloseEvent& event) @@ -235,6 +236,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) subframe->SetIcon(wxIcon( mondrian_xpm )); #endif +#if wxUSE_MENUS // Make a menubar wxMenu *file_menu = new wxMenu; @@ -261,6 +263,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) // Associate the menu bar with the frame subframe->SetMenuBar(menu_bar); +#endif // wxUSE_MENUS #if wxUSE_STATUSBAR subframe->CreateStatusBar(); @@ -279,7 +282,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) subframe->Show(true); } -void MyFrame::OnSize(wxSizeEvent& +void MyFrame::OnSize(wxSizeEvent& #ifdef __WXUNIVERSAL__ event #else @@ -296,17 +299,11 @@ void MyFrame::OnSize(wxSizeEvent& // FIXME: On wxX11, we need the MDI frame to process this // event, but on other platforms this should not // be done. -#ifdef __WXUNIVERSAL__ +#ifdef __WXUNIVERSAL__ event.Skip(); #endif } -void MyFrame::OnIconize(wxIconizeEvent& event) -{ - wxSizeEvent e; - OnSize (e) ; -} - #if wxUSE_TOOLBAR void MyFrame::InitToolBar(wxToolBar* toolBar) { @@ -524,5 +521,3 @@ void MyChild::OnClose(wxCloseEvent& event) event.Skip(); } - -