window level support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-03-07 19:04:55 +00:00
parent e9e8b38179
commit 9d243a476a
3 changed files with 19 additions and 0 deletions

View File

@@ -240,7 +240,11 @@ public :
virtual bool IsModified() const;
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
CGWindowLevel GetWindowLevel() const { return m_macWindowLevel; }
void RestoreWindowLevel();
protected :
CGWindowLevel m_macWindowLevel;
WXWindow m_macWindow;
void * m_macFullScreenData ;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCocoaImpl)

View File

@@ -853,6 +853,8 @@ public :
virtual void SetModified(bool WXUNUSED(modified)) { }
virtual bool IsModified() const { return false; }
virtual CGWindowLevel GetWindowLevel() const { return kCGNormalWindowLevel; }
virtual void RestoreWindowLevel() {}
protected :
wxNonOwnedWindow* m_wxPeer;
DECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl)

View File

@@ -632,6 +632,7 @@ long style, long extraStyle, const wxString& WXUNUSED(name) )
}
[m_macWindow setLevel:level];
m_macWindowLevel = level;
[m_macWindow setDelegate:controller];
@@ -742,6 +743,7 @@ void wxNonOwnedWindowCocoaImpl::SetWindowStyleFlag( long style )
level = kCGFloatingWindowLevel;
[m_macWindow setLevel: level];
m_macWindowLevel = level;
}
}
@@ -950,6 +952,16 @@ bool wxNonOwnedWindowCocoaImpl::IsModified() const
return [m_macWindow isDocumentEdited];
}
void wxNonOwnedWindowCocoaImpl::RestoreWindowLevel()
{
if ( [m_macWindow level] != m_macWindowLevel )
[m_macWindow setLevel:m_macWindowLevel];
}
//
//
//
wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, WXWindow nativeWindow)
{
wxNonOwnedWindowCocoaImpl* now = new wxNonOwnedWindowCocoaImpl( wxpeer );
@@ -964,3 +976,4 @@ wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::CreateNonOwnedWindow( wxNonOwnedWind
now->Create( parent, pos, size, style , extraStyle, name );
return now;
}