-// FIXME: Initializing like this is a really bad idea. If for some reason
-// we ever require posing as an NSObject we won't be able to since an instance
-// will have already been created here. Of course, catching messages for
-// NSObject seems like a LOT of overkill, so I doubt we ever will anyway!
-void *wxCocoaNSView::sm_cocoaObserver = [[wxNSViewNotificationObserver alloc] init];
+- (void)rightMouseDragged:(NSEvent *)theEvent
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_rightMouseDragged(theEvent) )
+ [super rightMouseDragged:theEvent];
+}
+
+- (void)rightMouseUp:(NSEvent *)theEvent
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_rightMouseUp(theEvent) )
+ [super rightMouseUp:theEvent];
+}
+
+- (void)otherMouseDown:(NSEvent *)theEvent
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_otherMouseDown(theEvent) )
+ [super otherMouseDown:theEvent];
+}
+
+- (void)otherMouseDragged:(NSEvent *)theEvent
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_otherMouseDragged(theEvent) )
+ [super otherMouseDragged:theEvent];
+}
+
+- (void)otherMouseUp:(NSEvent *)theEvent
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_otherMouseUp(theEvent) )
+ [super otherMouseUp:theEvent];
+}
+
+- (void)resetCursorRects
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_resetCursorRects() )
+ [super resetCursorRects];
+}
+
+- (void)viewDidMoveToWindow
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_viewDidMoveToWindow() )
+ [super viewDidMoveToWindow];
+}
+
+- (void)viewWillMoveToWindow:(NSWindow *)newWindow
+{
+ wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+ if( !win || !win->Cocoa_viewWillMoveToWindow(newWindow) )
+ [super viewWillMoveToWindow:newWindow];
+}
+
+@end // implementation WXNSView
+WX_IMPLEMENT_GET_OBJC_CLASS(WXNSView,NSView)
+
+// ============================================================================
+// @class wxNSViewNotificationObserver
+// ============================================================================
+
+@interface wxNSViewNotificationObserver : NSObject
+{
+}