Make wxSTAY_ON_TOP and other window styles toggleable via SetWindowStyleFlag under OS X Cocoa.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5c892f574c
commit
b6dc21e768
@ -210,6 +210,7 @@ public :
|
||||
bool SetTransparent(wxByte alpha);
|
||||
bool SetBackgroundColour(const wxColour& col );
|
||||
void SetExtraStyle( long exStyle );
|
||||
void SetWindowStyleFlag( long style );
|
||||
bool SetBackgroundStyle(wxBackgroundStyle style);
|
||||
bool CanSetTransparent();
|
||||
|
||||
|
@ -685,7 +685,11 @@ public :
|
||||
virtual void SetExtraStyle( long WXUNUSED(exStyle) )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual void SetWindowStyleFlag( long WXUNUSED(style) )
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style))
|
||||
{
|
||||
return false ;
|
||||
|
@ -80,6 +80,7 @@ public:
|
||||
static void MacDelayedDeactivation(long timestamp);
|
||||
virtual void MacActivate( long timestamp , bool inIsActivating ) ;
|
||||
|
||||
virtual void SetWindowStyleFlag(long flags);
|
||||
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
|
@ -533,6 +533,21 @@ void wxNonOwnedWindowCocoaImpl::SetExtraStyle( long exStyle )
|
||||
}
|
||||
}
|
||||
|
||||
void wxNonOwnedWindowCocoaImpl::SetWindowStyleFlag( long style )
|
||||
{
|
||||
if (m_macWindow)
|
||||
{
|
||||
CGWindowLevel level = kCGNormalWindowLevel;
|
||||
|
||||
if (style & wxSTAY_ON_TOP)
|
||||
level = kCGUtilityWindowLevel;
|
||||
else if (( style & wxFRAME_FLOAT_ON_PARENT ) || ( style & wxFRAME_TOOL_WINDOW ))
|
||||
level = kCGFloatingWindowLevel;
|
||||
|
||||
[m_macWindow setLevel: level];
|
||||
}
|
||||
}
|
||||
|
||||
bool wxNonOwnedWindowCocoaImpl::SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style))
|
||||
{
|
||||
return true;
|
||||
|
@ -217,6 +217,17 @@ bool wxNonOwnedWindow::SetBackgroundColour(const wxColour& c )
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxNonOwnedWindow::SetWindowStyleFlag(long flags)
|
||||
{
|
||||
if (flags == GetWindowStyleFlag())
|
||||
return;
|
||||
|
||||
wxWindow::SetWindowStyleFlag(flags);
|
||||
|
||||
if (m_nowpeer)
|
||||
m_nowpeer->SetWindowStyleFlag(flags);
|
||||
}
|
||||
|
||||
// Raise the window to the top of the Z order
|
||||
void wxNonOwnedWindow::Raise()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user