Added Cocoa_acceptsFirstMouse.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,6 +32,8 @@ public:
|
|||||||
virtual wxWindow* GetWxWindow() const
|
virtual wxWindow* GetWxWindow() const
|
||||||
{ return NULL; }
|
{ return NULL; }
|
||||||
virtual void Cocoa_FrameChanged(void) = 0;
|
virtual void Cocoa_FrameChanged(void) = 0;
|
||||||
|
virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse, WX_NSEvent theEvent)
|
||||||
|
{ return false; }
|
||||||
virtual bool Cocoa_drawRect(const NSRect &rect)
|
virtual bool Cocoa_drawRect(const NSRect &rect)
|
||||||
{ return false; }
|
{ return false; }
|
||||||
virtual bool Cocoa_mouseDown(WX_NSEvent theEvent)
|
virtual bool Cocoa_mouseDown(WX_NSEvent theEvent)
|
||||||
|
@@ -79,6 +79,15 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
|
|||||||
WX_IMPLEMENT_POSER(wxPoserNSView);
|
WX_IMPLEMENT_POSER(wxPoserNSView);
|
||||||
@implementation wxPoserNSView : NSView
|
@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
|
- (void)drawRect: (NSRect)rect
|
||||||
{
|
{
|
||||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||||
|
Reference in New Issue
Block a user