adding a standard edit menu

otherwise the file open dialog box does not support copy/paste etc. on mac
This commit is contained in:
Stefan Csomor
2022-08-06 15:19:39 +02:00
parent 5c5d5f524b
commit 203b78563f
+14
View File
@@ -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");