+ virtual void PopUp( wxWindow *WXUNUSED(win), int x, int y )
+ {
+ long menuResult = ::PopUpMenuSelect(m_osxMenu, y, x, 0) ;
+ if ( HiWord(menuResult) != 0 )
+ {
+ MenuCommand macid;
+ GetMenuItemCommandID( GetMenuHandle(HiWord(menuResult)) , LoWord(menuResult) , &macid );
+ int id = wxMacCommandToId( macid );
+ wxMenuItem* item = NULL ;
+ wxMenu* realmenu ;
+ item = m_peer->FindItem( id, &realmenu ) ;
+ if ( item )
+ {
+ m_peer->HandleCommandProcess(item, NULL );
+ }
+ }
+ }
+