From 514e7b7bf83236b0af6286d6e1d3d75dce193d24 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Mon, 8 Sep 2003 15:37:58 +0000 Subject: [PATCH] Added virtual GetNonClientNSView() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cocoa/frame.h | 2 ++ include/wx/cocoa/window.h | 3 +++ src/cocoa/frame.mm | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/include/wx/cocoa/frame.h b/include/wx/cocoa/frame.h index 91b212a257..0cea7dbac3 100644 --- a/include/wx/cocoa/frame.h +++ b/include/wx/cocoa/frame.h @@ -52,6 +52,8 @@ protected: // ------------------------------------------------------------------------ public: virtual wxMenuBar* GetAppMenuBar() { return GetMenuBar(); } + // Returns the NSView for non-client drawing + virtual WX_NSView GetNonClientNSView(); protected: virtual void CocoaSetWxWindowSize(int width, int height); diff --git a/include/wx/cocoa/window.h b/include/wx/cocoa/window.h index cbfc40a11b..30e1a12dda 100644 --- a/include/wx/cocoa/window.h +++ b/include/wx/cocoa/window.h @@ -65,6 +65,9 @@ public: WX_NSView GetNSViewForSuperview() const; // Returns the NSView that may be hidden/is being hidden WX_NSView GetNSViewForHiding() const; + // Returns the NSView for non-client drawing + virtual WX_NSView GetNonClientNSView() { return GetNSViewForSuperview(); } + // Add/remove children void CocoaAddChild(wxWindowCocoa *child); void CocoaRemoveFromParent(void); protected: diff --git a/src/cocoa/frame.mm b/src/cocoa/frame.mm index 9d3ff26566..f74bbf4a0a 100644 --- a/src/cocoa/frame.mm +++ b/src/cocoa/frame.mm @@ -97,6 +97,13 @@ void wxFrame::CocoaSetWxWindowSize(int width, int height) wxTopLevelWindow::CocoaSetWxWindowSize(width,height); } +WX_NSView wxFrame::GetNonClientNSView() +{ + if(m_frameNSView) + return m_frameNSView; + return GetNSViewForSuperview(); +} + void wxFrame::CocoaReplaceView(WX_NSView oldView, WX_NSView newView) { // If we have the additional toolbar/statbar view, then the -- 2.45.2