Merged trunk 46229 (NOTE: CVS) inside #if 0 pending research into how to do it in an ABI-compatible way:
Implement mouse entered, exited, and synthesize move events while the mouse is inside. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -166,6 +166,24 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
|
||||
[super resetCursorRects];
|
||||
}
|
||||
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewDidMoveToWindow() )
|
||||
#endif
|
||||
[super viewDidMoveToWindow];
|
||||
}
|
||||
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)newWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewWillMoveToWindow(newWindow) )
|
||||
#endif
|
||||
[super viewWillMoveToWindow:newWindow];
|
||||
}
|
||||
|
||||
@end // implementation WXNSView
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(WXNSView,NSView)
|
||||
|
||||
@@ -178,6 +196,7 @@ WX_IMPLEMENT_GET_OBJC_CLASS(WXNSView,NSView)
|
||||
}
|
||||
|
||||
- (void)notificationFrameChanged: (NSNotification *)notification;
|
||||
- (void)synthesizeMouseMovedForView: (NSView *)theView;
|
||||
@end // interface wxNSViewNotificationObserver
|
||||
WX_DECLARE_GET_OBJC_CLASS(wxNSViewNotificationObserver,NSObject)
|
||||
|
||||
@@ -190,6 +209,15 @@ WX_DECLARE_GET_OBJC_CLASS(wxNSViewNotificationObserver,NSObject)
|
||||
win->Cocoa_FrameChanged();
|
||||
}
|
||||
|
||||
- (void)synthesizeMouseMovedForView: (NSView *)theView
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(theView);
|
||||
wxCHECK_RET(win,wxT("synthesizeMouseMovedForView received but no wxWindow exists"));
|
||||
win->Cocoa_synthesizeMouseMoved();
|
||||
#endif
|
||||
}
|
||||
|
||||
@end // implementation wxNSViewNotificationObserver
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(wxNSViewNotificationObserver,NSObject)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user