return CurrentDragHasSupportedFormat() ? def : wxDragNone;
}
+wxDataFormat wxDropTarget::GetMatchingPair()
+{
+ wxFAIL_MSG("wxDropTarget::GetMatchingPair() not implemented in src/osx/carbon/dnd.cpp");
+ return wxDF_INVALID;
+}
+
bool wxDropTarget::OnDrop( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y) )
{
if (m_dataObject == NULL)
}
}
-#if wxOSX_USE_CARBON
if ( !supported )
{
- PasteboardRef pasteboard;
-
- if ( GetDragPasteboard( (DragReference)m_currentDrag, &pasteboard ) == noErr )
- {
- supported = m_dataObject->HasDataInPasteboard( pasteboard );
- }
+ supported = m_dataObject->HasDataInPasteboard( m_currentDragPasteboard );
}
-#endif
return supported;
}
}
}
-#if wxOSX_USE_CARBON
if ( !transferred )
{
- PasteboardRef pasteboard;
-
- if ( GetDragPasteboard( (DragReference)m_currentDrag, &pasteboard ) == noErr )
- {
- transferred = m_dataObject->GetFromPasteboard( pasteboard );
- }
+ transferred = m_dataObject->GetFromPasteboard( m_currentDragPasteboard );
}
-#endif
return transferred;
}
DragAttributes attributes;
GetDragAttributes( theDrag, &attributes );
-
+ PasteboardRef pasteboard = 0;
+ GetDragPasteboard( theDrag, &pasteboard );
wxNonOwnedWindow* toplevel = wxNonOwnedWindow::GetFromWXWindow( (WXWindow) theWindow );
bool optionDown = GetCurrentKeyModifiers() & optionKey;
#ifndef __LP64__
HideDragHilite( theDrag );
#endif
- trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
+ trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
trackingGlobals->m_currentTarget->OnLeave();
trackingGlobals->m_currentTarget = NULL;
trackingGlobals->m_currentTargetWindow = NULL;
{
if ( trackingGlobals->m_currentTarget )
{
- trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
+ trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
result = trackingGlobals->m_currentTarget->OnEnter( localx, localy, result );
}
{
if ( trackingGlobals->m_currentTarget )
{
- trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
+ trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
result = trackingGlobals->m_currentTarget->OnDragOver( localx, localy, result );
}
}
if (trackingGlobals->m_currentTarget)
{
- trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
+ trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
trackingGlobals->m_currentTarget->OnLeave();
#ifndef __LP64__
HideDragHilite( theDrag );
Point mouse, localMouse;
int localx, localy;
- trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
+ PasteboardRef pasteboard = 0;
+ GetDragPasteboard( theDrag, &pasteboard );
+ trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
GetDragMouse( theDrag, &mouse, 0L );
localMouse = mouse;
localx = localMouse.h;