Add wxDataFormat GetMatchingPair() which wxGTK and wxMSW already had under different names
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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 );
|
||||
|
@@ -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
|
||||
// -------------------------------
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user