Implement minimal wxMenu support for iOS

A separate change later will add features using iOS 14 specific API and
iOS 13 (and earlier) fallback for them.
This commit is contained in:
Stefan Csomor
2020-07-14 18:06:39 +02:00
committed by Vadim Zeitlin
parent ff24484952
commit 7812657cbf
9 changed files with 712 additions and 10 deletions

View File

@@ -147,7 +147,7 @@ MyFrame::MyFrame(const wxString& title)
// set the frame icon
SetIcon(wxICON(sample));
#if wxUSE_MENUS
#if wxUSE_MENUBAR
// create a menu bar
wxMenu *fileMenu = new wxMenu;
@@ -164,14 +164,14 @@ MyFrame::MyFrame(const wxString& title)
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
#else // !wxUSE_MENUS
#else // !wxUSE_MENUBAR
// If menus are not available add a button to access the about box
wxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
wxButton* aboutBtn = new wxButton(this, wxID_ANY, "About...");
aboutBtn->Bind(wxEVT_BUTTON, &MyFrame::OnAbout, this);
sizer->Add(aboutBtn, wxSizerFlags().Center());
SetSizer(sizer);
#endif // wxUSE_MENUS/!wxUSE_MENUS
#endif // wxUSE_MENUBAR/!wxUSE_MENUBAR
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)