]> git.saurik.com Git - wxWidgets.git/commitdiff
Add wxDataFormat GetMatchingPair() which wxGTK and wxMSW already had under different...
authorRobert Roebling <robert@roebling.de>
Wed, 21 Jan 2009 14:01:31 +0000 (14:01 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 21 Jan 2009 14:01:31 +0000 (14:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/dnd.h
include/wx/msw/ole/droptgt.h
src/gtk/dnd.cpp
src/msw/ole/droptgt.cpp

index c29ded049e8031f194392df1ef9c6a17bb082931..08a12ec5ea5677acb1b3a63c209112767a11486a 100644 (file)
@@ -36,9 +36,11 @@ public:
     virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
     virtual bool GetData();
 
+    // Can only be called during OnXXX methods.
+    wxDataFormat GetMatchingPair();
 
     // implementation
-  
+    
     GdkAtom GtkGetMatchingPair();
 
     void GtkRegisterWidget( GtkWidget *widget );
index aff3f84cc09935a4b256c4bb045adea4bcdfdaad..909a90dc41948cabdc13ffb12a31d5fe97212ec7 100644 (file)
@@ -47,6 +47,9 @@ public:
     virtual bool OnDrop(wxCoord x, wxCoord y);
     virtual bool GetData();
 
+    // Can only be called during OnXXX methods.
+    wxDataFormat GetMatchingPair();
+
     // implementation only from now on
     // -------------------------------
 
index 45ab7ced5a2f61ca49e6e5638b251b3b012c98fc..dd9fe2745c15e9524be8bfe5f4c1596ac23db3bd 100644 (file)
@@ -497,6 +497,12 @@ wxDragResult wxDropTarget::OnData( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
     return GetData() ? def : wxDragNone;
 }
 
+
+wxDataFormat wxDropTarget::GetMatchingPair()
+{
+    return wxDataFormat( GtkGetMatchingPair() );
+}
+
 GdkAtom wxDropTarget::GtkGetMatchingPair()
 {
     if (!m_dataObject)
index 3ca27617339d1f914c6c5cc73c2825a49a3936fc..ba1fccc45f77d770f72827ff949651e05584e800 100644 (file)
@@ -489,6 +489,11 @@ bool wxDropTarget::IsAcceptedData(IDataObject *pIDataSource) const
 // helper functions
 // ----------------------------------------------------------------------------
 
+wxDataFormat wxDropTarget::GetMatchingPair()
+{
+    return GetSupportedFormat( m_pIDataSource );
+}
+
 wxDataFormat wxDropTarget::GetSupportedFormat(IDataObject *pIDataSource) const
 {
     // this strucutre describes a data of any type (first field will be