From ba0cf6af6d19a7a91ed5087f20bf9b93b7a4f911 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 4 Jun 2013 07:06:19 +0000 Subject: [PATCH] exposing wxOSXGetViewFromResponder git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/cocoa/private.h | 2 ++ src/osx/cocoa/window.mm | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index 290f71c1b4..b776801191 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -296,6 +296,8 @@ public: NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ); + WXDLLIMPEXP_CORE NSView* wxOSXGetViewFromResponder( NSResponder* responder ); + // used for many wxControls @interface wxNSButton : NSButton diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index f7c6fcb8c3..ea2475e0a5 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -41,7 +41,7 @@ // Get the window with the focus -NSView* GetViewFromResponder( NSResponder* responder ) +NSView* wxOSXGetViewFromResponder( NSResponder* responder ) { NSView* view = nil; if ( [responder isKindOfClass:[NSTextView class]] ) @@ -64,7 +64,7 @@ NSView* GetFocusedViewInWindow( NSWindow* keyWindow ) { NSView* focusedView = nil; if ( keyWindow != nil ) - focusedView = GetViewFromResponder([keyWindow firstResponder]); + focusedView = wxOSXGetViewFromResponder([keyWindow firstResponder]); return focusedView; } @@ -1362,7 +1362,7 @@ bool wxWidgetCocoaImpl::resignFirstResponder(WXWidget slf, void *_cmd) BOOL r = superimpl(slf, (SEL)_cmd); NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); - NSView* otherView = GetViewFromResponder(responder); + NSView* otherView = wxOSXGetViewFromResponder(responder); wxWidgetImpl* otherWindow = FindFromWXWidget(otherView); -- 2.45.2