exposing wxOSXGetViewFromResponder
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -296,6 +296,8 @@ public:
|
|||||||
NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size ,
|
NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size ,
|
||||||
bool adjustForOrigin = true );
|
bool adjustForOrigin = true );
|
||||||
|
|
||||||
|
WXDLLIMPEXP_CORE NSView* wxOSXGetViewFromResponder( NSResponder* responder );
|
||||||
|
|
||||||
// used for many wxControls
|
// used for many wxControls
|
||||||
|
|
||||||
@interface wxNSButton : NSButton
|
@interface wxNSButton : NSButton
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
// Get the window with the focus
|
// Get the window with the focus
|
||||||
|
|
||||||
NSView* GetViewFromResponder( NSResponder* responder )
|
NSView* wxOSXGetViewFromResponder( NSResponder* responder )
|
||||||
{
|
{
|
||||||
NSView* view = nil;
|
NSView* view = nil;
|
||||||
if ( [responder isKindOfClass:[NSTextView class]] )
|
if ( [responder isKindOfClass:[NSTextView class]] )
|
||||||
@@ -64,7 +64,7 @@ NSView* GetFocusedViewInWindow( NSWindow* keyWindow )
|
|||||||
{
|
{
|
||||||
NSView* focusedView = nil;
|
NSView* focusedView = nil;
|
||||||
if ( keyWindow != nil )
|
if ( keyWindow != nil )
|
||||||
focusedView = GetViewFromResponder([keyWindow firstResponder]);
|
focusedView = wxOSXGetViewFromResponder([keyWindow firstResponder]);
|
||||||
|
|
||||||
return focusedView;
|
return focusedView;
|
||||||
}
|
}
|
||||||
@@ -1362,7 +1362,7 @@ bool wxWidgetCocoaImpl::resignFirstResponder(WXWidget slf, void *_cmd)
|
|||||||
BOOL r = superimpl(slf, (SEL)_cmd);
|
BOOL r = superimpl(slf, (SEL)_cmd);
|
||||||
|
|
||||||
NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
|
NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder();
|
||||||
NSView* otherView = GetViewFromResponder(responder);
|
NSView* otherView = wxOSXGetViewFromResponder(responder);
|
||||||
|
|
||||||
wxWidgetImpl* otherWindow = FindFromWXWidget(otherView);
|
wxWidgetImpl* otherWindow = FindFromWXWidget(otherView);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user