From 3dcb256beaab181e2a206e4bd00513ff81cfe8de Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 11 Apr 2014 04:48:37 +0000 Subject: [PATCH] build fix for wxUSE_DRAG_AND_DROP==0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/cocoa/private.h | 6 ++++-- src/osx/cocoa/window.mm | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index 37eb0b7091..0e422c56b0 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -103,9 +103,9 @@ public : void SetCursor( const wxCursor & cursor ); void CaptureMouse(); void ReleaseMouse(); - +#if wxUSE_DRAG_AND_DROP void SetDropTarget(wxDropTarget* target); - +#endif wxInt32 GetValue() const; void SetValue( wxInt32 v ); wxBitmap GetBitmap() const; @@ -148,10 +148,12 @@ public : // cocoa thunk connected calls +#if wxUSE_DRAG_AND_DROP virtual unsigned int draggingEntered(void* sender, WXWidget slf, void* _cmd); virtual void draggingExited(void* sender, WXWidget slf, void* _cmd); virtual unsigned int draggingUpdated(void* sender, WXWidget slf, void* _cmd); virtual bool performDragOperation(void* sender, WXWidget slf, void* _cmd); +#endif virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void* _cmd); virtual void cursorUpdate(WX_NSEvent event, WXWidget slf, void* _cmd); virtual void keyEvent(WX_NSEvent event, WXWidget slf, void* _cmd); diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 418780c153..7015088eea 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -1135,6 +1135,7 @@ void wxOSX_controlDoubleAction(NSView* self, SEL _cmd, id sender) impl->controlDoubleAction(self, _cmd, sender); } +#if wxUSE_DRAG_AND_DROP unsigned int wxWidgetCocoaImpl::draggingEntered(void* s, WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) { id sender = (id ) s; @@ -1278,6 +1279,7 @@ bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), vo return result != wxDragNone; } +#endif // wxUSE_DRAG_AND_DROP void wxWidgetCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) { @@ -2337,6 +2339,7 @@ bool wxWidgetCocoaImpl::SetFocus() return true; } +#if wxUSE_DRAG_AND_DROP void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target) { [m_osxView unregisterDraggedTypes]; @@ -2358,6 +2361,7 @@ void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target) CFRelease(typesarray); } } +#endif // wxUSE_DRAG_AND_DROP void wxWidgetCocoaImpl::RemoveFromParent() {