From 203b78563f1fde227e6a27367f43046dfe440396 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 6 Aug 2022 15:19:39 +0200 Subject: [PATCH] adding a standard edit menu otherwise the file open dialog box does not support copy/paste etc. on mac --- samples/animate/anitest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/samples/animate/anitest.cpp b/samples/animate/anitest.cpp index 07e784ab6a..6b021a860b 100644 --- a/samples/animate/anitest.cpp +++ b/samples/animate/anitest.cpp @@ -131,6 +131,19 @@ MyFrame::MyFrame(wxWindow *parent, #endif // wxUSE_FILEDLG file_menu->Append(wxID_EXIT); + wxMenu* edit_menu = new wxMenu; + edit_menu->Append(wxID_UNDO, "&Undo\tCtrl+Z"); + edit_menu->Append(wxID_REDO, "&Redo\tCtrl+Y"); + edit_menu->AppendSeparator(); + edit_menu->Append(wxID_CUT, "Cu&t\tCtrl+X"); + edit_menu->Append(wxID_COPY, "&Copy\tCtrl+C"); + edit_menu->Append(wxID_PASTE, "&Paste\tCtrl+V"); + edit_menu->Append(wxID_CLEAR, "&Delete"); + + edit_menu->AppendSeparator(); + edit_menu->Append(wxID_SELECTALL, "Select All\tCtrl+A"); + + wxMenu *play_menu = new wxMenu; play_menu->Append(ID_PLAY, "Play\tCtrl+P", "Play the animation"); play_menu->Append(wxID_STOP, "Stop\tCtrl+S", "Stop the animation"); @@ -156,6 +169,7 @@ MyFrame::MyFrame(wxWindow *parent, wxMenuBar *menu_bar = new wxMenuBar; menu_bar->Append(file_menu, "&File"); + menu_bar->Append(edit_menu, "Edit"); menu_bar->Append(play_menu, "&Animation"); menu_bar->Append(help_menu, "&Help");