// wxWin macros
// ----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler)
-IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow)
-IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
-
BEGIN_EVENT_TABLE(wxPopupMenuWindow, wxPopupTransientWindow)
EVT_KEY_DOWN(wxPopupMenuWindow::OnKeyDown)
void wxMenu::InvalidateGeometryInfo()
{
- if ( m_geometry )
- {
- delete m_geometry;
- m_geometry = NULL;
- }
+ wxDELETE(m_geometry);
}
// ----------------------------------------------------------------------------
Update();
#endif // 0
- menu->SetInvokingWindow(this);
-
- // wxLogDebug( "Name of invoking window %s", menu->GetInvokingWindow()->GetName().c_str() );
-
menu->Popup(ClientToScreen(wxPoint(x, y)), wxSize(0,0));
// this is not very useful if the menu was popped up because of the mouse
ms_evtLoopPopup = new wxEventLoop;
ms_evtLoopPopup->Run();
- delete ms_evtLoopPopup;
- ms_evtLoopPopup = NULL;
+ wxDELETE(ms_evtLoopPopup);
// remove the handler
PopEventHandler(true /* delete it */);
- menu->SetInvokingWindow(NULL);
-
#ifdef __WXMSW__
SetCursor(cursorOld);
#endif // __WXMSW__