Add wxTaskBarIcon::GetPopupMenu()

This is similar to CreatePopupMenu(), but the menu pointer returned by
the new function won't be deleted by wxWidgets, allowing it to return
the same pointer every time it is called.

Closes #18886.
This commit is contained in:
Andreas Falkenhahn
2020-08-14 19:30:46 +02:00
committed by Vadim Zeitlin
parent 5a27ea9a86
commit c70a8261cb
4 changed files with 55 additions and 9 deletions

View File

@@ -62,6 +62,9 @@ protected:
// creates menu to be displayed when user clicks on the icon
virtual wxMenu *CreatePopupMenu() { return NULL; }
// same as CreatePopupMenu but won't destroy the menu
virtual wxMenu *GetPopupMenu() { return NULL; }
private:
// default events handling, calls CreatePopupMenu:
void OnRightButtonDown(wxTaskBarIconEvent& event);