X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82f8ea8547dca786d909485596215b7542931288..bd235295fb3b35fdb29326084b87893cf5432eb5:/src/osx/window_osx.cpp diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 89afdc7171..cd8aecdc4d 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -100,7 +100,7 @@ class WXDLLIMPEXP_CORE wxBlindPlateWindow : public wxWindow { public: wxBlindPlateWindow() { Init(); } - + // Old-style constructor (no default values for coordinates to avoid // ambiguity with the new one) wxBlindPlateWindow(wxWindow *parent, @@ -109,10 +109,10 @@ public: const wxString& name = wxPanelNameStr) { Init(); - + Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); } - + // Constructor wxBlindPlateWindow(wxWindow *parent, wxWindowID winid = wxID_ANY, @@ -122,10 +122,10 @@ public: const wxString& name = wxPanelNameStr) { Init(); - + Create(parent, winid, pos, size, style, name); } - + // Pseudo ctor bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, @@ -136,24 +136,25 @@ public: { if ( !wxWindow::Create(parent, winid, pos, size, style, name) ) return false; - + // so that non-solid background renders correctly under GTK+: SetThemeEnabled(true); + return true; } - + virtual ~wxBlindPlateWindow(); - + virtual bool AcceptsFocus() const { return false; } - + protected: // common part of all ctors void Init() { } - + DECLARE_DYNAMIC_CLASS_NO_COPY(wxBlindPlateWindow) DECLARE_EVENT_TABLE() }; @@ -206,6 +207,7 @@ void wxWindowMac::Init() m_macIsUserPane = true; m_clipChildren = false ; m_cachedClippedRectValid = false ; + m_isNativeWindowWrapper = false; } wxWindowMac::~wxWindowMac() @@ -413,7 +415,7 @@ void wxWindowMac::DoSetWindowVariant( wxWindowVariant variant ) m_peer->SetData(kControlEntireControl, kControlSizeTag, &size ) ; #endif - + switch ( variant ) { case wxWINDOW_VARIANT_NORMAL : @@ -471,6 +473,16 @@ bool wxWindowMac::SetForegroundColour(const wxColour& col ) return retval; } +bool wxWindowMac::SetBackgroundStyle(wxBackgroundStyle style) +{ + if ( !wxWindowBase::SetBackgroundStyle(style) ) + return false; + + if ( m_peer ) + m_peer->SetBackgroundStyle(style); + return true; +} + bool wxWindowMac::SetBackgroundColour(const wxColour& col ) { if (m_growBox) @@ -797,7 +809,6 @@ bool wxWindowMac::SetCursor(const wxCursor& cursor) bool wxWindowMac::DoPopupMenu(wxMenu *menu, int x, int y) { #ifndef __WXUNIVERSAL__ - menu->SetInvokingWindow((wxWindow*)this); menu->UpdateUI(); if ( x == wxDefaultCoord && y == wxDefaultCoord ) @@ -811,7 +822,6 @@ bool wxWindowMac::DoPopupMenu(wxMenu *menu, int x, int y) ClientToScreen( &x , &y ) ; } menu->GetPeer()->PopUp(this, x, y); - menu->SetInvokingWindow( NULL ); return true; #else // actually this shouldn't be called, because universal is having its own implementation @@ -832,7 +842,7 @@ void wxWindowMac::DoSetToolTip(wxToolTip *tooltip) if ( m_tooltip ) m_tooltip->SetWindow(this); - + if (m_peer) m_peer->SetToolTip(tooltip); } @@ -1142,16 +1152,16 @@ bool wxWindowMac::Show(bool show) m_peer->SetVisibility( show ) ; #ifdef __WXOSX_IPHONE__ - // only when there's no native event support + // only when there's no native event support if ( !IsTopLevel() ) #endif { wxShowEvent eventShow(GetId(), show); eventShow.SetEventObject(this); - + HandleWindowEvent(eventShow); } - + return true; } @@ -1617,7 +1627,7 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) if (child->IsTopLevel()) continue; - + if ( !IsClientAreaChild(child) ) continue;