Merge branch 'mac-search-menu-check'

Fix check items state in wxSearchCtrl menu under macOS.

See https://github.com/wxWidgets/wxWidgets/pull/2304
This commit is contained in:
Vadim Zeitlin
2021-04-04 17:04:18 +02:00
6 changed files with 43 additions and 25 deletions

View File

@@ -44,8 +44,8 @@ public:
// implementation only from now on
// -------------------------------
bool HandleCommandUpdateStatus( wxMenuItem* menuItem, wxWindow* senderWindow = NULL);
bool HandleCommandProcess( wxMenuItem* menuItem, wxWindow* senderWindow = NULL);
bool HandleCommandUpdateStatus( wxMenuItem* menuItem );
bool HandleCommandProcess( wxMenuItem* menuItem );
void HandleMenuItemHighlighted( wxMenuItem* menuItem );
void HandleMenuOpened();
void HandleMenuClosed();

View File

@@ -62,6 +62,10 @@ public:
wxSearchWidgetImpl * GetSearchPeer() const;
#if wxUSE_MENUS
virtual void OSXAfterMenuEvent() wxOVERRIDE;
#endif // wxUSE_MENUS
protected:
wxSize DoGetBestSize() const wxOVERRIDE;

View File

@@ -299,6 +299,11 @@ public:
// Return the DPI corresponding to the given scale factor.
static wxSize OSXMakeDPIFromScaleFactor(double scaleFactor);
#if wxUSE_MENUS
// Called on the invoking window after handling the menu event.
virtual void OSXAfterMenuEvent() { }
#endif // wxUSE_MENUS
protected:
// For controls like radio buttons which are genuinely composite
wxList m_subControls;