]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/NSView.mm
don't add 7 and 14 pixel horz/vertical padding in DoGetBestSize() when the best size...
[wxWidgets.git] / src / cocoa / NSView.mm
index 7a4d133ff4d7dea8826ce6ee9eb6157179bd4c26..72c68998689456aef19bd57569c14ca9492be65d 100644 (file)
@@ -73,11 +73,21 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
 - (void)otherMouseDown:(NSEvent *)theEvent;
 - (void)otherMouseDragged:(NSEvent *)theEvent;
 - (void)otherMouseUp:(NSEvent *)theEvent;
+- (void)resetCursorRects;
 @end // wxPoserNSView
 
 WX_IMPLEMENT_POSER(wxPoserNSView);
 @implementation wxPoserNSView : NSView
 
+- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
+{
+    bool acceptsFirstMouse = false;
+    wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+    if(!win || !win->Cocoa_acceptsFirstMouse(acceptsFirstMouse, theEvent))
+        acceptsFirstMouse = [super acceptsFirstMouse:theEvent];
+    return acceptsFirstMouse;
+}
+
 - (void)drawRect: (NSRect)rect
 {
     wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
@@ -169,6 +179,13 @@ WX_IMPLEMENT_POSER(wxPoserNSView);
         [super otherMouseUp:theEvent];
 }
 
+- (void)resetCursorRects
+{
+    wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
+    if( !win || !win->Cocoa_resetCursorRects() )
+        [super resetCursorRects];
+}
+
 @end // implementation wxPoserNSView
 
 @interface wxNSViewNotificationObserver : NSObject