+#endif // 0
+}
+
+void MyFrame::OnTestNormal(wxCommandEvent& event)
+{
+ wxLogMessage(_T("Normal item selected"));
+}
+
+void MyFrame::OnTestCheck(wxCommandEvent& event)
+{
+ wxLogMessage(_T("Check item %schecked"),
+ event.IsChecked() ? _T("") : _T("un"));
+}
+
+void MyFrame::OnTestRadio(wxCommandEvent& event)
+{
+ wxLogMessage(_T("Radio item %d selected"),
+ event.GetId() - Menu_Test_Radio1 + 1);
+}
+
+void MyFrame::LogMenuOpenOrClose(const wxMenuEvent& event, const wxChar *what)
+{
+ wxLogStatus(this, _T("A %smenu has been %s."),
+ event.IsPopup() ? _T("popup ") : _T(""), what);
+}
+
+void MyFrame::OnSize(wxSizeEvent& event)
+{
+ if ( !m_textctrl )
+ return;
+
+ // leave a band below for popup menu testing
+ wxSize size = GetClientSize();
+ m_textctrl->SetSize(0, 0, size.x, (3*size.y)/4);
+
+ // this is really ugly but we have to do it as we can't just call
+ // event.Skip() because wxFrameBase would make the text control fill the
+ // entire frame then
+#ifdef __WXUNIVERSAL__
+ PositionMenuBar();
+#endif // __WXUNIVERSAL__