context menu support for mac enabled

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2003-03-06 16:56:06 +00:00
parent 7e0e5fe1e4
commit 0c2d357716

View File

@ -94,7 +94,7 @@ protected:
void OnTestCheck(wxCommandEvent& event); void OnTestCheck(wxCommandEvent& event);
void OnTestRadio(wxCommandEvent& event); void OnTestRadio(wxCommandEvent& event);
#ifdef __WXMSW__ #if defined( __WXMSW__ ) || defined( __WXMAC__ )
void OnContextMenu(wxContextMenuEvent& event) void OnContextMenu(wxContextMenuEvent& event)
{ ShowContextMenu(ScreenToClient(event.GetPosition())); } { ShowContextMenu(ScreenToClient(event.GetPosition())); }
#else #else
@ -244,7 +244,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_UPDATE_UI(Menu_Menu_Check, MyFrame::OnUpdateCheckMenuItemUI) EVT_UPDATE_UI(Menu_Menu_Check, MyFrame::OnUpdateCheckMenuItemUI)
#ifdef __WXMSW__ #if defined( __WXMSW__ ) || defined( __WXMAC__ )
EVT_CONTEXT_MENU(MyFrame::OnContextMenu) EVT_CONTEXT_MENU(MyFrame::OnContextMenu)
#else #else
EVT_RIGHT_UP(MyFrame::OnRightUp) EVT_RIGHT_UP(MyFrame::OnRightUp)
@ -622,7 +622,7 @@ void MyFrame::OnAppendSubMenu(wxCommandEvent& WXUNUSED(event))
{ {
wxMenuBar *menubar = GetMenuBar(); wxMenuBar *menubar = GetMenuBar();
wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 1); wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 2);
menu->Append(Menu_Dummy_Last, _T("&Dummy sub menu"), menu->Append(Menu_Dummy_Last, _T("&Dummy sub menu"),
CreateDummyMenu(NULL), _T("Dummy sub menu help")); CreateDummyMenu(NULL), _T("Dummy sub menu help"));