]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dnd.cpp
guarding open combo box against AppDefined NSEvents issued by wxEventLoop::WakeUp...
[wxWidgets.git] / src / osx / carbon / dnd.cpp
index 0ad4565b4a289a6d2b1c8e54b65154fc4f0aa32f..29b9965bcc8fe7281bdb47c32ecfbf5e9eae2174 100644 (file)
@@ -58,94 +58,6 @@ wxDropTarget::wxDropTarget( wxDataObject *data )
     wxMacEnsureTrackingHandlersInstalled();
 }
 
-bool wxDropTarget::CurrentDragHasSupportedFormat()
-{
-    bool supported = false;
-    if (m_dataObject == NULL)
-        return false;
-
-    if ( gTrackingGlobals.m_currentSource != NULL )
-    {
-        wxDataObject* data = gTrackingGlobals.m_currentSource->GetDataObject();
-
-        if ( data )
-        {
-            size_t formatcount = data->GetFormatCount();
-            wxDataFormat *array = new wxDataFormat[formatcount];
-            data->GetAllFormats( array );
-            for (size_t i = 0; !supported && i < formatcount; i++)
-            {
-                wxDataFormat format = array[i];
-                if ( m_dataObject->IsSupported( format ) )
-                {
-                    supported = true;
-                    break;
-                }
-            }
-
-            delete [] array;
-        }
-    }
-
-    if ( !supported )
-    {
-        supported = m_dataObject->HasDataInPasteboard( m_currentDragPasteboard );
-    }
-
-    return supported;
-}
-
-bool wxDropTarget::GetData()
-{
-    if (m_dataObject == NULL)
-        return false;
-
-    if ( !CurrentDragHasSupportedFormat() )
-        return false;
-
-    bool transferred = false;
-    if ( gTrackingGlobals.m_currentSource != NULL )
-    {
-        wxDataObject* data = gTrackingGlobals.m_currentSource->GetDataObject();
-
-        if (data != NULL)
-        {
-            size_t formatcount = data->GetFormatCount();
-            wxDataFormat *array = new wxDataFormat[formatcount];
-            data->GetAllFormats( array );
-            for (size_t i = 0; !transferred && i < formatcount; i++)
-            {
-                wxDataFormat format = array[i];
-                if ( m_dataObject->IsSupported( format ) )
-                {
-                    int size = data->GetDataSize( format );
-                    transferred = true;
-
-                    if (size == 0)
-                    {
-                        m_dataObject->SetData( format, 0, 0 );
-                    }
-                    else
-                    {
-                        char *d = new char[size];
-                        data->GetDataHere( format, (void*)d );
-                        m_dataObject->SetData( format, size, d );
-                        delete [] d;
-                    }
-                }
-            }
-
-            delete [] array;
-        }
-    }
-
-    if ( !transferred )
-    {
-        transferred = m_dataObject->GetFromPasteboard( m_currentDragPasteboard );
-    }
-
-    return transferred;
-}
 
 //-------------------------------------------------------------------------
 // wxDropSource