Implement wxTopLevelWindow::EnableCloseButton() for wxOSX

Just forward this wx method to Cocoa standardWindowButton:NSWindowCloseButton.

See #17133
This commit is contained in:
John Roberts
2015-09-06 14:12:16 +02:00
committed by Vadim Zeitlin
parent 8d6a2b3921
commit 6055d8d0a5
7 changed files with 26 additions and 2 deletions

View File

@@ -205,6 +205,16 @@ bool wxTopLevelWindowMac::IsFullScreen() const
return m_nowpeer->IsFullScreen();
}
bool wxTopLevelWindowMac::EnableCloseButton(bool enable)
{
// Unlike in wxMSW, wxSYSTEM_MENU is not sufficient to show
// a close button unless combined with one of the resize buttons.
if ( HasFlag(wxCLOSE_BOX) )
return m_nowpeer->EnableCloseButton( enable);
return false;
}
void wxTopLevelWindowMac::RequestUserAttention(int flags)
{
return m_nowpeer->RequestUserAttention(flags);