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,6 +36,8 @@ public:
|
|||||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
||||||
virtual bool GetData();
|
virtual bool GetData();
|
||||||
|
|
||||||
|
// Can only be called during OnXXX methods.
|
||||||
|
wxDataFormat GetMatchingPair();
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
|
@@ -47,6 +47,9 @@ public:
|
|||||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||||
virtual bool GetData();
|
virtual bool GetData();
|
||||||
|
|
||||||
|
// Can only be called during OnXXX methods.
|
||||||
|
wxDataFormat GetMatchingPair();
|
||||||
|
|
||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
@@ -497,6 +497,12 @@ wxDragResult wxDropTarget::OnData( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
|
|||||||
return GetData() ? def : wxDragNone;
|
return GetData() ? def : wxDragNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxDataFormat wxDropTarget::GetMatchingPair()
|
||||||
|
{
|
||||||
|
return wxDataFormat( GtkGetMatchingPair() );
|
||||||
|
}
|
||||||
|
|
||||||
GdkAtom wxDropTarget::GtkGetMatchingPair()
|
GdkAtom wxDropTarget::GtkGetMatchingPair()
|
||||||
{
|
{
|
||||||
if (!m_dataObject)
|
if (!m_dataObject)
|
||||||
|
@@ -489,6 +489,11 @@ bool wxDropTarget::IsAcceptedData(IDataObject *pIDataSource) const
|
|||||||
// helper functions
|
// helper functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
wxDataFormat wxDropTarget::GetMatchingPair()
|
||||||
|
{
|
||||||
|
return GetSupportedFormat( m_pIDataSource );
|
||||||
|
}
|
||||||
|
|
||||||
wxDataFormat wxDropTarget::GetSupportedFormat(IDataObject *pIDataSource) const
|
wxDataFormat wxDropTarget::GetSupportedFormat(IDataObject *pIDataSource) const
|
||||||
{
|
{
|
||||||
// this strucutre describes a data of any type (first field will be
|
// this strucutre describes a data of any type (first field will be
|
||||||
|
Reference in New Issue
Block a user