Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already allow to disable the "Close" button using EnableCloseButton(). Currently implemented for MSW and OSX only. Closes #17133.
This commit is contained in:
committed by
Vadim Zeitlin
parent
6055d8d0a5
commit
fe9a5f47f4
@@ -215,6 +215,23 @@ bool wxTopLevelWindowMac::EnableCloseButton(bool enable)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMac::EnableMaximizeButton(bool enable)
|
||||
{
|
||||
// Both wxRESIZE_BORDER and wxMAXIMIZE_BOX create a resize border and
|
||||
// add a maximize button.
|
||||
if ( HasFlag(wxMAXIMIZE_BOX) || HasFlag(wxRESIZE_BORDER) )
|
||||
return m_nowpeer->EnableMaximizeButton( enable);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMac::EnableMinimizeButton(bool enable)
|
||||
{
|
||||
if ( HasFlag(wxMINIMIZE_BOX) )
|
||||
return m_nowpeer->EnableMinimizeButton( enable);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::RequestUserAttention(int flags)
|
||||
{
|
||||
return m_nowpeer->RequestUserAttention(flags);
|
||||
|
||||
Reference in New Issue
Block a user