diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index e92df39539..ed731f7e72 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -101,9 +101,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; @@ -146,10 +146,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 451766af11..80cd683c8c 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -1127,6 +1127,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; @@ -1270,6 +1271,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) { @@ -2354,6 +2356,7 @@ bool wxWidgetCocoaImpl::SetFocus() return true; } +#if wxUSE_DRAG_AND_DROP void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target) { [m_osxView unregisterDraggedTypes]; @@ -2375,6 +2378,7 @@ void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target) CFRelease(typesarray); } } +#endif // wxUSE_DRAG_AND_DROP void wxWidgetCocoaImpl::RemoveFromParent() {